Run an evaluator on one trace
const url = 'http://localhost:8080/api/v1/projects/example/evaluators/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/run';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"span_id":"example","trace_id":"example","trace_start":"example","variable_mapping":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/projects/example/evaluators/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/run \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "span_id": "example", "trace_id": "example", "trace_start": "example", "variable_mapping": { "additionalProperty": "example" } }'Project members and above. API keys cannot call it. Queues one run at the highest priority and answers the job; poll GET /eval-jobs/{id}. Shares the 10 per minute per user limit with test runs.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Evaluator id.
Request Bodyrequired
Section titled “Request Bodyrequired”POST /api/v1/projects/{project}/evaluators/{id}/run body.
Deserialize only, because TimeParam has no Serialize. Its Debug is derived: the
mapping holds expressions, not payload.
object
Span of the trace to target, 16 hex digits. Omitted for a trace target; null is refused.
Trace to run on, 32 hex digits.
The trace’s start_time, from the trace detail the UI loaded.
Prompt variable to mapping expression, 1 to 32 variables.
object
Example generated
{ "span_id": "example", "trace_id": "example", "trace_start": "example", "variable_mapping": { "additionalProperty": "example" }}Responses
Section titled “Responses”The queued job.
An eval job. Spec 09 § Evaluation & alerts.
object
Attempts made so far.
Cost of the judge call, in USD.
Creation time. JSON is RFC 3339.
The failure text, without payload content or secrets.
What the caller should do with the failure. Omitted unless the job failed or was requeued.
The evaluator the job runs.
Time the job finished. Omitted while it is queued or running.
Job id.
Input tokens of the judge call.
The judge trace of the run, 32 lowercase hex digits.
Where the job came from.
Latency of the judge call, in milliseconds.
Earliest time the job may run. JSON is RFC 3339.
Output tokens of the judge call.
The rule that queued the job. Omitted for a manual run.
The score the run wrote.
Target span, 16 lowercase hex digits. Omitted for a trace target.
Where the job is in its life.
Target trace, 32 lowercase hex digits.
Example
{ "error_class": "retryable", "kind": "rule", "status": "queued"}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"}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"}