Skip to content

Span Assessments

Create span assessment
client.spanAssessments.create(SpanAssessmentCreateParams { assessment_type, trace_id, approval, 6 more } body, RequestOptionsoptions?): SpanAssessment { assessment_id, assessment_type, created_by, 12 more }
POST/v5/span-assessments
Get span assessment by ID
client.spanAssessments.retrieve(stringspanAssessmentID, RequestOptionsoptions?): SpanAssessment { assessment_id, assessment_type, created_by, 12 more }
GET/v5/span-assessments/{span_assessment_id}
List span or trace assessments
client.spanAssessments.list(SpanAssessmentListParams { assessment_type, span_id, trace_id } query?, RequestOptionsoptions?): APIListPage<SpanAssessment { assessment_id, assessment_type, created_by, 12 more } >
GET/v5/span-assessments
Update span assessment
client.spanAssessments.update(stringspanAssessmentID, SpanAssessmentUpdateParams { approval, assessment_type, comment, 4 more } body, RequestOptionsoptions?): SpanAssessment { assessment_id, assessment_type, created_by, 12 more }
PATCH/v5/span-assessments/{span_assessment_id}
Permanently delete span assessment
client.spanAssessments.delete(stringspanAssessmentID, RequestOptionsoptions?): SpanAssessmentDeleteResponse { id, deleted, object }
DELETE/v5/span-assessments/{span_assessment_id}
ModelsExpand Collapse
ApprovalStatus = "approved" | "rejected"

Status options for approval assessments

One of the following:
"approved"
"rejected"
AssessmentType = "comment" | "rating" | "approval" | 3 more

Types of assessments that can be provided

One of the following:
"comment"
"rating"
"approval"
"rubric"
"metadata"
"overwrite"
SpanAssessment { assessment_id, assessment_type, created_by, 12 more }

Response model for span assessment

assessment_id: string

Unique identifier for the assessment

assessment_type: AssessmentType

Type of assessment

One of the following:
"comment"
"rating"
"approval"
"rubric"
"metadata"
"overwrite"
created_by: string

User who submitted the assessment

span_id: string

The span this assessment is attached to

trace_id: string

The trace this assessment is attached to

account_id?: string

Account this assessment belongs to

approval?: ApprovalStatus

Approval status (approved/rejected)

One of the following:
"approved"
"rejected"
comment?: string

Raw text feedback

created_at?: string

When this assessment was created

formatdate-time
metadata?: Record<string, unknown>

Arbitrary JSON object for additional data

object?: "span.assessment"
overwrite?: Record<string, unknown>

User corrections to span output

rating?: number

Numerical rating (1-5)

maximum5
minimum1
rubric?: Record<string, string>

Rule key-value pairs for rubric evaluation

updated_at?: string

When this assessment was last updated

formatdate-time
SpanAssessmentDeleteResponse { id, deleted, object }
id: string
deleted: boolean
object?: "span.assessment"