Schedules

Get schedules

Gets a list of schedules.

Request
Security:
ApiKeyAuth
Responses
200

OK

get/schedule/list
Request samples
curl -i -X GET \
  https://api.treasuredata.com/v3/schedule/list \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "schedules": [
    ]
}

Create schedule

Creates a schedule.

Request
Security:
ApiKeyAuth
path Parameters
schedule_name
required
string
Request Body schema: application/x-www-form-urlencoded
cron
string or null
database
required
string

database name

delay
integer or null >= 0
engine_version
string

the version of the query engine for the query, can be a version release name (e.g 'stable') or version number (e.g '0.205')

pool_name
string

resource pool name

priority
integer [ -2 .. 2 ]
retry_limit
integer [ 0 .. 32 ]
query
required
string
result
string

url of the result

timezone
string
type
required
string
Responses
200

OK

post/schedule/create/{schedule_name}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/schedule/create/{schedule_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/x-www-form-urlencoded'
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33.000Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Delete schedule

Deletes a specified schedule.

Request
Security:
ApiKeyAuth
path Parameters
schedule_name
required
string
Responses
200

OK

post/schedule/delete/{schedule_name}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/schedule/delete/{schedule_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33.000Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Update schedule

Updates a schedule.

Request
Security:
ApiKeyAuth
path Parameters
schedule_name
required
string
Request Body schema: application/x-www-form-urlencoded
cron
string or null
database
string

database name

delay
integer or null >= 0
engine_version
string

the version of the query engine for the query, can be a version release name (e.g 'stable') or version number (e.g '0.205')

pool_name
string

resource pool name

priority
integer [ -2 .. 2 ]
retry_limit
integer [ 0 .. 32 ]
query
string
result
string

url of the result

timezone
string
type
string
Responses
200

OK

post/schedule/update/{schedule_name}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/schedule/update/{schedule_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/x-www-form-urlencoded'
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33.000Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Run schedule

Schedules a run.

Request
Security:
ApiKeyAuth
path Parameters
schedule_name
required
string
schedule_time
required
integer (Timestamp)
Example: 1356998400
Request Body schema: application/x-www-form-urlencoded
num
integer <= 10
Default: 1
domain_key
string (DomainKey)
Responses
200

OK

post/schedule/run/{schedule_name}/{schedule_time}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/schedule/run/{schedule_name}/{schedule_time}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/x-www-form-urlencoded'
Response samples
application/json
{
  • "jobs": [
    ]
}

Get execution history

Gets a history of scheduled executions by name.

Request
Security:
ApiKeyAuth
path Parameters
schedule_name
required
string
query Parameters
from
integer
Default: 0
to
integer
Default: 20
Responses
200

OK

get/schedule/history/{schedule_name}
Request samples
curl -i -X GET \
  'https://api.treasuredata.com/v3/schedule/history/{schedule_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "count": 20,
  • "from": 5,
  • "to": 15,
  • "history": [
    ]
}
Support
Copyright © 2021 Treasure Data, Inc. (or its affiliates). All rights reserved.