Skip to main content

Update Job by ID

PUT 

/jobs/:id

Updates an existing job by its ID, allowing full updates including name changes.

Difference from PUT /jobs

  • PUT /jobs: Name-based upsert (creates if doesn't exist, updates if exists)
  • PUT /jobs/:id: ID-based update (job must exist, allows renaming)

When to Use

  • Rename a job: Change the job name while preserving ID and history
  • Explicit updates: Target a specific job instance by ID
  • Avoid name collisions: Update without worrying about name-based lookup

What Happens

  1. API looks up job by ID (404 if not found)
  2. Validates name uniqueness if name changed (409 if conflict)
  3. Updates job specification
  4. Preserves job ID, history, and version information
  5. Creates evaluation to reschedule with new spec

Error Responses

  • 400 Bad Request: Invalid job specification
  • 404 Not Found: Job with specified ID doesn't exist
  • 409 Conflict: New job name already exists in namespace
  • 422 Unprocessable Entity: No changes detected (spec unchanged)
  • 500 Internal Server Error: Server-side storage or processing error

Request

Responses

Job updated