Skip to content

Job run execution, monitoring, and lifecycle.

GET/me/jobs/runs

List my job runs

Returns all job runs that the authenticated user can access based on their team memberships and role permissions.

Parameters

limitinteger
limit

The maximum number of items to list.

Type
integer
Format
"int32"
Minimum
0
Maximum
100
Default
100
markerstring
marker

The pagination token returned from the previous list operation.

Type
string
Responses

Responses​

The list of job runs accessible by the current user is returned.

application/json
JSON
{
  
"total": 0,
  
"items": [
  
  
{
  
  
  
"id": "A1B2C3D4E5",
  
  
  
"jobId": "A1B2C3D4E5",
  
  
  
"jobVersion": 3,
  
  
  
"status": "string",
  
  
  
"statusMessage": "string",
  
  
  
"resourceCleanupMode": "always",
  
  
  
"dispatchedAt": "string",
  
  
  
"finishedAt": "string",
  
  
  
"runnerStartedAt": "string",
  
  
  
"runnerCompletedAt": "string",
  
  
  
"runnerExecutionTimeUs": 45200000,
  
  
  
"trigger": "manual",
  
  
  
"createdAt": "string",
  
  
  
"createdBy": "A1B2C3D4E5",
  
  
  
"updatedAt": "string",
  
  
  
"results": {
  
  
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
  
  
},
  
  
  
"updatedBy": "A1B2C3D4E5",
  
  
  
"cleanedAt": "string",
  
  
  
"workloadConfigId": "A1B2C3D4E5",
  
  
  
"retainedUntil": "string",
  
  
  
"retainedUntilMax": "string",
  
  
  
"logicalTime": "2026-09-19T10:00:00Z",
  
  
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
  
  
"restarts": {
  
  
  
  
"count": 2,
  
  
  
  
"involuntaryCount": 1,
  
  
  
  
"lastAt": "string",
  
  
  
  
"lastCause": "runner_failed"
  
  
  
},
  
  
  
"terminationReason": "string",
  
  
  
"exitCode": 0,
  
  
  
"attempt": 1
  
  
}
  
],
  
"marker": "string"
}
GET/workloads/jobs/{job}/runs

List job runs

Returns a paginated list of runs for a specific job, ordered by creation time. Includes status, timing, and trigger information for each run.

Parameters

limitinteger
limit

The maximum number of items to list.

Type
integer
Format
"int32"
Minimum
0
Maximum
100
Default
100
markerstring
marker

The pagination token returned from the previous list operation.

Type
string
Responses

Responses​

The list of LakeSail job runs is returned.

application/json
JSON
{
  
"total": 0,
  
"items": [
  
  
{
  
  
  
"id": "A1B2C3D4E5",
  
  
  
"jobId": "A1B2C3D4E5",
  
  
  
"jobVersion": 3,
  
  
  
"status": "string",
  
  
  
"statusMessage": "string",
  
  
  
"resourceCleanupMode": "always",
  
  
  
"dispatchedAt": "string",
  
  
  
"finishedAt": "string",
  
  
  
"runnerStartedAt": "string",
  
  
  
"runnerCompletedAt": "string",
  
  
  
"runnerExecutionTimeUs": 45200000,
  
  
  
"trigger": "manual",
  
  
  
"createdAt": "string",
  
  
  
"createdBy": "A1B2C3D4E5",
  
  
  
"updatedAt": "string",
  
  
  
"results": {
  
  
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
  
  
},
  
  
  
"updatedBy": "A1B2C3D4E5",
  
  
  
"cleanedAt": "string",
  
  
  
"workloadConfigId": "A1B2C3D4E5",
  
  
  
"retainedUntil": "string",
  
  
  
"retainedUntilMax": "string",
  
  
  
"logicalTime": "2026-09-19T10:00:00Z",
  
  
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
  
  
"restarts": {
  
  
  
  
"count": 2,
  
  
  
  
"involuntaryCount": 1,
  
  
  
  
"lastAt": "string",
  
  
  
  
"lastCause": "runner_failed"
  
  
  
},
  
  
  
"terminationReason": "string",
  
  
  
"exitCode": 0,
  
  
  
"attempt": 1
  
  
}
  
],
  
"marker": "string"
}
POST/workloads/jobs/{job}/runs

Create a job run

Triggers a new execution of the job using its currently active version configuration. The run is placed in a pending state until released or automatically dispatched by the scheduler. Send an Idempotency-Key header to make a retry of this request return the same run instead of a second one.

Parameters

jobrequired
job*

A LakeSail job ID.

Required
Idempotency-Keystring
Idempotency-Key

A key the caller chooses to make a retried request safe. The first request with a
key creates the run. A later request from the same member with the same key for
the same job creates nothing and returns that run with status 200, so a caller
that lost the response can send the request again. The request must match the
first one; a different request with a used key, or any request from another
member with it, is refused with 409. Keys are kept for the life of the run.

Type
string
Example"orchestrator:daily_etl:load:2026-09-19T00:00:00+00:00:1"
Min Length
1
Max Length
255

Request Body​

application/json
JSON
{
  
"parameters": {
  
  
"additionalProperties": "string"
  
},
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"hold": true,
  
"resourceCleanupMode": "always",
  
"workloadConfigId": "A1B2C3D4E5"
}
Responses

Responses​

The request repeats an earlier one with the same Idempotency-Key. Nothing was created; this is the run the earlier request created.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
GET/workloads/jobs/{job}/runs/{jobRun}

Describe a job run

Returns the full details of a job run, including its current status, timing information, and execution results.

Parameters

jobrequired
job*

A LakeSail job ID.

Required
jobRunrequired
jobRun*

A LakeSail job run ID.

Required
Responses

Responses​

The LakeSail job run is returned.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"hold": true,
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"parameters": {
  
  
"additionalProperties": "string"
  
},
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"idempotencyKey": "orchestrator:daily_etl:load:2026-09-19T00:00:00+00:00:1",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
POST/workloads/jobs/{job}/runs/{jobRun}/cancel

Cancel a job run

Stops a job run that has not finished. The run moves to cancelled, its
runner is stopped regardless of resourceCleanupMode, its remaining
resources follow that mode, and the job_run.status.cancelled notification
fires.

Idempotent: a run that is already in a terminal status (succeeded,
failed, cancelled or timeout) is returned unchanged, so a caller can
cancel on every teardown path without checking first.

A run cancelled while its resources are still being created finishes
cleaning them up shortly after the response.

Stopping is not instant: the job code can keep executing for up to about half
a minute. cancelled means the run was stopped and its compute released, not
that the code had no effect. If the code finishes in that window the run stays
cancelled, with its runner timings and results recorded.

Responses

Responses​

The job run. Its status is cancelled, or the terminal status it already had when the request arrived.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
PUT/workloads/jobs/{job}/runs/{jobRun}/retention

Set how long a job run's resources are retained

A run whose resourceCleanupMode retains its resources keeps its Sail server
and namespace after it ends, for debugging. The Sail server keeps running
while they are retained, and that compute is billed.

Sets retainedUntil to the given time, earlier or later than the current one.
It must be in the future and no later than the run's retainedUntilMax. To
end the retention now, use EndJobRunRetention.

Refused with 409 while the run is still executing, when it retains
nothing, and once its retention has ended. Refused with 400 when retainedUntil is in the past or past the
maximum.

Request Body​

application/json
JSON
{
  
"retainedUntil": "string"
}
Responses

Responses​

The job run, carrying the new retainedUntil.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
DELETE/workloads/jobs/{job}/runs/{jobRun}/retention

End a job run's retention now

Ends the retention of a run whose resourceCleanupMode retained its
resources: its Sail server and namespace are cleaned up now, logs included,
and the run stays on record. Removal is not instant: cleanedAt is set once
they are gone.

Refused with 409 while the run is still executing, and when it retains
nothing.

Responses

Responses​

The requested operation was done successfully.

POST/workloads/jobs/{job}/runs/{jobRun}/ready

Release a pending job run for execution

Transitions a job run from pending to ready, making it eligible for execution.
Use this when orchestrating job runs that were created in pending status and
should be released once their dependencies are satisfied.
Returns 409 if the run is not in pending status or its compute profile has
an external data target operation in progress.

Responses

Responses​

The job run has been released and is now in ready status.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
POST/workloads/jobs/{job}/runs/{jobRun}/retry

Retry a job run

Resets a terminal job run so it can be executed again.
The run keeps its original ID, version, parameters, and audit trail.

The run's status must be failed, timeout, or cancelled. By default
the run transitions to ready (immediately eligible for execution).
If hold is true in the request body, the run transitions to pending
instead, requiring a subsequent Release call before execution.

Returns 409 if the run is not in an allowed terminal status or its compute
profile has an external data target operation in progress.

Request Body​

application/json
JSON
{
  
"hold": true
}
Responses

Responses​

The job run has been reset. Its status is ready (eligible for execution) or pending (held until released) depending on the hold flag in the request.

application/json
JSON
{
  
"id": "A1B2C3D4E5",
  
"jobId": "A1B2C3D4E5",
  
"jobVersion": 3,
  
"status": "string",
  
"statusMessage": "string",
  
"resourceCleanupMode": "always",
  
"dispatchedAt": "string",
  
"finishedAt": "string",
  
"runnerStartedAt": "string",
  
"runnerCompletedAt": "string",
  
"runnerExecutionTimeUs": 45200000,
  
"trigger": "manual",
  
"createdAt": "string",
  
"createdBy": "A1B2C3D4E5",
  
"updatedAt": "string",
  
"results": {
  
  
"outputPath": "s3://lakesail-output/jobs/daily-sales-etl/runs/2026-04-06/"
  
},
  
"updatedBy": "A1B2C3D4E5",
  
"cleanedAt": "string",
  
"workloadConfigId": "A1B2C3D4E5",
  
"retainedUntil": "string",
  
"retainedUntilMax": "string",
  
"logicalTime": "2026-09-19T10:00:00Z",
  
"webUrl": "https://platform.lakesail.com/acme/jobs/JOBABC123/runs/RUNABC123",
  
"restarts": {
  
  
"count": 2,
  
  
"involuntaryCount": 1,
  
  
"lastAt": "string",
  
  
"lastCause": "runner_failed"
  
},
  
"terminationReason": "string",
  
"exitCode": 0,
  
"attempt": 1
}
POST/workloads/jobs/{job}/runs/{jobRun}/logs/stream

Issue a job run log stream

Issues a short-lived token and URL for streaming the live log of one of the job run's pods, selected by source, from the customer-side session proxy. Available while the run is live and, after it finishes, until the run's resources are cleaned up; once cleaned, the endpoint returns 410. Returns 409 while the selected pod is not yet running (retry shortly) or when the cluster requires re-provisioning for live logs.

Parameters

sourcestring
source

Which of the run's pods to stream. runner (default) is the job runner that submits the work; engine is the Sail driver that executes it, where engine-side failures such as out-of-memory kills and panics appear.

Type
string
Valid values
"runner""engine"
Default
"runner"
Responses

Responses​

Connection details for the job run's live log stream.

application/json
JSON
{
  
"url": "string",
  
"token": "string",
  
"expiresAt": "string",
  
"pod": "string"
}

Can't find the answer here? Email us: support@lakesail.com