Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

List scores

GET
/api/v1/projects/{project}/scores
curl --request GET \
--url 'http://localhost:8080/api/v1/projects/example/scores?target=span&source=api&limit=50' \
--cookie cetra_session=<cetra_session>
project
required
string

Project UUID, URL-encoded org-slug/project-slug, or current.

target

What a score is attached to.

Spec 01 § Score target.

string
Allowed values: span trace session

Kind of target to return.

trace_id

Trace id, 16 bytes as hex. Responses use lowercase; requests may use either case. All zeros is invalid.

string
/^[0-9a-fA-F]{32}$/

Scores attached to this trace.

span_id

Span id, 8 bytes as hex. Responses use lowercase; requests may use either case. All zeros is invalid.

string
/^[0-9a-fA-F]{16}$/

Scores attached to this span.

session_id
string

Scores attached to this session.

name
string

Score name.

source

Who wrote a score.

Spec 01 § Score source and spec 06 § Scores.

string
Allowed values: api sdk human end_user llm_judge check webhook issue

Who wrote the score.

evaluator_id
string format: uuid

Scores written by this evaluator.

rule_id
string format: uuid

Scores written by this online rule.

queue_id
string format: uuid

Only scores written from this annotation queue (D-AQ-6).

from

RFC 3339 timestamp or epoch milliseconds.

string

Inclusive created_at start. RFC 3339 or epoch milliseconds.

to

RFC 3339 timestamp or epoch milliseconds.

string

Exclusive created_at end. RFC 3339 or epoch milliseconds.

limit

Page size. Default 50, accepted range 1–1000.

Spec 09 § Conventions.

integer format: int32
default: 50 >= 1 <= 1000

Maximum number of items to return (1–1000, default 50).

cursor
string

Opaque cursor from a previous page.

One page of scores.

Media typeapplication/json

One page of results. next_cursor is null when there is no next page.

object
data
required

Items in this page.

Array<object>

One score row.

Spec 01 § Score. JSON omits empty Option and BTreeMap fields. Instants are RFC 3339 (D64).

object
author_user_id

Person who annotated, for human scores. Spec 01 author_user_id.

string format: uuid
created_at
required

Creation time: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 created_at.

string format: date-time
dataset_item_id

Dataset item the score belongs to. Spec 01 dataset_item_id.

string format: uuid
deleted
required

Tombstone. Spec 01 deleted.

boolean
evaluator_id

Evaluator that produced the score. Spec 01 evaluator_id.

string format: uuid
experiment_id

Experiment the score belongs to. Spec 01 experiment_id.

string format: uuid
ingest_time
required

Server receive time: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 ingest_time.

string format: date-time
metadata

Evaluator metadata. Values are strings. Spec 01 metadata and spec 06.

object
key
additional properties
string
name
required

Score name, for example hallucination. Spec 01 name.

string
project_id
required

Partition key. Spec 01 project_id.

string format: uuid
queue_id

Annotation queue the score was written from (D-AQ-6). Spec 01 queue_id.

string format: uuid
reason

Explanation. Spec 01 reason.

string
rule_id

Online rule that produced the score. Spec 01 rule_id.

string format: uuid
score_id
required

Last-writer-wins key. Spec 01 score_id.

string format: uuid
session_id

Session of a span or trace target, when known. Ignored for session targets. Spec 01 session_id.

string
source
required

Who wrote the score. Spec 01 source.

string
Allowed values: api sdk human end_user llm_judge check webhook issue
target
required

Span, trace, or session this score is attached to. Spec 01 target.

One of:

One span. Both ids are required.

object
span_id
required

The span.

string
/^[0-9a-fA-F]{16}$/
trace_id
required

Trace that owns the span.

string
/^[0-9a-fA-F]{32}$/
type
required
string
Allowed values: span
updated_at
required

Last-writer-wins version: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 updated_at.

string format: date-time
user_id

End-user id, when the writer knows it. Spec 01 user_id.

string
value
required

The score value. Spec 01 data_type, value_num, value_str.

One of:

A finite number.

object
data_type
required
string
Allowed values: numeric
value
required

A finite number.

number format: double
next_cursor
required

Opaque cursor for the next page, or null when this is the last page.

string | null

Example

{
"data": [
{
"source": "api",
"target": {
"type": "span"
},
"value": {
"data_type": "numeric"
}
}
]
}

The request is malformed or a filter is invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

No credentials, or the credentials are invalid.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The resource does not exist.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The query took longer than its time limit, needed more memory or temporary disk space than allowed, a filter deletion matched more than 100,000 traces, or the owner cannot be that user (code owner_not_allowed).

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

Too many requests.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}

The server is busy or a dependency is unavailable. Retry later.

Media typeapplication/problem+json

RFC 7807 problem document.

Spec 09 § Conventions.

object
code
required

Machine-readable error code.

string
Allowed values: bad_request invalid_filter query_failed query_timeout query_too_large too_many_traces too_many_items busy restore_mode unauthorized forbidden sso_required email_not_verified plan_limit plan_required scim_managed owner_not_allowed not_found method_not_allowed payload_too_large unsupported_media_type range_not_satisfiable conflict authorization_pending slow_down access_denied expired_token quota_exceeded rate_limited internal
detail

Extra explanation. Omitted when absent.

string
errors

Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.

Array<object>

One field that failed validation.

Spec 09 § Conventions.

object
field
required

Request field, query parameter, or expression the error refers to.

string
message
required

What is wrong with the field.

string
position

Location inside the field value, for filter and SQL errors.

object
column
required

1-based column number, in characters.

integer format: int32
line
required

1-based line number, in characters.

integer format: int32
status
required

HTTP status code.

integer format: int32
title
required

Short human-readable summary, the reason phrase of status.

string
type
required

Problem type URI. Always about:blank in this version.

string

Example

{
"code": "bad_request"
}