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
evaluatorsis provided, the entire evaluator list is replaced. sampling_rateandis_continuousare only applicable for project-based tasks.- Fields not valid for the task’s type return 400 (e.g.
run_configurationon an evaluation task). - System-managed fields (
id,type,created_at,updated_at) cannot be modified.
Valid example (update evaluation task)
{
"name": "Updated Hallucination Check",
"sampling_rate": 0.5,
"query_filter": "metadata.environment = 'staging'"
}
Invalid example (no fields provided)
{}
Authorizations
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Path Parameters
The unique task identifier (base64) A universally unique identifier (base64-encoded opaque string).
"RW50aXR5OjEyMzQ1"
Body
PATCH body for PATCH /v2/tasks/{task_id}. The server derives the task
type from the URL's task record and selects the appropriate schema; the
body itself does not carry a type field.
| Task type | Schema |
|---|---|
template_evaluation | UpdateEvaluationTaskRequest |
code_evaluation | UpdateEvaluationTaskRequest |
run_experiment | UpdateRunExperimentTaskRequest |
For template_evaluation and code_evaluation tasks, at least one of
name, sampling_rate, is_continuous, query_filter, or evaluators
must be provided.
For run_experiment tasks, at least one of name or run_configuration
must be provided. When run_configuration is provided the stored config
is atomically replaced.
Sending a field that is not valid for the resolved task type returns 400
(e.g. evaluators on a run_experiment task, or run_configuration on
an evaluation task).
- Option 1
- Option 2
PATCH body for template_evaluation and code_evaluation tasks. The two
types share the same updatable shape; the server derives the task type
from the URL's task record. At least one field must be provided.
New task name.
1Sampling rate between 0 and 1. Only applicable for project-based tasks.
0 <= x <= 1Whether the task runs continuously. Only applicable for project-based tasks.
Task-level query filter. Pass null to clear.
Replaces the entire evaluator list. At least one evaluator is required when provided.
1Response
Returns the updated task
A task is a typed, configurable unit of work that ties one or more evaluators
to a data source (project or dataset). run_experiment tasks additionally
carry a run_configuration that defines the LLM or evaluator settings for
each triggered run.
The unique identifier for the task
The name of the task
The task type.
- template_evaluation - An LLM template-based evaluation task.
- code_evaluation - A code-based evaluation task.
- run_experiment - A task that runs experiments.
template_evaluation, code_evaluation, run_experiment Whether the task runs continuously on incoming data.
Task-level query filter applied to all data.
The evaluators attached to this task. Empty for run_experiment tasks.
Experiment identifiers (base64) for dataset-based tasks.
When the task was last run.
When the task was created.
When the task was last updated.
The unique identifier for the user who created the task.
The project identifier (base64). Present for project-based tasks.
The dataset identifier (base64). Present for dataset-based tasks.
Sampling rate between 0 and 1. Only applicable for project-based tasks.
0 <= x <= 1The run configuration for a run_experiment task. Present only when
type is run_experiment. Null for all other task types.
- Option 1
- Option 2