لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/infra/jobs/delete.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Delete a job
DELETE /v1/infra/servers/:id/jobs/:jobId
Soft-deletes a job and stops new runs. Works even when the feature is unavailable. An attempt already sent and in RUNNING status runs to completion: its request to the handler is not cancelled. The job disappears from the list; operations on the job and its run history then return 404.
Requires a key with vibe:infra and existing server permissions. Writes need the managing key or a team role permitted to manage the lifecycle. General rules: Scheduled HTTP calls. Request verification in the handler: Verify signatures.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
Parameterid |
Inpath | Typestring | Requiredyes | DescriptionServer ID from the server list |
ParameterjobId |
Inpath | Typestring | Requiredyes | DescriptionJob ID from the job list |
No request body or query parameters are needed.
Examples
curl — personal key
curl --max-time 20 -X DELETE "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/jobs/JOB_ID" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl --max-time 20 -X DELETE "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/jobs/JOB_ID" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const serverId = 'SERVER_ID';
const jobId = 'JOB_ID';
const res = await fetch(`https://vibecode.bitrix24.com/v1/infra/servers/${encodeURIComponent(serverId)}/jobs/${encodeURIComponent(jobId)}`, {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
});
const result = await res.json();
if (!res.ok || !result.success) throw new Error(result.error?.code ?? `HTTP_${res.status}`);
console.log(result);
JavaScript — OAuth application
const serverId = 'SERVER_ID';
const jobId = 'JOB_ID';
const res = await fetch(`https://vibecode.bitrix24.com/v1/infra/servers/${encodeURIComponent(serverId)}/jobs/${encodeURIComponent(jobId)}`, {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
});
const result = await res.json();
if (!res.ok || !result.success) throw new Error(result.error?.code ?? `HTTP_${res.status}`);
console.log(result);
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
The response has no data field or signing secret.
Response example
200 OK response:
{
"success": true
}
Error response example
404 — the job is missing, already deleted or belongs to another server:
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "NOT_FOUND"
}
}
Errors
| HTTP | Code | Reason |
|---|---|---|
| HTTP404 | CodeNOT_FOUND |
ReasonServer not found or inaccessible to the caller; message is Server not found |
| HTTP404 | CodeNOT_FOUND |
ReasonThe job is missing, already deleted or belongs to another server; message is NOT_FOUND |
| HTTP401 | CodeMISSING_API_KEY |
ReasonMissing API key |
| HTTP403 | CodeINFRA_FORBIDDEN_FOR_COWORK_KEY |
ReasonA Cowork key cannot write to infrastructure. Use a deployment key |
| HTTP403 | CodeINFRA_SCOPE_REQUIRED |
ReasonThe key lacks the vibe:infra scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
ReasonA read-only key cannot write |
| HTTP403 | CodeSERVER_ROLE_FORBIDDEN |
ReasonThe development team member's role does not permit this action |
| HTTP429 | CodeRATE_LIMITED |
ReasonThe job mutation limit is exceeded: 10 per minute platform-wide. The effective value for the key is in the x-ratelimit-limit header, as the cap is divided across replicas. Shared API limits also apply |
Full list of shared error codes — Errors.