Sessions

Sessions are used to maintain access to CDF resources for an extended period of time. The methods available to extend a sessions lifetime are client credentials and token exchange. Sessions depend on the project OIDC configuration and may become invalid in the following cases

  • Project OIDC configuration has been updated through the update project endpoint. This action invalidates all of the project's sessions.

  • The session was invalidated through the identity provider.

List sessions

Required capabilities: sessionsAcl:LIST

List all sessions in the current project.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
query Parameters
status
string

If given, only sessions with the given status are returned.

Enum: "ready" "active" "cancelled" "revoked" "access_lost"
cursor
string

Cursor to use for paging through results.

limit
integer <int32> <= 1000
Default: 25

Return up to this many results. Maximum is 1000. Default is 25.

Responses
200

A list of sessions in the current project.

400

The response for a failed request.

get/sessions
Response samples
application/json
{
  • "items": [
    ],
  • "nextCursor": "string",
  • "previousCursor": "string"
}

Create sessions

Required capabilities: sessionsAcl:CREATE

Create sessions

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json

A request containing the information needed to create a session.

Array of CreateSessionWithClientCredentialsRequest (object) or CreateSessionWithTokenExchangeRequest (object) or CreateSessionWithOneshotTokenExchangeRequest (object) (CreateSessionRequest) = 1 items
Responses
200

List of session creation related information

400

The response for a failed request.

post/sessions
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Retrieve sessions with given IDs

Required capabilities: sessionsAcl:LIST

Retrieves sessions with given IDs. The request will fail if any of the IDs does not belong to an existing session.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json

List of session IDs to retrieve

required
Array of objects [ 1 .. 1000 ] items
Responses
200

A list of sessions with the given ids

400

The response for a failed request.

post/sessions/byids
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Revoke sessions

Required capabilities: sessionsAcl:DELETE

Revoke access to a session. Revocation is idempotent. Revocation of a session may in some cases take up to 1 hour to take effect.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json

A request containing the information needed to revoke sessions.

Array of objects (RevokeSessionRequest) non-empty
Responses
200

List of revoked sessions. If the user does not have the sessionsAcl:LIST capability, then only the session IDs will be present in the response.

400

The response for a failed request.

post/sessions/revoke
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}