session.find
The session.find command is used to obtain information about a session.
TR50 Request
{
"cmd": {
"command": "session.find",
"params": {
"id": "53398c17d15a702a78000003"
}
}
}
Request Parameters
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
id |
String |
Yes |
The object Id of the session. |
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.
{
"cmd": {
"success": true,
"params": {
"id": "5342ba92d15a70272c000003",
"orgId": "52fbe4028a3a515d4aded7f1",
"orgKey": "SYSTEM",
"userId": "52fbe4028a3a515d4aded7f6",
"userName": "admin@example.com",
"whoAmI": "admin@example.com",
"hasSuperAdmin": true,
"hasSuperOps": false,
"hasOrgAdmin": false,
"connInfo": {
"protocol": "http",
"remoteAddr": "127.0.0.1:50061"
},
"ttl": 86400,
"locale": ""
}
}
}
Response Parameters
Response results will differ between a user-based session and an application-based session.
|
Name |
Type |
Description |
|---|---|---|
|
orgId |
String |
A unique identifier for the sessions current organization. |
|
orgKey |
String |
The key of the current session organization. |
|
appId |
String |
In an application session this is a unique identifier for the current application. |
|
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. |
