...
| Anchor | ||||
|---|---|---|---|---|
|
| Anchor | ||||
|---|---|---|---|---|
|
Examples:
Note: in the following examples, you can use any "searchable" attributes in user as the match condition, not only the attributes in the example.
e.g.
["loginName", "=", "john"]
or
["email", "=", "john@acme.com"]
Search users in a domain
Code Block language js title Parameters { "match": [ [domain.id", "=", "domain id 1"], ["lastName", "=", "Smith"] ], "return":["id", "loginName", "email"], "sort":"loginName", "order":"asc", "max": 20, "offset": 0 }Code Block language js title Response { "error":0, "result": { "total": 20, "rows": [ { "id":"user id 1", "loginName":"John Smith", "email": "john.smith@acme.com" }, { "id":"user id 2", "loginName":"Alice Smith", "email": "alice.smith@acme.com" }, ... ] } }Search users in a unit
Code Block language js title Parameters { "match": [ [unit.id", "=", "unit id 1"], ], "return":["id", "loginName", "email"], "sort":"loginName", "order":"asc", "max": 20, "offset": 0 }Code Block language js title Response { "error":0, "result": { "total": 20, "rows": [ { "id":"user id 1", "loginName":"John Smith", "email": "john.smith@acme.com" }, { "id":"user id 3", "loginName":"Bob Smith", "email": "bob.smith@acme.com" }, ... ] } }Search users in a group
Code Block language js title Parameters { "match": [ [group.id", "=", "group id 1"], ], "return":["id", "loginName", "email"], "sort":"loginName", "order":"asc", "max": 20, "offset": 0 }Code Block language js title Response { "error":0, "result": { "total": 20, "rows": [ { "id":"user id 1", "loginName":"John Smith", "email": "john.smith@acme.com" }, { "id":"user id 2", "loginName":"Alice Smith", "email": "alice.smith@acme.com" }, ... ] } }
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
{
"match":
[
[domain.id", "=", "domain id 1"],
[id", "=", "user id 1"] // or ["loginName", "=", "john"] etc, any searchable user attributes can be used as the match condition
],
"return":["id", "loginName", "email"]
} |
...