session.list
The session.list command is used to obtain a list of session.
TR50 Request
{
"cmd": {
"command": "session.list"
}
}
Request Parameters
The command takes no parameters. It only returns an array of all the current organization's sessions.
TR50 Response
If the command is sent successfully a success message and params list is returned. Otherwise, an error and error message will be returned.
The number of records returned is limited to 5000 by the deviceWISE Cloud. If your query returns more results than the limit of the deviceWISE Cloud, you should shorten your time window or lower the number of records you are requesting.
{
"cmd":{
"success":true,
"params":{
"count":42,
"result":[
{
"ref":"d6f4c3cad0017fd3b04863aa37d31051dd127da9a603e9e3647e2c9cb0ff8eaf",
"orgId":"52fbe4028a3a515d4aded7f1",
"orgKey":"SYSTEM",
"userId":"52fbe4028a3a515d4aded7f6",
"userName":"admin@devicewise.com",
"whoAmI":"admin@devicewise.com",
"hasSuperAdmin":true,
"hasSuperOps":false,
"hasOrgAdmin":false,
"connInfo":{
"protocol":"http",
"remoteAddr":"127.0.0.1:50061"
},
"ttl":86400,
"locale":"""allowSubOrgAccess":null,
"startTime":"2021-08-10T14:16:10.976Z",
"orgSwitches":[
{
"orgId":"5cf885f41c5bd771c8065be8",
"orgKey":"BasicORG",
"ts":"2021-08-10T14:43:13.11Z"
},
{
"orgId":"533ef300310046187700007f",
"orgKey":"YorkOrg",
"ts":"2021-08-10T14:43:38.927Z"
},
{
"orgId":"5cf885f41c5bd771c8065be8",
"orgKey":"BasicOrg",
"ts":"2021-08-10T14:45:44.993Z"
}
],
"commandCount":119,
"lastAccessed":"2021-08-10T14:45:46.863Z",
"allAgreementsSigned":false
}
.....
]
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
count | Integer | The total number of session objects. |
result | Array | An array of session objects. |
Result Array Object
Response results will differ between a user-based session and an application-based session.
Name | Type | Description |
---|---|---|
ref | String | Ref is an identifier of the session. |
orgId | String | Org identifier. |
orgKey | String | Org key. |
appName | String | In an application session, this is the name of the current application. |
tokenId | String | In an application session, this is the current applicationToken. |
tokenName | String | In an application session, this is the name of the current applicationToken. |
thingKey | String | In an application session, this is the thingKey of the current Thing. |
userId | String | In a user session, this is a unique identifier for the current user. |
userName | String | In a user session, this is the user name for the current user. |
whoAmI | String | A string identifying the current application or user. |
hasSuperAdmin | Boolean | True if the current session has Super Administration access. |
hasSuperOps | Boolean | True if the current session has Super Ops access. |
hasOrgAdmin | Boolean | True if the current session has Organization Administration access. |
connInfo | Object | Connection details for the current session. |
connInfo.protocol | String | The connection protocol being used. |
connInfo.remoteAddr | String | The remote address of the connection. |
ttl | Integer | TTL value for the current session. |
locale | String | The localization and language setting for the current session. |
perms | Object | Identifies the list of permissions available to the session and the boolean setting. |