Get span assessment by ID
span_assessments.retrieve(strspan_assessment_id) -> SpanAssessment
GET/v5/span-assessments/{span_assessment_id}
Retrieve a single span assessment by its identifier.
Returns the assessment’s type and content fields, the span and trace it is attached to, and the identity that created it. Returns 404 if no assessment with that id exists for the caller’s account. Use the list endpoint instead when you have a span or trace id rather than an assessment id.
Get span assessment by ID
import os
from scale_gp_beta import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
span_assessment = client.span_assessments.retrieve(
"span_assessment_id",
)
print(span_assessment.assessment_id){
"assessment_id": "assessment_id",
"assessment_type": "comment",
"created_by": "created_by",
"span_id": "span_id",
"trace_id": "trace_id",
"account_id": "account_id",
"approval": "approved",
"comment": "comment",
"created_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "bar"
},
"object": "span.assessment",
"overwrite": {
"foo": "bar"
},
"rating": 1,
"rubric": {
"foo": "string"
},
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"assessment_id": "assessment_id",
"assessment_type": "comment",
"created_by": "created_by",
"span_id": "span_id",
"trace_id": "trace_id",
"account_id": "account_id",
"approval": "approved",
"comment": "comment",
"created_at": "2019-12-27T18:11:19.117Z",
"metadata": {
"foo": "bar"
},
"object": "span.assessment",
"overwrite": {
"foo": "bar"
},
"rating": 1,
"rubric": {
"foo": "string"
},
"updated_at": "2019-12-27T18:11:19.117Z"
}