List annotation configs - Arize AX Docs
List annotation configs
cURL
curl --request GET \
--url 'https://api.arize.com/v2/annotation-configs?limit=50' \
--header 'Authorization: Bearer <token>'
Python
import requests
url = "https://api.arize.com/v2/annotation-configs?limit=50"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
JavaScript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.arize.com/v2/annotation-configs?limit=50', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [\
CURLOPT_URL => "https://api.arize.com/v2/annotation-configs?limit=50",\
CURLOPT_RETURNTRANSFER => true,\
CURLOPT_ENCODING => "",\
CURLOPT_MAXREDIRS => 10,\
CURLOPT_TIMEOUT => 30,\
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
CURLOPT_CUSTOMREQUEST => "GET",\
CURLOPT_HTTPHEADER => [\
"Authorization: Bearer <token>"\
],\
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
}
Go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.arize.com/v2/annotation-configs?limit=50"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Java (Unirest)
HttpResponse<String> response = Unirest.get("https://api.arize.com/v2/annotation-configs?limit=50")
.header("Authorization", "Bearer <token>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://api.arize.com/v2/annotation-configs?limit=50")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body
Expected Responses
200 OK
{
"annotation_configs": [
{
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"space_id": "<string>",
"type": "CONTINUOUS",
"minimum_score": 123,
"maximum_score": 123,
"optimization_direction": "NONE"
}
],
"pagination": {
"has_more": true,
"next_cursor": "<string>"
}
}
400 Bad Request
{
"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"
}
401 Unauthorized
{
"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"
}
403 Forbidden
{
"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"
}
404 Not Found
{
"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"
}
429 Too Many Requests
{
"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"
}
Query Parameters
- space_id: string - Filter search results to a particular space ID.
- space_name: string - Case-insensitive substring filter on the space name.
- name: string - Case-insensitive substring filter on the resource name.
- limit: integer - Maximum items to return (default 50, range: 1-100).
- cursor: string - Opaque pagination cursor from a previous response.
Response
Returns a list of annotation config objects.