Session Commands¶
Note
Session command endpoints provide access to commands executed during user sessions. This includes sudo commands, shell commands, and other executed operations that were captured and logged by the system during monitored sessions.
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique command identifier. |
|
|
string |
Read-only. ID of the session this command belongs to. |
|
|
datetime |
Read-only. Timestamp when the command was executed. |
|
|
string |
Read-only. The actual command that was executed. |
|
|
string |
Read-only. User the command was executed as (for sudo commands). |
|
|
string |
Read-only. Group the command was executed as (for sudo commands). |
|
|
string |
Read-only. ID of the policy that was applied to this command. |
|
|
string |
Read-only. ID of the regex pattern that matched this command. |
|
|
boolean |
Read-only. Expensive to use. Whether the command was approved by policy. |
|
|
string |
Read-only. Hidden. Expensive to use. User ID for permission filtering. |
|
|
datetime |
Read-only. Record creation timestamp. |
|
|
datetime |
Read-only. Last modification timestamp. |
|
|
boolean |
Read-only. Soft delete flag. |
Retrieve Available Attributes of the SessionCommandModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/session_command
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.2.132/api/v2/objspec/session_command'
List Session Commands¶
Retrieve all commands executed during a specific session.
Request
Method |
|
Path |
|
GET /api/v2/session/<session_id>/command
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.2.132/api/v2/session/5980780305148018689/command'
Response (With Commands)
{
"result": "success",
"session_command": [
{
"id": "5980780305148018703",
"session_id": "5980780305148018739",
"occurred_at": "2026-06-09 01:09:15.639699-07",
"command": "\/usr\/bin\/id",
"runas_user": "testuser1",
"runas_group": "testuser1",
"policy_id": "5980780305148018689",
"regexp_id": "5980780305148018689",
"approved": true,
"created_at": "2026-06-09 01:09:15.641225-07",
"modified_at": "2026-06-09 01:09:15.641225-07"
},
{
"id": "5980780305148018705",
"session_id": "5980780305148018739",
"occurred_at": "2026-06-09 01:09:31.990782-07",
"command": "\/usr\/bin\/id",
"runas_user": "root",
"runas_group": "root",
"policy_id": "5980780305148018689",
"regexp_id": "5980780305148018689",
"approved": true,
"created_at": "2026-06-09 01:09:31.992218-07",
"modified_at": "2026-06-09 01:09:31.992218-07"
}
]
}
Get Specific Session Command¶
Retrieve details of a specific command executed during a session.
Request
Method |
|
Path |
|
GET /api/v2/session/<session_id>/command/<id>
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.2.132/api/v2/session/5980780305148018689/command/5980780305148018703'
Success Response
{
"result": "success",
"session_command": [
{
"id": "5980780305148018703",
"session_id": "5980780305148018689",
"occurred_at": "2026-06-09 01:09:15.639699-07",
"command": "\/usr\/bin\/id",
"runas_user": "testuser1",
"runas_group": "testuser1",
"policy_id": "5980780305148018689",
"regexp_id": "5980780305148018689",
"approved": true,
"created_at": "2026-06-09 01:09:15.641225-07",
"modified_at": "2026-06-09 01:09:15.641225-07"
}
]
}