Skip to content

Treasure Workflow (1.0)

Treasure Workflow

Download OpenAPI description
Languages
Servers
Mock server
https://docs.treasuredata.com/_mock/apis/workflow
aws
https://api-workflow.treasuredata.com
aws-tokyo
https://api-workflow.treasuredata.co.jp
eu01
https://api-workflow.eu01.treasuredata.com
ap02
https://api-workflow.ap02.treasuredata.com
ap03
https://api-workflow.ap03.treasuredata.com

Attempt

Operations

Log

Operations

Project

Operations

Schedule

Operations

List schedules

Request

Security
ApiKeyAuth
Query
last_idinteger(int32)

List schedules whose ID is greater than this ID for pagination. Schedules are returned in ascending order by ID.

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules?last_id=0' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
schedulesArray of objects(RestSchedule)
Response
application/json
{ "schedules": [ {} ] }

Get a schedule

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

schedule id

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules/{id}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
disabledAtstring(date-time)

disabled time

Example: "2023-08-18T06:52:33Z"
idstringrequired

schedule ID

Example: "123456"
nextRunTimestring(date-time)required

next run time

Example: "2023-08-18T06:52:33Z"
nextScheduleTimestringrequired

next schedule time

Example: "2022-12-31T23:59:00+00:00"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
workflowobject(IdAndName)required

Name and ID

workflow.​idstringrequired

ID

Example: "123456"
workflow.​namestringrequired

name

Example: "abcdefg"
Response
application/json
{ "disabledAt": "2023-08-18T06:52:33Z", "id": "123456", "nextRunTime": "2023-08-18T06:52:33Z", "nextScheduleTime": "2022-12-31T23:59:00+00:00", "project": { "id": "123456", "name": "abcdefg" }, "workflow": { "id": "123456", "name": "abcdefg" } }

Re-schedule past sessions by count or duration

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

session id

Bodyapplication/json
attemptNamestringrequired

attempt name

countinteger(int32)

starts given number of sessions. run all sessions if not set.

dryRunbooleanrequired

dry run

fromTimestring(date-time)required

backfill from

Example: "2023-08-18T06:52:33Z"
curl -i -X POST \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules/{id}/backfill' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "attemptName": "string",
    "count": 0,
    "dryRun": true,
    "fromTime": "2023-08-18T06:52:33Z"
  }'

Responses

default response

Bodyapplication/json
attemptsArray of objects(RestSessionAttempt)required

List of attempts

attempts[].​cancelRequestedbooleanrequired

true if kill requested

attempts[].​createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
attempts[].​donebooleanrequired

true if the attempt finished

attempts[].​finishedAtstring(date-time)

finished time

Example: "2023-08-18T06:52:33Z"
attempts[].​idstringrequired

attempt ID

Example: "123456"
attempts[].​indexinteger(int32)required

index for multiple attempts

Example: 1
attempts[].​paramsobjectrequired

passed parameters as JSON

attempts[].​poolIdstring

ID of the pool to which this attempt is assigned.

Example: "42"
attempts[].​projectobject(IdAndName)required

Name and ID

attempts[].​project.​idstringrequired

ID

Example: "123456"
attempts[].​project.​namestringrequired

name

Example: "abcdefg"
attempts[].​retryAttemptNamestringrequired

attempt name for retry

Example: "retry-12345"
attempts[].​sessionIdstringrequired

session ID

Example: "123456"
attempts[].​sessionTimestringrequired

session time

Example: "2022-12-31T23:59:00+00:00"
attempts[].​sessionUuidstring(uuid)required

unique UUID of this session

Example: "2b91a014-076e-4c6d-8b51-f4f91089cab2"
attempts[].​statusstringrequired

The current status of the attempt.

Enum"queued""running""canceling""success""error""killed"
Example: "running"
attempts[].​successbooleanrequired

true if the attempt finished successfully

attempts[].​workflowobject(NameOptionalId)required

Name and optional ID

attempts[].​workflow.​idstring

ID

Example: "123456"
attempts[].​workflow.​namestringrequired

name

Example: "abcdefg"
idstringrequired

schedule ID

Example: "123456"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
workflowobject(IdAndName)required

Name and ID

workflow.​idstringrequired

ID

Example: "123456"
workflow.​namestringrequired

name

Example: "abcdefg"
Response
application/json
{ "attempts": [ {} ], "id": "123456", "project": { "id": "123456", "name": "abcdefg" }, "workflow": { "id": "123456", "name": "abcdefg" } }

Disable scheduling of new sessions

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

session id

curl -i -X POST \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules/{id}/disable' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
disabledAtstring(date-time)

disabled time

Example: "2023-08-18T06:52:33Z"
idstringrequired

schedule ID

Example: "123456"
nextRunTimestring(date-time)required

next run time

Example: "2023-08-18T06:52:33Z"
nextScheduleTimestringrequired

next schedule time

Example: "2022-12-31T23:59:00+00:00"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
workflowobject(IdAndName)required

Name and ID

workflow.​idstringrequired

ID

Example: "123456"
workflow.​namestringrequired

name

Example: "abcdefg"
Response
application/json
{ "createdAt": "2023-08-18T06:52:33Z", "disabledAt": "2023-08-18T06:52:33Z", "id": "123456", "nextRunTime": "2023-08-18T06:52:33Z", "nextScheduleTime": "2022-12-31T23:59:00+00:00", "project": { "id": "123456", "name": "abcdefg" }, "updatedAt": "2023-08-18T06:52:33Z", "workflow": { "id": "123456", "name": "abcdefg" } }

Re-enable disabled scheduling

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

session id

Body*/*
nextTimestring

time to skip

Example: "2022-12-31T23:59:00+00:00"
skipScheduleboolean

skip schedules. default is false.

curl -i -X POST \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules/{id}/enable' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: */*' \
  -d '[object Object]'

Responses

default response

Bodyapplication/json
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
disabledAtstring(date-time)

disabled time

Example: "2023-08-18T06:52:33Z"
idstringrequired

schedule ID

Example: "123456"
nextRunTimestring(date-time)required

next run time

Example: "2023-08-18T06:52:33Z"
nextScheduleTimestringrequired

next schedule time

Example: "2022-12-31T23:59:00+00:00"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
workflowobject(IdAndName)required

Name and ID

workflow.​idstringrequired

ID

Example: "123456"
workflow.​namestringrequired

name

Example: "abcdefg"
Response
application/json
{ "createdAt": "2023-08-18T06:52:33Z", "disabledAt": "2023-08-18T06:52:33Z", "id": "123456", "nextRunTime": "2023-08-18T06:52:33Z", "nextScheduleTime": "2022-12-31T23:59:00+00:00", "project": { "id": "123456", "name": "abcdefg" }, "updatedAt": "2023-08-18T06:52:33Z", "workflow": { "id": "123456", "name": "abcdefg" } }

Skip future sessions by count or time

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

session id

Bodyapplication/json
countinteger(int32)

skip given number of sessions. nextTime or (fromTime and count) are required.

dryRunbooleanrequired

dry run

fromTimestring(date-time)

skip before the time. nextTime or (fromTime and count) are required.

Example: "2023-08-18T06:52:33Z"
nextRunTimestring(date-time)

next run time

Example: "2023-08-18T06:52:33Z"
nextTimestring

next time. nextTime or (fromTime and count) are required.

Example: "2022-12-31T23:59:00+00:00"
curl -i -X POST \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/schedules/{id}/skip' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "count": 0,
    "dryRun": true,
    "fromTime": "2023-08-18T06:52:33Z",
    "nextRunTime": "2023-08-18T06:52:33Z",
    "nextTime": "2022-12-31T23:59:00+00:00"
  }'

Responses

default response

Bodyapplication/json
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
disabledAtstring(date-time)

disabled time

Example: "2023-08-18T06:52:33Z"
idstringrequired

schedule ID

Example: "123456"
nextRunTimestring(date-time)required

next run time

Example: "2023-08-18T06:52:33Z"
nextScheduleTimestringrequired

next schedule time

Example: "2022-12-31T23:59:00+00:00"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
workflowobject(IdAndName)required

Name and ID

workflow.​idstringrequired

ID

Example: "123456"
workflow.​namestringrequired

name

Example: "abcdefg"
Response
application/json
{ "createdAt": "2023-08-18T06:52:33Z", "disabledAt": "2023-08-18T06:52:33Z", "id": "123456", "nextRunTime": "2023-08-18T06:52:33Z", "nextScheduleTime": "2022-12-31T23:59:00+00:00", "project": { "id": "123456", "name": "abcdefg" }, "updatedAt": "2023-08-18T06:52:33Z", "workflow": { "id": "123456", "name": "abcdefg" } }

Session

Operations

Workflow

Operations