Paths for task
Entry points that interact with Task entities.
/api/v1/tasks/¶
GET¶
Return an array of all tasks.
Note
When the authorization feature is activated (available in the Enterprise edition only), this endpoint
requires TAIPY_READER role.
Code example:
curl -X GET http://localhost:5000/api/v1/tasks
Responses
-
200
Status:OKName Type results [ TaskSchema]
POST¶
Create a new task from its config_id. If the config does not exist, a 404 error is returned.
Note
When the authorization feature is activated (available in the Enterprise edition only), this endpoint
requires TAIPY_EDITOR role.
Code example:
curl -X POST http://localhost:5000/api/v1/tasks?config_id=my_task_config
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| config_id | string | Yes | The identifier of the task configuration. |
Responses
-
201
Status:CreatedName Type message string task TaskSchema
/api/v1/tasks/submit/{task_id}/¶
POST¶
Execute a task by task_id. If the task does not exist, a 404 error is returned.
Note
When the authorization feature is activated (available in the Enterprise edition only), this endpoint
requires TAIPY_EXECUTOR role.
Code example:
curl -X POST http://localhost:5000/api/v1/tasks/submit/TASK_my_config_75750ed8-4e09-4e00-958d-e352ee426cc9
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | - |
Responses
-
204
Status:No ContentName Type message string task TaskSchema -
404
Status:Not FoundNo task has the task_id identifier.
/api/v1/tasks/{task_id}/¶
DELETE¶
Delete a task. If the task does not exist, a 404 error is returned.
Note
When the authorization feature is activated (available in the Enterprise edition only), this endpoint
requires TAIPY_EDITOR role.
Code example:
curl -X DELETE http://localhost:5000/api/v1/tasks/TASK_my_config_75750ed8-4e09-4e00-958d-e352ee426cc9
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | The identifier of the task. |
Responses
GET¶
Return a single task by task_id. If the task does not exist, a 404 error is returned.
Note
When the authorization feature is activated (available in the Enterprise edition only), this endpoint
requires TAIPY_READER role.
Code example:
curl -X GET http://localhost:5000/api/v1/tasks/TASK_my_config_75750ed8-4e09-4e00-958d-e352ee426cc9
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | The identifier of the task. |
Responses
-
200
Status:OKName Type task TaskSchema -
404
Status:Not FoundNo task has the task_id identifier.