Jobs

Create a job

Reserves a job in state created and returns its id. If context_bytes is supplied, the response includes a presigned URL to upload a gzipped tar archive of your working tree before submitting. Creating a job does not start it; call submitJob next.

post/jobs

Request

  • Base URL: https://api.latchkey.dev
  • URL: https://api.latchkey.dev/jobs
  • Auth: HTTP bearer

Request body

commandstring required

The single shell command to run on the runner.

runner_size'small' | 'medium' | 'large' | 'xlarge' required

Latchkey runner t-shirt size. Determines vCPU and memory.

envobject

Environment variables for the command. At most 64 keys and 32768 bytes total.

timeout_secondsinteger

Wall-clock limit for the command.

context_bytesinteger

Byte length of the gzipped tar archive you intend to upload. Supplying it returns a presigned upload URL bound to this exact length.

Example request

{
  "command": "npm ci && npm test"
}

Response

Job created.

job_idstring required

Identifier for the new job.

context_upload_urlstring uri

Presigned PUT URL for the context archive. Present only when context_bytes was supplied. Upload with Content-Type application/gzip before calling submitJob.

Changes

No recorded changes to this operation across all 1 revision of this API.