Skip to main content

Preview Changes

PUT 

/jobs/diff

Compares a proposed job specification with an existing job to preview changes.

When to Use:

  • Before deploying job updates: Preview exactly what will change
  • Validate changes: Ensure updates match your intentions
  • Code review: Share diffs with team before deploying
  • Troubleshooting: Verify a job spec matches what you expect

What You Get

  • Unified diff showing additions, removals, and changes
  • Line-by-line comparison of the job specifications
  • Empty diff if specs are identical (no changes)

Common Workflow

  1. Modify your job specification file
  2. PUT /jobs/diff with the new spec
  3. Review the diff to verify changes
  4. If changes look correct: PUT /jobs to apply
  5. If not: Adjust spec and repeat

Important Notes

  • This is read-only - it doesn't modify the job
  • Internal metadata (expanso.io/* keys) are ignored in diff
  • Empty diff means no changes will be applied (422 on PUT /jobs)

Request

Responses

Returns diff (may be empty if no changes)