PATCH
/
v5
/
spans
/
{span_id}
/
assessments
/
{assessment_id}
Update Span Assessment
curl --request PATCH \
  --url https://api.egp.scale.com/v5/spans/{span_id}/assessments/{assessment_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "comment": "<string>",
  "rating": 3,
  "approval_status": "approved",
  "rubric": {},
  "metadata": {},
  "overwritten_span_data": {}
}'
{
  "object": "span.assessment",
  "assessment_id": "<string>",
  "trace_id": "<string>",
  "span_id": "<string>",
  "created_by": "<string>",
  "assessment_type": "comment",
  "comment": "<string>",
  "rating": 123,
  "approval_status": "approved",
  "rubric": {},
  "metadata": {},
  "overwritten_span_data": {},
  "account_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Path Parameters

span_id
string
required
assessment_id
string
required

Body

application/json

Request model for updating span assessment

comment
string

Updated comment

rating
integer

Updated rating

Required range: 1 <= x <= 5
approval_status
enum<string>

Updated approval status

Available options:
approved,
rejected
rubric
object

Updated rubric evaluation

metadata
object

Updated arbitrary data

overwritten_span_data
object

Updated corrected span data

Response

Successful Response

Response model for span assessment

assessment_id
string
required

Unique identifier for the assessment

trace_id
string
required

The trace this assessment is attached to

span_id
string
required

The span this assessment is attached to

created_by
string
required

User who submitted the assessment

assessment_type
enum<string>
required

Type of assessment

Available options:
comment,
rating,
approval,
rubric,
overwrite,
metadata
object
enum<string>
default:span.assessment
Available options:
TitleConst
Objectspan.assessment
comment
string

Raw text feedback

rating
integer

Numerical rating

approval_status
enum<string>

Approval status

Available options:
approved,
rejected
rubric
object

Rubric evaluation

metadata
object

Arbitrary data

overwritten_span_data
object

Corrected span data

account_id
string

Account this assessment belongs to

created_at
string<date-time>

When this assessment was created

updated_at
string<date-time>

When this assessment was last updated