ServicesTasksHTTP APITasks

Cancel task in a project

Deprecated

POST
/api/tasks/projects/{project_id}/tasks/{task_id}/cancel

Cancel a Task through a Project. Deprecated; use cancel_task, which derives the Project.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Path Parameters

project_id*string
task_id*string
Formatuuid

Response Body

Success

application/json
  1. response

One durable Task. claim is absent only from servers that predate it.

attemptCount*integer
Formatuint32
Range0 <= value <= 4294967295
availableAtMicros*|
buffered*boolean
cancellationReason?|null
cancelledBy?||||||null
claim?|null
createdAtMicros*|
currentAttemptId?|null
deadlineAtMicros?||null
definition?||||||||null
failure?|null
latestWorker?|null
legacyTableId?string|null
maxAttempts*integer
Formatuint32
Range0 <= value <= 4294967295
maximumAttemptDurationMicros?||null
parentTaskId?|null
pendingExpiresAtMicros*|
projectId*string
published?|null
requestedBy*|||||
requirements*
result?unknown|null
startedAtMicros?||null
status*tasks.TaskStatus
Value in"ready""running""succeeded""failed""cancelled"
stopDeadlineAtMicros?||null
stopReason?|null
stopRequestedAtMicros?||null
taskId*string
Formatuuid
taskSpecId*
terminalAtMicros?||null
updatedAtMicros*|
workerPoolClaimExpiresAtMicros?||null
workerPoolId?|null
curl -X POST 'https://api.spiraldb.dev/api/tasks/projects/string/tasks/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel'
{  "attemptCount": 0,  "availableAtMicros": "string",  "buffered": true,  "cancellationReason": "overlap_skipped",  "cancelledBy": {    "application": {      "applicationId": "string"    },    "type": "application"  },  "claim": "pool",  "createdAtMicros": "string",  "currentAttemptId": "3115e16a-ac06-4092-bb8d-8419fb0229bb",  "deadlineAtMicros": "string",  "definition": {    "enrichmentCompute": {      "enrichmentResourceId": "f3254963-c869-4329-88d1-3142480c21e9",      "fragmentIds": [        "051abdb6-1426-4f63-ad1a-7c9418f63e83"      ],      "readTarget": {        "commitOnBranch": {          "branchId": "712f308d-801e-48bc-b072-9c404734ceb7",          "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117"        },        "type": "commitOnBranch"      }    },    "type": "enrichmentCompute"  },  "failure": {    "code": "string",    "message": "string",    "retryable": true  },  "latestWorker": {    "managed": true,    "workerPoolId": "e466ab52-fe40-49dd-8e6c-d197c33239a3",    "workerSessionId": "152a40cf-919e-487a-8d16-020853a46015"  },  "legacyTableId": "string",  "maxAttempts": 0,  "maximumAttemptDurationMicros": "string",  "parentTaskId": "2506db93-67fe-4ab8-a809-f4aa6ed8a0f4",  "pendingExpiresAtMicros": "string",  "projectId": "string",  "published": {    "commitId": "a1b223ee-0195-4e35-9b2a-72c93f345117",    "versions": [      {        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6",        "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"      }    ]  },  "requestedBy": {    "application": {      "applicationId": "string"    },    "type": "application"  },  "requirements": {    "computeClass": {      "cpu": {},      "type": "cpu"    },    "cpu": 0,    "memoryBytes": "string"  },  "result": null,  "startedAtMicros": "string",  "status": "ready",  "stopDeadlineAtMicros": "string",  "stopReason": "user",  "stopRequestedAtMicros": "string",  "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8",  "taskSpecId": {    "name": "string",    "version": 0  },  "terminalAtMicros": "string",  "updatedAtMicros": "string",  "workerPoolClaimExpiresAtMicros": "string",  "workerPoolId": "e466ab52-fe40-49dd-8e6c-d197c33239a3"}