Skip to main content
You're reading Identity & Access Management 7.0.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

Session management API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/users/v1

The User Session Management API (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

authorizationCode flow, token URL http://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

admin​

Operations available for privileged users, to be invoked on behalf of another user.

Retrieve active sessions of a given user​

GET /{user-id}/sessions

Retrieves information related to the active sessions of a user identified by the user-id.

Scope(Permission) required: internal_session_view

Parameters

NameInTypeRequiredDescription
user-idpathstringYes

ID of the user.

limitqueryinteger (int32)

Maximum number of records to return. This parameter is not supported yet.

offsetqueryinteger (int32)

Number of records to skip for pagination. This parameter is not supported yet.

filterquerystring

Condition to filter the retrieval of records. This parameter is not supported yet.

sortquerystring

Define the order in which the retrieved records should be sorted. This parameter is not supported yet.

Responses

CodeDescriptionSchema
200

Successfully retrieved session information.

Sessions
400

Invalid input request

Error
401

Unauthorized

403

Resource Forbidden

404

Resource Not Found

500

Internal Server Error

Error

Terminate all sessions of a given user​

DEL /{user-id}/sessions

Delete all the sessions of a user identified by the user-id.

Scope(Permission) required: internal_session_delete

Parameters

NameInTypeRequiredDescription
user-idpathstringYes

ID of the user.

Responses

CodeDescriptionSchema
204

No Content

400

Invalid input request

Error
401

Unauthorized

500

Internal Server Error

Error

Retrieve a given active session of a given user​

GET /{user-id}/sessions/{session-id}

Retrieves information related to the active session identified by session-id of a user identified by the user-id.

Scope(Permission) required: internal_session_view

Parameters

NameInTypeRequiredDescription
user-idpathstringYes

ID of the user.

session-idpathstringYes

ID of the session.

Responses

CodeDescriptionSchema
200

Successfully retrieved session information.

Session
401

Unauthorized

403

Resource Forbidden

404

Resource Not Found

500

Internal Server Error

Error

Terminate a given session of a given user​

DEL /{user-id}/sessions/{session-id}

Terminate a specific session of a user by the session-id.

Scope(Permission) required: internal_session_delete

Parameters

NameInTypeRequiredDescription
user-idpathstringYes

ID of the user.

session-idpathstringYes

ID of the session.

Responses

CodeDescriptionSchema
204

No Content

400

Invalid input request

Error
401

Unauthorized

500

Internal Server Error

Error

sysadmin​

Operations available for privileged users, to be invoked for system management.

Retrieve all active sessions​

GET /sessions

Retrieves information related to the active sessions on the system.

Scope(Permission) required: internal_session_view

Parameters

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrieval of records. The filter parameter must contain at least one valid expression (for multiple expressions they must be combined using the 'and' logical operator). Each expression must contain an attribute name followed by an attribute operator and a value (attribute names, operators and values used in filters are case insensitive).

The operators supported in the expression are listed next

OperatorDescriptionBehavior
eqequalThe attribute and operator values must be identical for a match.
swstarts withThe entire operator value must be a substring of the attribute value, starting at the beginning of the attribute value.
ewends withThe entire operator value must be a substring of the attribute value, matching at the end of the attribute value.
cocontainsThe entire operator value must be a substring of the attribute value for a match.
leless than or equal toIf the attribute value is less than or equal to the operator value, there is a match.
gegreater than or equal toIf the attribute value is greater than or equal to the operator value, there is a match.

The attributes supported in the expression are listed next

NameOperatorsDescription
loginIdeq, sw, ew, coFilter results by the login identifier of the user who owns the session.
sessionIdeq, sw, ew, coFilter results by the ID of the session.
appNameeq, sw, ew, coFilter results by the name of the application related to the session.
ipAddresseqFilter results by the IP address of the session.
userAgenteq, sw, ew, coFilter results by the user agent of the session.
loginTimele, geFilter results by the login time of the session.
lastAccessTimele, geFilter results by the last access time of the session.

Example, filter=loginId eq john and userAgent co Chrome

limitqueryinteger (int32)

Maximum number of records to return. Default value: 20

sincequeryinteger (int64)

Unix timestamp data value that points to the start of the range of data to be returned. Note: As results are ordered by more recent first this will provide previous page of results.

untilqueryinteger (int64)

Unix timestamp data value that points to the end of the range of data to be returned. Note: As results are ordered by more recent first this will provide next page of results.

Responses

CodeDescriptionSchema
200

Successfully retrieved session information.

SearchResponse
400

Invalid input request

Error
401

Unauthorized

403

Resource Forbidden

500

Internal Server Error

Error

Schemas​

Application​

Type: object

4 properties
NameTypeRequiredDescription
idstringYes

Unique ID of the application.

subjectstringYes

Username of the logged in user for the application.

appNamestringYes

Name of the application.

appIdstringYes

ID of the application.

Session​

Type: object

8 properties
NameTypeRequiredDescription
userIdstring

ID of the user of the session.

idpNamestring

Identity provider name that the session authenticated. Will only be returned for federated authentication sessions.

applicationsarray of Application

List of applications in the session.

userAgentstring

User agent of the session.

ipstring

IP address of the session.

loginTimestring

Login time of the session.

lastAccessTimestring

Last access time of the session.

idstring

ID of the session.

Sessions​

Type: object

2 properties
NameTypeRequiredDescription
userIdstring
sessionsarray of Session

List of active sessions.

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

SearchResponse​

Type: object

3 properties
NameTypeRequiredDescription
previousstring (uri)

Endpoint that will return the previous page of data. If not included, this is the first page of data.

nextstring (uri)

Endpoint that will return the next page of data. If not included, this is the last page of data.

Resourcesarray of Session

Was this page helpful?