curl -i -X GET \ https://api.treasuredata.com/v3/job/list \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "jobs": [
- {
- "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"
}
], - "count": 0,
- "from": 0,
- "to": 0
}
curl -i -X GET \ 'https://api.treasuredata.com/v3/job/show/{job_id}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "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",
- "debug": {
- "cmdout": "string",
- "stderr": "string"
}
}
Show the status information of the given job id at last execution as well as other related information.
OK
curl -i -X GET \ 'https://api.treasuredata.com/v3/job/status/{job_id}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "job_id": "19",
- "cpu_time": 0,
- "created_at": "2020-12-31 11:22:33 UTC",
- "end_at": "2020-12-31 11:22:33 UTC",
- "duration": 10,
- "num_records": 100,
- "result_size": 1048576,
- "start_at": "2020-12-31 11:22:33 UTC",
- "status": "success",
- "updated_at": "2020-12-31 11:22:33 UTC"
}
curl -i -X GET \ 'https://api.treasuredata.com/v3/job/status_by_domain_key/{domain_key}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "job_id": "19",
- "cpu_time": 0,
- "created_at": "2020-12-31 11:22:33 UTC",
- "end_at": "2020-12-31 11:22:33 UTC",
- "duration": 10,
- "num_records": 100,
- "result_size": 1048576,
- "start_at": "2020-12-31 11:22:33 UTC",
- "status": "success",
- "updated_at": "2020-12-31 11:22:33 UTC"
}
curl -i -X POST \ 'https://api.treasuredata.com/v3/job/issue/{job_type}/{database_name}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
{- "job": "19",
- "job_id": "19",
- "database": "Alpha"
}
Sets the results of a specified job ID.
OK
curl --request POST \ --url 'https://console-development.treasuredata.com/v3/job/result_export/22616062?=' \ --header 'authorization: TD1 {APIKEY}' \ --header 'content-type: application/x-www-form-urlencoded' \ --data 'result=td://console-development.treasuredata.com/test_db/test_table?legacy=true&mode=null&time=0&apikey={APIKEY}&mode=append'
{- "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",
- "debug": {
- "cmdout": "string",
- "stderr": "string"
}
}
Creates an export job.
OK
curl -i -X POST \ 'https://api.treasuredata.com/v3/export/run/{database_name}/{table_name}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \ -H 'Content-Type: application/x-www-form-urlencoded'
{- "job": "19",
- "job_id": "19",
- "database": "Alpha"
}
Creates a partial delete job.
OK
curl -i -X POST \ 'https://api.treasuredata.com/v3/table/partialdelete/{database_name}/{table_name}' \ -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \ -H 'Content-Type: application/x-www-form-urlencoded'
{- "job_id": 19,
- "database": "Alpha",
- "table": "Bravo",
- "from": 1356998400,
- "to": 1356998400
}