curl -i -X GET \ https://api.treasuredata.com/v3/schedule/list \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "schedules": [
- {
- "created_at": "2020-12-31T11:22:33.000Z",
- "cron": "string",
- "database": "Alpha",
- "delay": 5,
- "engine_version": "stable",
- "name": "string",
- "priority": 1,
- "query": "string",
- "retry_limit": 3,
- "timezone": "UTC",
- "type": "string",
- "user_name": "Treasure Data"
}
]
}
Creates a schedule.
OK
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'
{- "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"
}
curl -i -X POST \ 'https://api.treasuredata.com/v3/schedule/delete/{schedule_name}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "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"
}
Updates a schedule.
OK
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'
{- "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"
}
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'
{- "jobs": [
- {
- "job_id": 19,
- "type": "presto",
- "scheduled_at": "2020-12-31 11:22:33 UTC"
}
]
}
curl -i -X GET \ 'https://api.treasuredata.com/v3/schedule/history/{schedule_name}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "count": 20,
- "from": 5,
- "to": 15,
- "history": [
- {
- "cpu_time": 0,
- "created_at": "2020-12-31 11:22:33 UTC",
- "database": "string",
- "duration": 10,
- "end_at": "2020-12-31 11:22:33 UTC",
- "hive_result_schema": "string",
- "job_id": "19",
- "linked_result_export_job_id": 19,
- "num_records": 100,
- "organization": "string",
- "priority": 0,
- "query": null,
- "result": "string",
- "result_export_target_job_id": 19,
- "result_size": 1048576,
- "retry_limit": 3,
- "start_at": "2020-12-31 11:22:33 UTC",
- "status": "success",
- "type": "presto",
- "updated_at": "2020-12-31 11:22:33 UTC",
- "url": "string",
- "user_name": "Treasure Data",
- "scheduled_at": "2020-12-31 11:22:33 UTC"
}
]
}