我正在尝试使用postman在我们的okta实例中运行查询。我遇到的问题是Postman说它有语法错误。准确的措辞"无效的搜索条件。"。这是我的结构的部分副本:
{
"id": "00u1c9lvdpsArq00J0h8",
"status": "ACTIVE",
"created": "2017-02-28T18:55:23.000Z",
"activated": "2017-02-28T18:55:24.000Z",
"statusChanged": "2017-02-28T18:55:24.000Z",
"lastLogin": null,
"lastUpdated": "2017-05-01T10:30:59.000Z",
"passwordChanged": null,
"profile": {
"login": "lynn@enterthepicture.com",
"firstName": "Lynn",
"lastName": "Harvey",
"mobilePhone": null,
"email": "lynn@enterthepicture.com",
"secondEmail": null,
"primaryPhone": "4169329890"
},
"credentials": {
"provider": {
"type": "ACTIVE_DIRECTORY",
"name": "idm.sni"
}
},
我尝试运行的查询是{{url}}/api/v1/users?search=credentials.provider.name eq "idm.sni"
如果有人有任何建议,我将非常感谢您的帮助。
答案 0 :(得分:1)
搜索表达式需要进行URL编码,可在此处找到示例:http://developer.okta.com/docs/api/resources/users.html#list-users-with-search
因此,在您的示例中,请求网址需要看起来像{{url}}/api/v1/users?search=credentials.provider.name%20eq%20%22idm.sni%22
。
我希望这有帮助!