Batch update jobs
Update multiple jobs by providing an array of job objects with their IDs. Each job object must include an id field and the fields to update. Jobs that don't exist or fail validation will be skipped and included in the 'failed' count.
curl -X PATCH https://velora-api.psalinks.com/api/v1/jobs/batch \\\n -H \"Authorization: Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"jobs\": [{\"id\": \"JOB_ID_1\", \"name\": \"Updated Name\"}, {\"id\": \"JOB_ID_2\", \"schedule_cron\": \"0 8 * * *\"}]}'Request Body#
JobBatchUpdatePayload
{
"jobs": [
{
"id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c",
"name": "Updated Name",
"schedule_cron": "0 8 * * *",
"timezone": "UTC"
}
]
}Response#
JobBatchUpdateResponse
{
"jobs": [
{ "id": "9f4a1c2b-3d4e-5f6a-7b8c-9d0e1f2a3b4c", "msg": "Job updated" },
{ "id": "a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p", "msg": "Job updated" }
],
"total": 2,
"updated": 2,
"failed": 0
}To include HTTP headers and body from the latest job run in the response, add ?include_http_details=true to the URL.
Maximum 100 jobs per request. Each job object must include an
id field. Jobs that don't exist or fail validation will be skipped and included in the 'failed' count. Only provided fields will be updated; missing fields remain unchanged.Required scope#
Requires: jobs:write (or jobs:update, admin, *)
Common errors#
| Status | error | Cause |
|---|---|---|
400 | validation_error | jobs is required and must be an array |
400 | validation_error | Maximum 100 jobs per request |
400 | validation_error | Each job must include an id field |
404 | not_found | One or more jobs not found |
401 | invalid_api_key | Missing or revoked API key |
403 | insufficient_scope | Key lacks jobs:write scope |