curl --request POST \
--url https://api.arize.com/v2/datasets/{dataset_id}/examples/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"filter": "topic = 'arithmetic'",
"limit": 50,
"cursor": "eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ"
}
EOFimport requests
url = "https://api.arize.com/v2/datasets/{dataset_id}/examples/search"
payload = {
"filter": "topic = 'arithmetic'",
"limit": 50,
"cursor": "eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: 'topic = \'arithmetic\'',
limit: 50,
cursor: 'eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ'
})
};
fetch('https://api.arize.com/v2/datasets/{dataset_id}/examples/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.arize.com/v2/datasets/{dataset_id}/examples/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => 'topic = \'arithmetic\'',
'limit' => 50,
'cursor' => 'eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.arize.com/v2/datasets/{dataset_id}/examples/search"
payload := strings.NewReader("{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.arize.com/v2/datasets/{dataset_id}/examples/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/datasets/{dataset_id}/examples/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}"
response = http.request(request)
puts response.read_body{
"examples": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-02T12:00:00Z",
"question": "What is 2 + 2?",
"answer": 4,
"topic": "arithmetic",
"isCorrect": true
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"created_at": "2024-01-02T12:00:00Z",
"updated_at": "2024-01-03T12:00:00Z",
"question": "What is the square root of 16?",
"answer": 4,
"topic": "geometry",
"isCorrect": true
},
{
"id": "9c7f6b2e-4a3d-11e9-8bad-f5b7b8c1ae7e",
"created_at": "2024-01-03T12:00:00Z",
"updated_at": "2024-01-04T12:00:00Z",
"question": "If 3x = 12, what is x?",
"answer": 3,
"topic": "algebra",
"isCorrect": false
}
],
"pagination": {
"next_cursor": "cursor_12345",
"has_more": true
}
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}Search dataset examples
Search examples for a given dataset with an optional SQL-like filter.
Examples are returned in ascending order of created_at, with id as a
tiebreaker. This order is stable across pages. Pagination uses the
cursor returned in pagination.next_cursor; keep the filter unchanged
when requesting subsequent pages.
The filter language supports unprefixed example columns, id, and
annotation.<name>.* when those columns are present in the example
schema.
Payload Requirements
filteris optional. Omitting it returns all examples. A present empty or whitespace-only value is invalid.limitis optional and defaults to 50; valid values are 1 through 500.cursoris optional; omitting it starts at the first page.dataset_version_idis optional; omitting it searches the latest version.
Valid example
{
"filter": "topic = 'arithmetic'",
"limit": 50,
"cursor": "opaque-cursor"
}
Invalid example (limit is outside the supported range)
{
"filter": "topic = 'arithmetic'",
"limit": 501
}
curl --request POST \
--url https://api.arize.com/v2/datasets/{dataset_id}/examples/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"filter": "topic = 'arithmetic'",
"limit": 50,
"cursor": "eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ"
}
EOFimport requests
url = "https://api.arize.com/v2/datasets/{dataset_id}/examples/search"
payload = {
"filter": "topic = 'arithmetic'",
"limit": 50,
"cursor": "eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: 'topic = \'arithmetic\'',
limit: 50,
cursor: 'eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ'
})
};
fetch('https://api.arize.com/v2/datasets/{dataset_id}/examples/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.arize.com/v2/datasets/{dataset_id}/examples/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => 'topic = \'arithmetic\'',
'limit' => 50,
'cursor' => 'eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.arize.com/v2/datasets/{dataset_id}/examples/search"
payload := strings.NewReader("{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.arize.com/v2/datasets/{dataset_id}/examples/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/datasets/{dataset_id}/examples/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": \"topic = 'arithmetic'\",\n \"limit\": 50,\n \"cursor\": \"eyJjcmVhdGVkX2F0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJpZCI6IjQifQ\"\n}"
response = http.request(request)
puts response.read_body{
"examples": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-01T12:00:00Z",
"updated_at": "2024-01-02T12:00:00Z",
"question": "What is 2 + 2?",
"answer": 4,
"topic": "arithmetic",
"isCorrect": true
},
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"created_at": "2024-01-02T12:00:00Z",
"updated_at": "2024-01-03T12:00:00Z",
"question": "What is the square root of 16?",
"answer": 4,
"topic": "geometry",
"isCorrect": true
},
{
"id": "9c7f6b2e-4a3d-11e9-8bad-f5b7b8c1ae7e",
"created_at": "2024-01-03T12:00:00Z",
"updated_at": "2024-01-04T12:00:00Z",
"question": "If 3x = 12, what is x?",
"answer": 3,
"topic": "algebra",
"isCorrect": false
}
],
"pagination": {
"next_cursor": "cursor_12345",
"has_more": true
}
}{
"status": 400,
"title": "Invalid request parameters",
"detail": "The 'name' field is required and must be a non-empty string.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#invalid-request"
}{
"status": 401,
"title": "Authentication required",
"detail": "You must be authenticated to access this resource.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#authentication-required"
}{
"status": 403,
"title": "Access forbidden",
"detail": "You do not have permission to access this resource.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#access-forbidden"
}{
"status": 404,
"title": "Resource not found",
"detail": "The requested resource with ID '12345' was not found.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#resource-not-found"
}{
"status": 422,
"title": "Unprocessable Entity",
"detail": "One or more fields failed validation.",
"instance": "/resource/12345",
"type": "https://arize.com/docs/ax/rest-reference/errors#unprocessable-entity"
}{
"status": 429,
"title": "Rate limit exceeded",
"detail": "You have exceeded the allowed number of requests. Please try again later.",
"instance": "/resource",
"type": "https://arize.com/docs/ax/rest-reference/errors#rate-limit-exceeded"
}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 dataset identifier (base64) A universally unique identifier (base64-encoded opaque string).
"RW50aXR5OjEyMzQ1"
Body
Body containing optional search criteria for dataset examples
Optional criteria for searching a dataset's examples. Omit all fields to
return the first page of examples in ascending order of created_at, with
id as a tiebreaker. Keep the filter unchanged when using a returned
cursor to fetch the next page.
Filters use the same SQL-like language as span search. Supported column
families include unprefixed example columns, id, and
annotation.<name>.* when present in the example schema. A present empty
or whitespace-only filter is invalid.
SQL-like filter expression. Omit to search all examples; an empty or whitespace-only value is invalid.
"topic = 'arithmetic'"
Maximum number of examples to return. Defaults to 50 and must be between 1 and 500.
1 <= x <= 50050
Opaque cursor from pagination.next_cursor. Omit to start at the first page; keep the filter unchanged while paging.
"opaque-cursor"
Unique identifier of the dataset version to search. If omitted, the latest version is selected.
"RGF0YXNldFZlcnNpb246MTIzNDU="
Was this page helpful?