Skip to content

Create job

Request

Creates a job of a given type under a specified database.

Security
ApiKeyAuth
Path
job_typestring(type)required

the job type

Example:presto
database_namestring(name)required

database name

Example:Alpha
Bodyapplication/json
querystring

the raw SQL query

Example:"SELECT COUNT(1) FROM www_access"
priorityinteger, [ -2 .. 2 ]

job execution priority

Example:0
resultstring

Export Connector location

retry_limitinteger, [ 0 .. 32 ]

the number of automatic retries on failure

Example:0
pool_namestring

resource pool name

property name*anyadditional property
curl -i -X POST \
  https://api.treasuredata.com/v3/job/issue/presto/Alpha \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "SELECT COUNT(1) FROM www_access",
    "priority": 0,
    "result": "string",
    "retry_limit": 0,
    "pool_name": "string"
  }'

Responses

OK

Bodyapplication/json
jobstring(JobIdAsString)required

unique identifier of job

Example:"19"
job_idstring(JobIdAsString)required

unique identifier of job

Example:"19"
databasestring(name)required

database name

Example:"Alpha"
Response
{ "job": "19", "job_id": "19", "database": "Alpha" }