List scores
const url = 'http://localhost:8080/api/v1/projects/example/scores?target=span&source=api&limit=50';const options = {method: 'GET', headers: {cookie: 'cetra_session=<cetra_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/projects/example/scores?target=span&source=api&limit=50' \ --cookie cetra_session=<cetra_session>Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Query Parameters
Section titled “Query Parameters”What a score is attached to.
Spec 01 § Score target.
Kind of target to return.
Trace id, 16 bytes as hex. Responses use lowercase; requests may use either case. All zeros is invalid.
Scores attached to this trace.
Span id, 8 bytes as hex. Responses use lowercase; requests may use either case. All zeros is invalid.
Scores attached to this span.
Scores attached to this session.
Score name.
Who wrote a score.
Spec 01 § Score source and spec 06 § Scores.
Who wrote the score.
Scores written by this evaluator.
Scores written by this online rule.
Only scores written from this annotation queue (D-AQ-6).
RFC 3339 timestamp or epoch milliseconds.
Inclusive created_at start. RFC 3339 or epoch milliseconds.
RFC 3339 timestamp or epoch milliseconds.
Exclusive created_at end. RFC 3339 or epoch milliseconds.
Page size. Default 50, accepted range 1–1000.
Spec 09 § Conventions.
Maximum number of items to return (1–1000, default 50).
Opaque cursor from a previous page.
Responses
Section titled “Responses”One page of scores.
One page of results. next_cursor is null when there is no next page.
object
Items in this page.
One score row.
Spec 01 § Score. JSON omits empty Option and BTreeMap fields. Instants are RFC 3339 (D64).
object
Person who annotated, for human scores. Spec 01 author_user_id.
Creation time: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 created_at.
Dataset item the score belongs to. Spec 01 dataset_item_id.
Tombstone. Spec 01 deleted.
Evaluator that produced the score. Spec 01 evaluator_id.
Experiment the score belongs to. Spec 01 experiment_id.
Server receive time: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 ingest_time.
Evaluator metadata. Values are strings. Spec 01 metadata and spec 06.
object
Score name, for example hallucination. Spec 01 name.
Partition key. Spec 01 project_id.
Annotation queue the score was written from (D-AQ-6). Spec 01 queue_id.
Explanation. Spec 01 reason.
Online rule that produced the score. Spec 01 rule_id.
Last-writer-wins key. Spec 01 score_id.
Session of a span or trace target, when known. Ignored for session targets. Spec 01 session_id.
Who wrote the score. Spec 01 source.
Span, trace, or session this score is attached to. Spec 01 target.
One span. Both ids are required.
object
The span.
Trace that owns the span.
One trace.
object
The trace.
One session.
object
Session id.
Last-writer-wins version: i64 nanoseconds in Rust, an RFC 3339 string in JSON (D64). Spec 01 updated_at.
End-user id, when the writer knows it. Spec 01 user_id.
The score value. Spec 01 data_type, value_num, value_str.
A finite number.
object
A finite number.
True or false. Stored numerically as 1 or 0.
object
True or false. Stored numerically as 1 or 0.
A label and an optional numeric mapping.
object
A label and an optional numeric mapping.
object
Category label. Stored in value_str.
Optional numeric mapping. Stored in value_num. Omitted from JSON when absent.
Free text.
object
Free text.
Opaque cursor for the next page, or null when this is the last page.
Example
{ "data": [ { "source": "api", "target": { "type": "span" }, "value": { "data_type": "numeric" } } ]}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
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).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The server is busy or a dependency is unavailable. Retry later.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}