session.org.list
The session.org.list command is used to obtain a list of organizations available to the current session.
TR50 Request
{
"cmd": {
"command": "session.org.list",
"params": {
"includeRoles": false
"includeRecentOrgs": false
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
includeRoles |
Boolean |
|
Indicate that the available roles are to be returned with the response (unnecessary for Super-Ops level users). |
includeRecentOrgs |
Boolean |
Indicate that a list of the most recently accessed orgs should be returned. |
TR50 Response
If the command is sent successfully a success message and an array of organizations is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"result": [
{
"orgId": "52fbed495d80f1091b00000f",
"orgKey": "DEMO",
"orgName": "Demo",
"subOrgs": [ {
"orgId": "53924c91d15a70c8f4000008",
"orgKey": "TESTORG1",
"orgName": "Test organization 1"
"subOrgs": [
{
"orgId": "53924c92d15a70c8f4000010",
"orgKey": "TESTORG2",
"orgName": "Test organization 2"
}
]
},
{
"orgId": "53923296d15a706c24000061",
"orgKey": "TESTM0FU5M3BUKCWLJ8C",
"orgName": "Test org: M0FU5M3BUKCWLJ8C"
}
]
},
{
"orgId": "5340462a5d80f1268901644d",
"orgKey": "LIVE",
"orgName": "Live test devices"
},
{
"orgId": "534bcd295d80f177f8010d39",
"orgKey": "PHONE",
"orgName": "Phone applications"
},
...
}
]
"recentOrgs": [
{
"orgId": "5340462a5d80f1268901644d",
"orgKey": "LIVE",
"orgName": "Live test devices"
},
{
"orgId": "534bcd295d80f177f8010d39",
"orgKey": "PHONE",
"orgName": "Phone applications"
}
]
}
Response Parameters
Name |
Type |
Description |
---|---|---|
result |
Array |
An array of session organization objects. |
recentOrgs |
Array |
An array of recently accessed orgs. |
Result Array Object
Response results will differ between a user-based session and an application-based session.
Name |
Type |
Description |
---|---|---|
orgId |
String |
The organization object Id. |
orgKey |
String |
The organization key. |
subOrgs |
Array |
An array of sub organizations. |
roles |
Array |
An array of role object Ids. |
RecentOrgs Array Object
Response results will differ between a user-based session and an application-based session.
Name |
Type |
Description |
---|---|---|
orgId |
String |
The organization object Id. |
orgKey |
String |
The organization key. |
orgName |
String |
The organization name. |