LightningWeb.API.RunController (Lightning v2.15.0-pre5)
View SourceAPI controller for managing runs.
Query Parameters
page- Page number (default: 1)page_size- Number of items per page (default: 10)inserted_after- Filter runs created after this ISO8601 datetimeinserted_before- Filter runs created before this ISO8601 datetimeupdated_after- Filter runs updated after this ISO8601 datetimeupdated_before- Filter runs updated before this ISO8601 datetime
Examples
GET /api/runs?page=1&page_size=20
GET /api/runs?inserted_after=2024-01-01T00:00:00Z
GET /api/runs?inserted_after=2024-01-01T00:00:00Z&inserted_before=2024-12-31T23:59:59Z
GET /api/projects/:project_id/runs?inserted_after=2024-01-01T00:00:00Z
Summary
Functions
@spec index(Plug.Conn.t(), map()) :: Plug.Conn.t()
Lists runs with optional project filtering.
This function has two variants:
- With
project_id: Returns runs for a specific project - Without
project_id: Returns runs across all accessible projects
Returns a paginated list of runs with optional datetime filtering.
Parameters
conn- The Plug connection struct with the current resource assignedparams- Map containing:project_id- Project UUID (optional, filters to specific project)page- Page number (optional, default: 1)page_size- Items per page (optional, default: 10)inserted_after- Filter runs created after ISO8601 datetime (optional)inserted_before- Filter runs created before ISO8601 datetime (optional)updated_after- Filter runs updated after ISO8601 datetime (optional)updated_before- Filter runs updated before ISO8601 datetime (optional)
Returns
- Renders JSON with paginated list of runs
404 Not Foundif project doesn't exist (when project_id provided)403 Forbiddenif user lacks project access (when project_id provided)422 Unprocessable Entityif datetime parameters are invalid
Examples
# All runs accessible to user
GET /api/runs
GET /api/runs?page=2&page_size=50
GET /api/runs?inserted_after=2024-01-01T00:00:00Z
# Runs for specific project
GET /api/projects/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/runs
GET /api/projects/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/runs?page=2
GET /api/projects/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/runs?inserted_after=2024-01-01T00:00:00Z
@spec show(Plug.Conn.t(), map()) :: Plug.Conn.t()
Retrieves a specific run by ID.
Returns detailed information about a single run including its associated work order and workflow. Access is granted if the user has access to the run's parent project.
Parameters
conn- The Plug connection struct with the current resource assignedparams- Map containing:id- Run UUID (required)
Returns
200 OKwith run JSON including work order and workflow404 Not Foundif run doesn't exist403 Forbiddenif user lacks project access
Examples
GET /api/runs/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d