Save draft variables
POST/v1/tasks/:taskId/variables
This operation performs several actions:
- Validates the task and draft variables.
- Deletes existing draft variables for the task.
- Checks for new draft variables. If a new variable's
name
matches an existing one but thevalue
differs, it is saved. In case of duplicate draft variable names, the last variable's value is kept.
- Invoking this method successively will overwrite all existing draft variables. Only draft variables submitted in the most recent request body will be persisted. Therefore, ensure you include all necessary variables in each request to maintain the intended variable set.
- The UI does not currently display the values for draft variables that are created via this endpoint.
Request
Path Parameters
The ID of the task.
- application/json
Body
required
- Array [
- ]
variables object[]
Variables to update or add to the task.
The name of the variable.
The value of the variable. When specifying the variable value, it's crucial to maintain consistency with JSON values (serialization for the complex objects such as list) and ensure that strings remain appropriately formatted.
Responses
- 204
- 400
- 404
- 500
On success returned.
An error is returned when the task is not active (not in the CREATED
state).
An error is returned if the task was not claimed (assigned) before, except the case when JWT authentication token used.
An error is returned if the task is not assigned to the current user, except the case when JWT authentication token used.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}
An error is returned when the task with the taskId
is not found.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}
An error is returned if an unexpected error occurs while persisting draft task variables.
- application/problem+json
- Schema
- Example (from schema)
Schema
An integer that represents the HTTP status code of the error response. For example, 400 indicates a "Bad Request" error, 404 indicates a "Not Found" error, and so on.
A string that provides a brief description of the error that occurred.
Error instance UUID for lookup (eg. in log messages).
{
"status": 0,
"message": "string",
"instance": "string"
}