Manage sessions

You can get and terminate user sessions in your space using the REST API.

Note: To enable the session APIs, submit a support ticket.

Get sessions

Space administrators can retrieve session data for their space. This can help you monitor user activity, analyze license usage, and get the IDs of sessions to terminate.

Endpoint

GET .../api/shared_spaces/{space_id}/sessions

Note: Use the ALM-OCTANE-TECH-PREVIEW=true header key.

Request

You can use query parameters to control the data you retrieve.

Examples are provided in the Filtering, Grouping, and Sorting sections.

Returned fields

The following session fields are available.

Field Description
id Unique identifier for the session.
session_identifier A unique identifier specific to the session.
client_type The type of client used for the session (UI, Integration, CI).
user The user associated with the session, with their full name and email address.
client_ip The IP address of the client used for the session.
access_type The type of access used for the session (UI, API).
creation_time The timestamp when the session was created.
end_time The timestamp when the session ended.
license_type The type of license associated with the user.

Filtering

You can filter sessions by any field.

Note: All requests must also include either a 30‑day creation date range or a session ID.

To get all open sessions:

.../api/shared_spaces/<space_ID>/sessions?query="(end_time=null)"

To filter sessions by user ID:

.../api/shared_spaces/<space_ID>/sessions?fields=session_identifier,client_type,user,creation_time,access_type,license_edition,end_time,client_ip,id&query="(creation_time>^2026-01-28T20:59:59.427Z^;creation_time<^2026-02-26T20:59:59Z^;(user={id=220001}))"

Grouping

You can group session data using the group_by parameter. The following group_by fields are supported: access_type, client_ip, license_edition, session_identifier, user

To group sessions by license type:

.../api/shared_spaces/<space_ID>/sessions/groups?group_by=license_edition&query="(creation_time>^2026-01-28T20:59:59.427Z^;creation_time<^2026-02-26T20:59:59.427Z^)"

Sorting

You can sort session data using the order_by parameter. The following fields are supported: access_type, client_ip, client_type, creation_time, end_time, id, license_edition, session_identifier

To sort sessions in descending order by creation time:

.../api/shared_spaces/<space_ID>/sessions?fields=creation_time,end_time,user&query="(creation_time>^2026-01-28T20:59:59.427Z^;creation_time<^2026-02-26T20:59:59.427Z^)"&order_by=-creation_time

To sort sessions in ascending order by end time:

.../api/shared_spaces/<space_ID>/sessions?fields=creation_time,end_time,user&query="(creation_time>^2026-01-28T20:59:59.427Z^;creation_time<^2026-02-26T20:59:59.427Z^)"&order_by=end_time

Export

You can export filtered session data in XLSX or CSV format using the following APIs:

To export sessions to an XLSX file:

.../api/shared_spaces/<space_ID>/sessions/exports/file.xlsx?fields=id,user,client_type,session_identifier,client_ip,access_type,creation_time,end_time,license_edition&query="(creation_time>^2026-01-28T20:59:59.427Z^)"&timezone=UTC+03:00

To export sessions to a CSV file:

.../api/shared_spaces/<space_ID>/sessions/csv_exports?fields=id,user,client_type,session_identifier,client_ip,access_type,creation_time,end_time,license_edition&query="(creation_time>^2026-01-28T20:59:59.427Z^)"

Back to top

Terminate sessions

Space administrators can terminate one or multiple user sessions. This allows administrators to manage active sessions and control access to the tenant.

Endpoint

PUT .../api/shared_spaces/<space_ID>/sessions/?query="(id='<session_ID>';id='<session_ID>';id='<session_ID>')"

In the query, specify the session IDs that you want to terminate.

Request Body (JSON)

{
   "data": [
     {
       "is_closed": true
     }   
   ]
 }

The API updates the specified sessions by setting the is_closed field to true. When the is_closed field is set, the session end time is automatically updated to the current date and time.

Response

The operation is performed by a background task. To check the status of the background task, you can use the following endpoint, providing the background_task_id returned by the Update Sessions API call.

GET: .../api/shared_spaces/<space_ID>/background_tasks?fields=status,result&query="id=<background_task_ID>"

Permissions and validation

  • Permissions: Only space administrators are authorized to use this API. Site or workspace administrators cannot do this.
  • Validation: The endpoint validates that the target session belongs to the same tenant as the one from which the request is initiated.

Functionality details

  • Bulk and single operations: The API allows terminating one or multiple sessions simultaneously.
  • Partial success: If some session IDs are invalid, the valid ones will still be terminated.

Back to top