Tasks
Update task
Update a task's mutable fields. At least one field must be provided. Omitted fields are left unchanged.
Payload Requirements
- At least one mutable field must be provided.
- When evaluators is provided, the entire evaluator list is replaced.
- sampling_rate and is_continuous are only applicable for project-based tasks.
- Fields not valid for the task's type return 400 (e.g. run_configuration on an evaluation task).
- System-managed fields (id, type, created_at, updated_at) cannot be modified.
- evaluator_version_id pins an evaluator to one version. Because evaluators replaces the whole list, each entry states its own pin: send a version ID to pin, and omit the field or send null to run the latest version. Omit evaluators entirely to leave the existing attachments — and their pins — untouched.
- A pinned version must belong to the evaluator named by evaluator_id, and every evaluator on the task must resolve to the same data scope. Both return 422.
Valid example (update evaluation task)
{
"name": "Updated Hallucination Check",
"sampling_rate": 0.5,
"query_filter": "metadata.environment = 'staging'"
}
Valid example (pin one evaluator, leave the other on latest)
{
"evaluators": [
{
"evaluator_id": "RXZhbHVhdG9yOjEyOmFCY0Q=",
"evaluator_version_id": "RXZhbHVhdG9yVmVyc2lvbjo5OTphQmNE"
},
{
"evaluator_id": "RXZhbHVhdG9yOjEzOmFCY0Q="
}
]
}
Invalid example (no fields provided)
{}
<Note>This endpoint is in beta, read more here.</Note>
patch/v2/tasks/{task_id}
Path parameters
task_idstring required
A universally unique identifier (base64-encoded opaque string).
Example:RW50aXR5OjEyMzQ1
The unique task identifier (base64)
Request body
Response
Returns a single task object