Endpoints
cancel_task
Cancel a task and remove its temporary result; saved files remain intact.
Request
Authentication is required by the published contract.
curl -X POST 'https://api.ursy.cloud/v1/tasks/{task_id}/cancel' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_SERVICE_TOKEN'- Scopes
- Not specified by this operation
- Execution
- At the owning service
- Risk classification
- not declared
Parameters
task_id path · string requiredSee the accepted schema for constraints.
Idempotency-Key header · string requiredSee the accepted schema for constraints.
This operation is documented here. Use the owning service with the appropriate credentials and permissions to execute it.
Response schemas and request body
{
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false
}
}
}
},
"responses": {
"200": {
"description": "Typed operation result; request_id correlates the request.",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"properties": {
"task": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^task_[a-f0-9]{32}$"
},
"type": {
"const": "workspace_export"
},
"state": {
"type": "string",
"enum": [
"confirmation_required",
"queued",
"running",
"completed",
"failed",
"cancelled",
"expired"
]
},
"processed_files": {
"type": "integer",
"minimum": 0
},
"result_bytes": {
"type": "integer",
"minimum": 0
},
"expires_at": {
"type": "string"
},
"approval_url": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"error_code": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"content_is_untrusted": {
"const": true
}
},
"required": [
"id",
"type",
"state",
"processed_files",
"result_bytes",
"expires_at",
"approval_url",
"error_code",
"content_is_untrusted"
]
}
},
"required": [
"task"
]
}
}
}
},
"default": {
"description": "Stable error envelope. 401 invalid/expired/revoked grant; 403 missing scope; 404 unavailable resource; 409 plan/idempotency conflict; 412 stale ETag; 413 size/quota; 429 rate limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}