Google Directory API Search users by custom field not set -
according google directory api can create custom fields users , search users fields.
https://developers.google.com/admin-sdk/directory/v1/guides/search-users
you can search users matching attributes users.list method of directory api. method accepts query parameter search query combining 1 or more search clauses. each search clause made of 3 parts:
field
user attribute searched. example, givenname. custom fields can searched schemaname.fieldname.
operator
test performed on data provide match. example, : operator tests if text attribute contains value.
value
content of attribute tested. example, jane.
searching boolean value appears show users have been explicitly set true or false. possible search users not have set value or search values not true or not false?
it appears have changed. when search on google apis explorer using
get https:// www.googleapis.com/admin/directory/v1/users?customer=my_customer&projection=full&key={your_api_key}
it returns 70 results using
get https:// www.googleapis.com/admin/directory/v1/users?customer=my_customer&projection=full&query=userdata.enabled%3dfalse&key={your_api_key} returns 1 result and
get https:// www.googleapis.com/admin/directory/v1/users?customer=my_customer&projection=full&query=userdata.enabled%3dtrue&key={your_api_key} returns no results.
i have dozen set true , rest set false. there few have not explicitly set true or false.
it appears cannot search values aren't set explicitly. option pull set values , find difference between ones set , ones aren't. example using php array_udiff or iterating through users , comparing values.
Comments
Post a Comment