Skip to main content
POST
/
api
/
jobs
Create Job
curl --request POST \
  --url https://api.getgranite.ai/api/jobs \
  --header 'Content-Type: application/json' \
  --data '
{
  "job_type": "<string>",
  "payload": {},
  "priority": 0
}
'
{
  "job_id": "<string>",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "assigned_to_machine_id": "<string>"
}

Body

application/json

Request to create a new job

job_type
string
required

Job type (robocorp_package, pyautogui_command)

payload
Payload · object
required

Job-specific payload

priority
integer
default:0

Job priority (higher = more important)

Response

Successful Response

Response from creating a job

job_id
string
required

Job ID

status
string
required

Initial status

created_at
string<date-time>
required

Creation timestamp

assigned_to_machine_id
string | null

Assigned machine ID