Skip to main content
PATCH
/
v2
/
datasets
/
{datasetId}
/
examples
Update existing examples in a dataset
curl --request PATCH \
  --url https://api.arize.com/v2/datasets/{datasetId}/examples \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "examples": [
    {
      "id": "example_001",
      "question": "What is 2 * 2?"
    },
    {
      "id": "example_002",
      "question": "What is the square root of 64?",
      "answer": "8"
    },
    {
      "id": "example_003",
      "question": "If 9x = 36, what is x?",
      "topic": "algebra"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "spaceId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "versions": [
    {
      "id": "<string>",
      "name": "<string>",
      "datasetId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Authorization: Bearer <api-key>

Path Parameters

datasetId
string
required

The unique identifier of the dataset A universally unique identifier

Query Parameters

datasetVersionId
string

The unique identifier of the dataset version A universally unique identifier

Body

application/json

Body containing dataset examples for update operation by ID matching

examples
object[]
required

Array of examples with 'id' field for matching and updating existing records

newVersion
string

Name for the new version. If provided (non-empty), creates a new version with that name. If omitted or empty, updates the existing version in-place.

Response

A dataset object

A dataset is a structured collection of examples used to test and evaluate LLM applications. Datasets allow you to test models consistently across any real-world scenarios and edge cases, quickly identify regressions, and track measurable improvements.

id
string
required

Unique identifier for the dataset

name
string
required

Name of the dataset

spaceId
string
required

Unique identifier for the space this dataset belongs to

createdAt
string<date-time>
required

Timestamp for when the dataset was created

updatedAt
string<date-time>
required

Timestamp for the last update of the dataset

versions
object[]

List of versions associated with this dataset