Task
A Task is an operation the platform runs in the background instead of during the request, because it is too long to complete inline — for example synchronising the people of a project from a CSV file.
Each task records the handler that performs the work, the user_id who started it, the
request it was given and the response it produced.
The status follows this lifecycle:
TODO: queued, not started yetPENDING: waiting on an external conditionPROCESSING: runningDONE: completed successfully — the outcome is inresponseFAILED: stopped with an error — the reason is inresponse
Use this API to:
- Follow an operation you started, by polling its status
- Read the result of a completed task
- Find the tasks started by a user (filter by
user_id)
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” POST /v2/task/index
Returns a paginated and filterable list of tasks. Use POST to allow complex filters via JSON payload.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching tasks
object
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Field to sort by. Prefix with minus for descending order (e.g. -created_at).
Example
{ "filter": { "handler": "ImportHandler", "status": "pending" }, "per-page": 10, "page": 1, "sort": "created_at"}Responses
Section titled “ Responses ”List of tasks
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "task_id": "task-1", "handler": "ImportHandler", "user_id": "user-1", "status": "pending", "created_at": "2024-01-01", "updated_at": "2024-01-02"}Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” POST /v2/task/create
Create a new task by providing the required details.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Task object to be created
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "handler": "ExportHandler", "user_id": "user-2", "status": "pending"}Responses
Section titled “ Responses ”Task created successfully
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "task_id": "task-2", "handler": "ExportHandler", "user_id": "user-2", "status": "pending"} GET /v2/task/view/{id}
Retrieve a task by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the task to retrieve
Responses
Section titled “ Responses ”Task found
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "task_id": "task-1", "handler": "ImportHandler", "user_id": "user-1", "status": "pending", "created_at": "2024-01-01", "updated_at": "2024-01-02"}Task not found
delete
Section titled “delete” DELETE /v2/task/delete/{id}
Delete a task by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the task to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Task deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
update
Section titled “update” PUT /v2/task/update/{id}
Update an existing task by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the task to update
Request Body required
Section titled “Request Body required ”Task object with updated data
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "status": "completed"}Responses
Section titled “ Responses ”Task updated successfully
object
The unique identifier for the task.
The name of the handler assigned to the task.
The unique identifier for the user associated with the task.
The unique identifier for the entity associated with the task (optional).
The current status of the task (e.g., pending, completed, etc.).
The JSON request data related to the task.
The JSON response data related to the task.
The timestamp when the task was created.
The timestamp when the task was last updated.
Example
{ "task_id": "task-1", "status": "completed"}Task not found
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.