Tasks
A task is the lowest unit of execution for a pipeline. A task execution is the tracking of a task, which is to say a task execution is simply the tracking of the container that is in the act of being executed.
List all task executions
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasksReturns a list of all task executions by run.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
include_secret | boolean | no | Return credentials in plaintext instead of redacted. Admin only. |
Responses
| Status | Body | Description |
|---|---|---|
200 | ListTaskExecutionsResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Get task execution by id
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasks/{task_id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
task_id | string | yes | The unique identifier for the target task execution. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
include_secret | boolean | no | Return credentials in plaintext instead of redacted. Admin only. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GetTaskExecutionResponse | successful operation |
4XX | Error | Error |
5XX | Error | Error |
Cancel a task execution by id
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasks/{task_id}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
task_id | string | yes | The unique identifier for the target task execution. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
wait_for | integer | yes | Period of time to wait the task before forcing it to cancel. 0 means send SIGKILL instantly. |
Responses
Run command on a running task execution container
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasks/{task_id}/attachThis allows you to run a command on a task execution container and connect to the stdin and stdout/err for said container.
Useful for debugging.
This endpoint upgrades the connection to a websocket: after the 101 response the server streams data over the socket instead of returning a body.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
task_id | string | yes | The unique identifier for the target task execution. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
command | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
101 | none | Negotiating protocol upgrade from HTTP/1.1 to WebSocket |
4XX | Error | Error |
5XX | Error | Error |
Retrieves logs from a task execution
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasks/{task_id}/logsThis endpoint upgrades the connection to a websocket: after the 101 response the server streams data over the socket instead of returning a body.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
task_id | string | yes | The unique identifier for the target task execution. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
tail | integer | no | Only send this many lines from the end of the log, then keep following it if the task is still running. Leave it out to get the whole log. |
Responses
| Status | Body | Description |
|---|---|---|
101 | none | Negotiating protocol upgrade from HTTP/1.1 to WebSocket |
4XX | Error | Error |
5XX | Error | Error |
Removes a task execution's associated log object
/api/namespaces/{namespace_id}/pipelines/{pipeline_id}/runs/{run_id}/tasks/{task_id}/logsThis is useful for if logs mistakenly contain sensitive data.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespace_id | string | yes | The unique identifier for the target namespace. |
pipeline_id | string | yes | The unique identifier for the target pipeline. |
run_id | integer | yes | The unique identifier for the target run. |
task_id | string | yes | The unique identifier for the target task execution. |
Responses