auth.sessions¶
Returns list of active auth sessions.
Example of return value:
- [ {
“id”: “NyhB1J5vjPjIV82yZ6caU12HLA1boDJcZNWuVQM4hQWuiyUWMGZTz2ElDp7Yk87d”, “origin”: “192.168.0.3:40392”, “credentials”: “LOGIN_PASSWORD”, “credentials_data”: {“username”: “root”}, “current”: True, “internal”: False, “created_at”: {“$date”: 1545842426070} }
]
credentials can be UNIX_SOCKET, ROOT_TCP_SOCKET, LOGIN_PASSWORD, API_KEY or TOKEN, depending on what authentication method was used. For UNIX_SOCKET and LOGIN_PASSWORD logged-in username field will be provided in credentials_data. For API_KEY corresponding api_key will be provided in credentials_data. For TOKEN its parent credential will be provided in credentials_data.
If you want to exclude all internal connections from the list, call this method with following arguments:
- [ [
[“internal”, “=”, True] ]
]
No Additional Items
Tuple Validation
Parameter 1: filters
filters
Type: array Default: []No Additional Items
Each item of this array must be:
Parameter 2: options
options
Type: objectNo Additional Properties
Relationships
Type: boolean Default: trueExtend
Default: nullExtend Context
Default: nullPrefix
Default: nullExtra
Type: object Default: {}Order By
Type: array of string Default: []No Additional Items
Each item of this array must be:
Select
Type: array Default: []No Additional Items
Each item of this array must be:
No Additional Items
Each item of this array must be:
Count
Type: boolean Default: falseGet
Type: boolean Default: falseOffset
Type: integer Default: 0Limit
Type: integer Default: 0Force Sql Filters
Type: boolean Default: falseResult
No Additional Items
Each item of this array must be:
AuthSessionsQueryResultItem
Type: objectNo Additional Properties
Id
Type: stringCurrent
Type: booleanInternal
Type: booleanOrigin
Type: stringCredentials
Type: enum (of string)Must be one of:
- "UNIX_SOCKET"
- "LOGIN_PASSWORD"
- "LOGIN_TWOFACTOR"
- "LOGIN_ONETIME_PASSWORD"
- "API_KEY"
- "TOKEN"
- "TRUENAS_NODE"
Credentials Data
BaseCredentialData
Type: objectUserCredentialData
Type: objectNo Additional Properties
Username
Type: stringLogin At
Type: stringFormat: date-timeAPIKeyCredentialData
Type: objectNo Additional Properties
Username
Type: stringLogin At
Type: stringFormat: date-timeAPIKeySessionData
Type: objectNo Additional Properties
Id
Type: integerName
Type: stringTokenCredentialData
Type: objectNo Additional Properties
TokenParentCredentialsData
Type: objectNo Additional Properties
Credentials
Type: enum (of string)Must be one of:
- "UNIX_SOCKET"
- "LOGIN_PASSWORD"
- "LOGIN_TWOFACTOR"
- "API_KEY"
- "TOKEN"
- "TRUENAS_NODE"
Credentials Data
BaseCredentialData
Type: objectUserCredentialData
Type: objectNo Additional Properties
Username
Type: stringLogin At
Type: stringFormat: date-timeAPIKeyCredentialData
Type: objectNo Additional Properties
Username
Type: stringLogin At
Type: stringFormat: date-timeTokenCredentialData
Type: objectNo Additional Properties
Username
Username
Created At
Type: stringFormat: date-timeSecure Transport
Type: booleanAuthSessionsQueryResultItem
Type: objectNo Additional Properties
Id
Type: stringCurrent
Type: booleanInternal
Type: booleanOrigin
Type: stringCredentials
Type: enum (of string)Must be one of:
- "UNIX_SOCKET"
- "LOGIN_PASSWORD"
- "LOGIN_TWOFACTOR"
- "LOGIN_ONETIME_PASSWORD"
- "API_KEY"
- "TOKEN"
- "TRUENAS_NODE"
Credentials Data
Created At
Type: stringFormat: date-timeSecure Transport
Type: booleanRequired roles: AUTH_SESSIONS_READ