Restart Task
Method for restarting a task. May be necessary if the task failed to complete successfully.
Request Parameters
POST /api/clients/v1/tasks/{id}/restart/
Headers
- Content-Type: application/json
- Authorization: Bearer
$access_token
Path
| Parameter | Type | Constraints | Description | Example |
|---|---|---|---|---|
| id | string | uuid, required | Task ID | b8d2fc52-d922-46fb-9ce3-e005188d039c |
Response Parameters
JSON body
| Parameter | Type | Description |
|---|---|---|
| id | string | Task ID |
| task_type | string | Task type |
| subject_type | string | Type of object being acted upon |
| subject_id | integer | ID of object being acted upon |
| owner_id | integer | Task initiator ID |
| status | string | Task status |
| percentage | integer | Task completion percentage |
| completed_at | string | Task completion time |
Examples
200 OK
Task object
{
"id": "ac1c7c6c-f63e-4fc2-9339-864af20a9e87",
"task_type": "ENABLE_VOD",
"subject_type": "vod",
"subject_id": 19,
"owner_id": 11,
"status": "IN_PROGRESS",
"percentage": 0,
"completed_at": null
}
400 Bad Request
Invalid path parameters
{
"id": [
"A valid integer is required."
]
}
401 Unauthorized
Authentication credentials missing or invalid
{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}
403 Forbidden
Only project participants can restart tasks associated with the project
{
"detail": "Only participants can view this project's tasks"
}
404 Not Found
Task with specified ID not found
{
"detail": "Task not found"
}