Cancel an existing Task
POST
https://api.neuroscale.io/v2.0/tasks/{task-id}/cancel
Path parameters¶
| Name | Type | Description |
|---|---|---|
task-id |
String | Unique identifier of the Task. |
Cancelling a Task causes it to stop its current Execution and terminate itself. A Task can only be canceled if it is currently in a "paused", "queued" or "running" state. Cancelling a Task is a non-recoverable operation (in other words, it cannot be restarted or subsequently made to change state by any other means).
Authentication¶
Type: Access token
Required scopes: task or update:task
Responses¶
Example response — 200¶
{
"created_at": 1467233124,
"description": "Description of Task",
"executions": {
"count": 1,
"data": [
{
"created_at": 1467233124,
"errors": [],
"finished_at": 1467233388,
"id": "ex_42iSJz5TLRU29G9tLihRZE",
"object": "execution",
"started_at": 1467233105,
"state": "canceled",
"task": "tsk_TNje6VQJUPgaDA8tVbHPpU",
"transitions": [],
"updated_at": 1467233413
}
],
"object": "list",
"url": "/v1/tasks/tsk_TNje6VQJUPgaDA8tVbHPpU/executions"
},
"finished_at": 1467233388,
"id": "tsk_TNje6VQJUPgaDA8tVbHPpU",
"max_retries": 0,
"name": "My Task",
"object": "task",
"parameters": {
"nodes": {
"importer": {
"params": {
"filename": {
"value": "input.set"
}
}
},
"exporter": {
"params": {
"filename": {
"value": "output.set"
}
}
}
}
},
"pipeline": "pl_xTg7suuqGzFCGcnmb6Xx7f",
"priority": "low",
"properties": {
"key_1": "value_1",
"key_2": "value_2"
},
"started_at": 1467233105,
"state": "canceled",
"updated_at": 1467307054,
"user": "usr_ZTNc2sEjoq6JoEgPNFUg6g"
}