## Get span assessment by ID

**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.

### Path Parameters

- `span_assessment_id: string`

### Returns

- `SpanAssessment object { 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

    - `"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: optional string`

    Account this assessment belongs to

  - `approval: optional ApprovalStatus`

    Approval status (approved/rejected)

    - `"approved"`

    - `"rejected"`

  - `comment: optional string`

    Raw text feedback

  - `created_at: optional string`

    When this assessment was created

  - `metadata: optional map[unknown]`

    Arbitrary JSON object for additional data

  - `object: optional "span.assessment"`

    - `"span.assessment"`

  - `overwrite: optional map[unknown]`

    User corrections to span output

  - `rating: optional number`

    Numerical rating (1-5)

  - `rubric: optional map[string]`

    Rule key-value pairs for rubric evaluation

  - `updated_at: optional string`

    When this assessment was last updated

### Example

```http
curl https://api.egp.scale.com/v5/span-assessments/$SPAN_ASSESSMENT_ID \
    -H "x-api-key: $SGP_API_KEY"
```

#### Response

```json
{
  "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"
}
```
