org.list
The org.list command is used to find and return a list of organizations.
TR50 Request
{
"cmd": {
"command": "org.list",
"params": {
"show": [
"id",
"key",
"name",
"profile",
"lastLoginBy",
"lastLoginOn",
"createdBy",
"createdOn",
"updatedBy",
"updatedOn"
]
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
show | Array | An array of field names of the data columns to return. | |
offset | Integer | The starting list offset, used for pagination, defaults to 0 if not specified. | |
limit | Integer | Limits the number of results returned. Defaults to the maximum configured size. | |
sort | String | sort is an optional parameter that defines the sort order of the result set. It allows to arrange the list in either ascending(+) or descending(-) order. It is possible to sort org.list in the following categories: id, key, name, profile, owner, createdBy, createdOn, updatedBy, updatedOn, lastLoginOn, apiCounts.lastThirtyDays, counts.things, counts.connections, counts.storage | |
canHaveSubOrgs | Boolean | Whether to only list organizations that are capable of having child organizations. | |
root | Boolean | Set to true to only return organizations with the "root" parameter. |
TR50 Response
If the command is sent successfully a success message and the result is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"count": 42,
"fields": [
"id",
"key",
"name",
"profile",
"lastLoginBy",
"lastLoginOn",
"createdBy",
"createdOn",
"updatedBy",
"updatedOn"
],
"result": [
{
"id": "52a1d3db169e1fd032179408",
"key": "SYSTEM",
"name": "deviceWISE Open Management",
"profile": "52a1d3db169e1fd032179408",
"lastLoginBy": "admin@devicewise.com",
"lastLoginOn": "2013-12-06T08:40:43.885-05:00",
"createdBy": "SYSTEM",
"createdOn": "2013-12-06T08:40:43.885-05:00",
"updatedBy": "SYSTEM",
"updatedOn": "2013-12-06T08:40:43.885-05:00"
}
]
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
count | Integer | Total number of available records for pagination. |
fields | Array | An array of field names of data columns capable of being returned. |
result | Array | Array of result objects. |
Result Object
Name | Type | Description |
---|---|---|
id | String | The id of the organization. |
key | String | The key of the organization. |
name | String | The name of the organization. |
desc | String | The description of the organization. |
profile | String | The unique identifier of the org profile of the organization. |
owner | String | The unique identifier of the owner of the organization. |
locale | String | The default locale of the organization. |
smscAccessList | Array | An array of SMSCs that the org can use to send an SMS. |
domain | String | The domain claimed by the organization. |
customerRefId | String | The customer reference identifier. |
defaultLocationPolicyId | String | The default location policy identifier. |
allowSubOrgs | Boolean | Whether the organization allows child organizations. |
parent | String | The unique identifier of the parent organization. |
parentKey | String | The key of the parent organization. |
ancestors | Array | The array of unique identifiers of the ancestor organizations. |
ancestorKeys | Array | The array of keys of the ancestor organizations. |
enabledApplications | Array | The array of the IDs of portal apps that are enabled for this organization. |
lastLoginBy | String | The last user who logged into the org. |
lastLoginOn | String | The timestamp of the last login. |
createdBy | String | The creator of the organization. |
createdOn | String | The timestamp of the organization. |
updatedBy | String | The updater of the organization. |
updatedOn | String | The creation timestamp of the organization. |
PHP API
mixed TR50httpWorker::orgList([$offset[, $limit[, $canHaveSubOrgs]]]);