search_admins
The search_admins method retrieves a list of the admins in a specified company.
Syntax
{
<credentials object>
"criteria": {
"company": <company>,
"type": [<one or more of company, domain, mail, workgroup],
"match": <wildcard pattern>
}
"range": {
"first": <number>,
"limit": <number>
}Request fields for search_admins
The following fields can be used in the search_admins method:
| Field name | Obligation | Definition/Value |
|---|---|---|
| criteria | Optional | Narrows the results by restricting the search to the specified fields and their values. Allowed values are:
|
| range | Optional | Limits the range of admins to display. Allowed values are:
|
Response fields for search_admins
The following fields may be returned when the search_admins method is submitted:
| Field name  | Obligation | Description/Value |
|---|---|---|
| admins | Returned if success = true | A list of the admins that meet the criteria and their attributes. Allowed values are:
|
| count | Returned if success = true | The number of admins returned. |
| error | Returned if success = false | A text string that explains the error. |
| error_number | Returned if success = false | A number that represents the error. |
| success | Always returned | Indicates whether the request was successful or not. Allowed values are true and false. |
| total_count | Returned if success = true | The total number of admins that match the search criteria. This value may be more than the number of results returned if a range was specified in the request. |
Examples for search_admins
Request
{
"credentials": {
"user": "[email protected]",
"password": "sw0rdf1sh"
}
}Response
{
"success": true,
"count": 3,
"total_count": 3
"admins": [
{
"user": "[email protected]",
"type": "company",
"control": [
"Example Corp"
]
},
{
"user": "[email protected]",
"type": "domain",
"control": [
"example.com"
]
},
{
"user": "[email protected]",
"type": "workgroup",
"control": [
"example.com/sales"
]
}
],
}