The GET /directory/v1/{dn}/subtree endpoint supports a SCIM filtering parameter to limit the returned result set to those entries meeting the specified criteria. For example, the request below uses the filter objectClass eq "person" and sn eq "Jones" to search for all people with the last name of Jones.

curl -X "GET" "https://ds.example.com/directory/v1/ou=people,dc=example,dc=com/subtree?searchScope=wholeSubtree&filter=objectClass%20eq%20%22person%22%20and%20sn%20eq%20%22Jones%22" \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer jwtToken'

Filtering is done before pagination of the response data. The filter parameter is encoded into the cursor pagination parameter; it only needs to be provided in the first request.

For more information about filtering, see Conventions.