Schedules

Get schedules

Gets a list of schedules.

SecurityApiKeyAuth
Responses
200

OK

get/schedule/list
Request samples
Response samples
application/json
{
  • "schedules": [
    ]
}

Create schedule

Creates a schedule.

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

database name

delay
integer or null >= 0
executing_user_id
integer
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
application/x-www-form-urlencoded
name=string&cron=string&database=Alpha&delay=5&executing_user_id=0&engine_version=stable&pool_name=pool_1&priority=1&retry_limit=3&query=string&result=string&timezone=UTC&type=string
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Delete schedule

Deletes a specified schedule.

SecurityApiKeyAuth
Request
path Parameters
schedule_name
required
string
Responses
200

OK

post/schedule/delete/{schedule_name}
Request samples
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Update schedule

Updates a schedule.

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

database name

delay
integer or null >= 0
executing_user_id
integer
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
application/x-www-form-urlencoded
name=string&cron=string&database=Alpha&delay=5&executing_user_id=0&engine_version=stable&pool_name=pool_1&priority=1&retry_limit=3&query=string&result=string&timezone=UTC&type=string
Response samples
application/json
{
  • "created_at": "2020-12-31T11:22:33Z",
  • "cron": "string",
  • "database": "Alpha",
  • "delay": 5,
  • "name": "string",
  • "query": "string",
  • "timezone": "UTC",
  • "type": "string",
  • "user_name": "Treasure Data"
}

Run schedule

Schedules a run.

SecurityApiKeyAuth
Request
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
application/x-www-form-urlencoded
num=1&domain_key=domain_key_123
Response samples
application/json
{
  • "jobs": [
    ]
}

Get execution history

Gets a history of scheduled executions by name.

SecurityApiKeyAuth
Request
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
Response samples
application/json
{
  • "count": 20,
  • "from": 5,
  • "to": 15,
  • "history": [
    ]
}