Skip to content

Get job

Request

Retrieves a list of jobs with specified job id.

Security
ApiKeyAuth
Path
job_idinteger(JobId)required

the job id

Example:19
curl -i -X GET \
  https://api.treasuredata.com/v3/job/show/19 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
cpu_timeinteger or nullrequired
created_atstring(DateTimeAsString)\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s(([+-]\...required

Datetime in custom format (2020-12-31 11:22:33 -0500 or 2020-12-31 11:22:33 UTC for UTC)

Example:"2020-12-31 11:22:33 UTC"
databasestring or nullrequired

database name

durationinteger or nullrequired

Duration

Example:10
end_atDateTimeAsString (string) or EmptyString (string)required
One of:

Datetime in custom format (2020-12-31 11:22:33 -0500 or 2020-12-31 11:22:33 UTC for UTC)

string(DateTimeAsString)
hive_result_schemastring or nullrequired

the schema for the job's result table

job_idstring(JobIdAsString)required

unique identifier of job

Example:"19"
linked_result_export_job_idJobId (integer) or (integer or null)required
Any of:

unique identifier of job

integer(JobId)
num_recordsinteger or nullrequired

the number of records in the result. Will be null until job has finished, and may not be set for all query types

Example:100
priorityinteger, [ -2 .. 2 ]required

job execution priority

Example:0
query(string or null) or QueryAsString (string) or BulkLoadConfig (object)required
Any of:
string or null
resultstring

...?

result_export_target_job_idJobId (integer) or (integer or null)required
Any of:

unique identifier of job

integer(JobId)
result_sizeinteger or nullrequired

size in bytes of the job's result, in msgpack.gz format

Example:1048576
retry_limitinteger, [ 0 .. 32 ]required

automatically retry this many times on failure

Default:0
Example:3
start_atDateTimeAsString (string) or EmptyString (string)required
One of:

Datetime in custom format (2020-12-31 11:22:33 -0500 or 2020-12-31 11:22:33 UTC for UTC)

string(DateTimeAsString)
statusstringrequired

current status of the job

Enum:"queued""running""killed""success""error"
Example:"success"
typestringrequired
Example:"presto"
updated_atstring(DateTimeAsString)\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s(([+-]\...required

Datetime in custom format (2020-12-31 11:22:33 -0500 or 2020-12-31 11:22:33 UTC for UTC)

Example:"2020-12-31 11:22:33 UTC"
urlstringrequired
user_namestring(name)required

user's full name or email

Example:"Treasure Data"
debugobjectrequired
organizationstring or nullrequireddeprecated

always "null"

Response
{ "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": "string", "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" } }