latestOpenAPI 3.0.12026-08-10434791.3 KB

4eedf1838ef4

Attempt

Start a workflow execution as a new session or a new attempt of an existing session

"resume" is used to rerun an attempt. It is used in the case an attempt failed then users want to resume it from the middle.It has two modes "failed" or "from" to set the way to resume.In "failed" mode, the attempt specified by "attemptId" is resumed from the failed tasks.In "from" mode, the attempt is resumed from the task which is set in "from" field.

put/api/attempts

Request body

allowQueueingboolean

Whether an attempt can be queued when the maximum attempt limit is reached.

paramsobject required

parameters as json

projectNamestring

project name. workflowId or (projectName and workflowName) are required

retryAttemptNamestring

unique attempt name for retry

sessionTimestring date-time required

session time

workflowIdstring

workflow ID. workflowId or (projectName and workflowName) are required

workflowNamestring

workflow name. workflowId or (projectName and workflowName) are required

Example request

{
  "params": {
    "key1": 12345
  },
  "projectName": "project-a",
  "resume": {
    "attemptId": "12345",
    "mode": "failed"
  },
  "sessionTime": "2023-08-17T18:56:24+09:00",
  "workflowId": "123456",
  "workflowName": "workflow-a"
}

Response

return an attempt

cancelRequestedboolean required

true if kill requested

createdAtstring date-time required

created time

doneboolean required

true if the attempt finished

finishedAtstring date-time

finished time

idstring required

attempt ID

indexinteger required

index for multiple attempts

paramsobject required

passed parameters as JSON

poolIdstring

ID of the pool to which this attempt is assigned.

retryAttemptNamestring required

attempt name for retry

sessionIdstring required

session ID

sessionTimestring required

session time

sessionUuidstring uuid required

unique UUID of this session

status'blocked' | 'queued' | 'running' | 'canceling' | 'success' | 'error' | 'killed' required

The current status of the attempt.

successboolean required

true if the attempt finished successfully

Example response

{
  "createdAt": "2023-08-18T06:52:33Z",
  "finishedAt": "2023-08-18T06:52:33Z",
  "id": "123456",
  "index": 1,
  "poolId": "42",
  "project": {
    "id": "123456",
    "name": "abcdefg"
  },
  "retryAttemptName": "retry-12345",
  "sessionId": "123456",
  "sessionTime": "2022-12-31T23:59:00+00:00",
  "sessionUuid": "2b91a014-076e-4c6d-8b51-f4f91089cab2",
  "status": "running",
  "workflow": {
    "id": "123456",
    "name": "abcdefg"
  }
}