Update a job

View as Markdown

Change a job’s name, description, or code, or archive it.

Only the fields passed are changed. New code is stored as a new version of the job’s script, so earlier executions keep the version they ran. To create a job, use create_job instead.

Requires an API key with the write scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

job_idstringRequired

Request

This endpoint expects an object.
namestring or nullOptional1-200 characters
New name for the job.
descriptionstring or nullOptional
New description for the job. Pass an empty string to clear it.
codestring or nullOptional

New Python source for the job’s script, stored as a new script version. Declare dependencies inline in a PEP 723 # /// script block.

archivedboolean or nullOptional

True archives the job, hiding it from the active job list; false restores it.

Response

OK
idstringformat: "uuid"

Pass this as job_id to the job execution tools.

namestring
archivedboolean
descriptionstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error