cURL
curl --request GET \
--url http://studio.premai.io/api/v1/traces \
--header 'Authorization: Bearer <token>'import requests
url = "http://studio.premai.io/api/v1/traces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://studio.premai.io/api/v1/traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"modelId": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input": "<string>",
"output": "<string>",
"score": 0.5,
"feedback": "<string>",
"addedToDataset": true,
"processingStatus": "none"
}
],
"total": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Traces API
Get Traces
Use this endpoint to get the list of traces.
GET
/
api
/
v1
/
traces
cURL
curl --request GET \
--url http://studio.premai.io/api/v1/traces \
--header 'Authorization: Bearer <token>'import requests
url = "http://studio.premai.io/api/v1/traces"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://studio.premai.io/api/v1/traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"modelId": "<string>",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"input": "<string>",
"output": "<string>",
"score": 0.5,
"feedback": "<string>",
"addedToDataset": true,
"processingStatus": "none"
}
],
"total": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number to retrieve. Page size is fixed.
Required range:
x > 0Comma separated list of model IDs or aliases to filter traces.
Project identifier to filter traces.
Sort traces by creation time or score.
Available options:
createdAt, score Sort order to use for the selected sortBy field.
Available options:
asc, desc Was this page helpful?