v2

latestOpenAPI 3.0.3Apache-2.02026-08-07119359591.9 KB
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

OR

Response

Returns a single task object

idstring required

The unique identifier for the task

namestring required

The name of the task

type'TEMPLATE_EVALUATION' | 'CODE_EVALUATION' | 'RUN_EXPERIMENT' required

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.
project_idstring nullable

The project identifier (base64). Present for project-based tasks.

dataset_idstring nullable

The dataset identifier (base64). Present for dataset-based tasks.

sampling_ratenumber nullable

Sampling rate between 0 and 1. Only applicable for project-based tasks.

is_continuousboolean required

Whether the task runs continuously on incoming data.

query_filterstring nullable required

Task-level query filter applied to all data.

experiment_idsstring[] required

Experiment identifiers (base64) for dataset-based tasks.

last_run_atstring date-time nullable required

When the task was last run.

created_atstring date-time required

When the task was created.

updated_atstring date-time required

When the task was last updated.

created_by_user_idstring nullable required

The unique identifier for the user who created the task.