Skip to content

Backfill sessions for past schedule times

Request

Security
ApiKeyAuth
Path
idinteger, (int32)required

session id

Bodyapplication/json
advanceScheduleboolean

If true, advance nextScheduleTime/nextRunTime. When fromTime is not set, uses the current schedule's nextRunTime as starting point. Requires skipExisting to be true.

attemptNamestring

attempt name. Optional when skipExisting is true. Cannot be specified when advanceSchedule is true.

countinteger, (int32)

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

dryRunbooleanrequired

dry run

fromTimestring, (date-time)

backfill from

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

If true, silently skip sessions that already have attempts instead of returning 409 conflict error. Note that when count is set, skipped sessions are still counted towards the count.

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

Responses

default response

Bodyapplication/json
attemptsArray of objects(RestSessionAttempt)required

List of attempts

idstringrequired

schedule ID

Example:"123456"
projectobject(IdAndName)required

Name and ID

workflowobject(IdAndName)required

Name and ID

Response
{ "attempts": [ {} ], "id": "123456", "project": { "id": "123456", "name": "abcdefg" }, "workflow": { "id": "123456", "name": "abcdefg" } }