Directory.users().list().setQuery方法的格式是什么? [英] What is the format for the Directory.users().list().setQuery method?
问题描述
文档指出:
查询字符串以进行前缀匹配搜索.格式应为密钥":值",其中密钥可以是电子邮件",名字"或姓氏".
Query string for prefix matching searches. Should be of the form "key":"value" where key can be "email", "firstName" or "lastName".
我尝试过:
directory.users().list().setQuery("email:" + email).execute()
directory.users().list().setQuery("\"email\":\"" + email + "\"").execute()
directory.users().list().setQuery("email:\"" + email + "\"").execute()
它们都返回400:错误的请求响应.如何正确过滤电子邮件地址?谢谢!
They all return a 400 : Bad Request response. How do I properly filter on the email address? Thank you!
推荐答案
Currently the list API supports only prefix queries, please refer to the documentation for query parameter here.
尝试使用"email:someEmail@someDomain.com*"查询->注意最后的星号.
Try with query as "email:someEmail@someDomain.com*" -> Note the asterisk at the end.
这篇关于Directory.users().list().setQuery方法的格式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!