Search code examples
pythongoogle-apigoogle-directory-api

OR condition while passing params in google directory api query


I am using the google directory api where in I have used the users:list method to retrieve the users.While passing the condition in query ,I want to pass multiple parameters for a key.(eg orgUnit = /ab OR /cd I have tried different possible ways but not able to achieve .


Solution

  • The user.list method a search users allows you to use the query paramater.

    if you check the documentation operators You will notice that it does not have the ablity to use the Or with searching.

    I suggest you make two calls one for each option and then sort them locally.