Directory.users().list().setQuery方法的格式是什么? [英] What is the format for the Directory.users().list().setQuery method?

查看:30
本文介绍了Directory.users().list().setQuery方法的格式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档指出:

查询字符串以进行前缀匹配搜索.格式应为密钥":值",其中密钥可以是电子邮件",名字"或姓氏".

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!

推荐答案

当前,列表API仅支持前缀查询,请参阅文档以获取查询参数

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆