Skip to main content

Deploy Job

PUT 

/jobs

Deploys a new job or updates an existing one.

A job is a unit of work that runs on edge nodes (pipelines, queries, services). This endpoint creates or updates job specifications.

What Happens

  1. API validates job specification (syntax, required fields, selector)
  2. Job is stored in the state store
  3. API returns immediately after successful storage
  4. An evaluation is created asynchronously
  5. Scheduler matches job to nodes based on selector
  6. Executions are created on matching nodes

When to Use

  • Initial deployment: Creates new job (returns 201 Created)
  • Updates: Modifies existing job spec (returns 200 OK)
  • Job spec changes trigger re-evaluation and updates to executions

Async Behavior

This endpoint returns after validation and storage, NOT after node assignment.

  • Use GET /jobs/{id}/executions to check where the job is running
  • Use GET /jobs/{id}/evaluations to see scheduling decisions

Error Responses

  • 400 Bad Request: Invalid job specification (check syntax, required fields)
  • 422 Unprocessable Entity: Valid format but no changes detected (spec unchanged from current version)
  • 500 Internal Server Error: Server-side storage or processing error

Request

Responses

Job updated