Run Sessions represent diagnostic or remediation workflows triggered by users, alerts, or automation. Each Run Session contains one or more Run Requests — individual runbook executions against specific SLXs.
Run Sessions
List Run Sessions
Retrieve all run sessions in a workspace.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
Query Parameters
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
integer |
No |
Page number for pagination |
|
|
integer |
No |
Number of results per page |
|
|
string |
No |
Filter by last modified date (ISO 8601, less than or equal) |
|
|
string |
No |
Filter by runbook name |
Response 200 OK
{
"count": 25,
"next": "https://app.runwhen.com/api/v3/workspaces/my-ws/runsessions?page=2",
"previous": null,
"results": [
{
"id": 123,
"workspace": "my-workspace",
"source": "user",
"isActive": true,
"createdAt": "2026-02-28T10:00:00Z",
"updatedAt": "2026-02-28T10:05:00Z"
}
]
}
Create Run Session
Create a new run session in a workspace.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
Request Body
{
"source": "user"
}
|
Field |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
Source of the run session. One of: |
Response 201 Created
Returns the newly created run session object.
Update Run Session
Add a new run request to an existing run session, or update session metadata.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
integer |
The ID of the run session |
Response 200 OK
Returns the updated run session object.
Get Run Session Issues
Retrieve issues associated with a specific run session.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
integer |
The ID of the run session |
Response 200 OK
Returns a list of issues detected during this run session.
Get Run Session Issue Detail
Retrieve a specific issue from a run session.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
integer |
The ID of the run session |
|
|
integer |
The ID of the issue |
Response 200 OK
Returns the full issue detail.
Update Run Session Issue
Update an issue within a run session.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
integer |
The ID of the run session |
|
|
integer |
The ID of the issue |
Response 200 OK
Returns the updated issue object.
Run Requests
Start Run Request
Start execution of a runbook run request (triggers the runner).
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
string |
The short name of the SLX |
|
|
integer |
The ID of the run request |
Response 200 OK
Returns the started run request with execution details.
Step Run Request
Advance a run request to the next step (for multi-step runbooks).
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
string |
The short name of the SLX |
|
|
integer |
The ID of the run request |
Response 200 OK
Returns the updated run request with current step information.
Get Run Request Status
Check the runner-side execution status of a run request.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
string |
The short name of the SLX |
|
|
integer |
The ID of the run request |
Response 200 OK
Returns the current execution status from the runner.
Mark Run Request Failed
Manually mark a run request as failed.
|
|
|
|---|---|
|
Method |
|
|
Path |
|
|
Auth |
Bearer token required |
Path Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
|
string |
The unique name of the workspace |
|
|
integer |
The ID of the run session |
|
|
integer |
The ID of the run request |
Response 200 OK
Returns the updated run request marked as failed.