> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a single span by span_identifier

> Fetch a single span by identifier. The identifier may be either a Global ID or an OpenTelemetry span_id. Returns the span in the same shape as the elements of the list-spans endpoint.



## OpenAPI

````yaml get /v1/spans/{span_identifier}
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/spans/{span_identifier}:
    get:
      tags:
        - spans
      summary: Get a single span by span_identifier
      description: >-
        Fetch a single span by identifier. The identifier may be either a Global
        ID or an OpenTelemetry span_id. Returns the span in the same shape as
        the elements of the list-spans endpoint.
      operationId: getSpan
      parameters:
        - name: span_identifier
          in: path
          required: true
          schema:
            type: string
            description: 'The span identifier: either a Global ID or OpenTelemetry span_id'
            title: Span Identifier
          description: 'The span identifier: either a Global ID or OpenTelemetry span_id'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSpanResponseBody'
        '403':
          content:
            text/plain:
              schema:
                type: string
          description: Forbidden
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetSpanResponseBody:
      properties:
        data:
          $ref: '#/components/schemas/Span'
      type: object
      required:
        - data
      title: GetSpanResponseBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Span:
      properties:
        id:
          type: string
          title: Id
          description: Span Global ID, distinct from the OpenTelemetry span ID
          default: ''
        name:
          type: string
          title: Name
          description: Name of the span operation
        context:
          $ref: '#/components/schemas/SpanContext'
          description: Span context containing trace_id and span_id
        span_kind:
          type: string
          title: Span Kind
          description: Type of work that the span encapsulates
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
          description: OpenTelemetry span ID of the parent span
        start_time:
          type: string
          format: date-time
          title: Start Time
          description: Start time of the span (must be timezone-aware)
        end_time:
          type: string
          format: date-time
          title: End Time
          description: End time of the span (must be timezone-aware)
        status_code:
          type: string
          title: Status Code
          description: Status code of the span
        status_message:
          type: string
          title: Status Message
          description: Status message
          default: ''
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          description: Span attributes
        events:
          items:
            $ref: '#/components/schemas/SpanEvent'
          type: array
          title: Events
          description: Span events
      type: object
      required:
        - name
        - context
        - span_kind
        - start_time
        - end_time
        - status_code
      title: Span
      examples:
        - attributes:
            llm.model_name: gpt-4
            llm.token_count.completion: 50
            llm.token_count.prompt: 100
          context:
            span_id: 1a2b3c4d5e6f7a8b
            trace_id: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
          end_time: '2024-01-01T12:00:01Z'
          events: []
          name: llm_call
          span_kind: LLM
          start_time: '2024-01-01T12:00:00Z'
          status_code: OK
          status_message: ''
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SpanContext:
      properties:
        trace_id:
          type: string
          title: Trace Id
          description: OpenTelemetry trace ID
        span_id:
          type: string
          title: Span Id
          description: OpenTelemetry span ID
      type: object
      required:
        - trace_id
        - span_id
      title: SpanContext
      examples:
        - span_id: 1a2b3c4d5e6f7a8b
          trace_id: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
    SpanEvent:
      properties:
        name:
          type: string
          title: Name
          description: Name of the event
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: When the event occurred (must be timezone-aware)
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          description: Event attributes
      type: object
      required:
        - name
        - timestamp
      title: SpanEvent
      examples:
        - attributes:
            exception.message: Connection refused
          name: exception
          timestamp: '2024-01-01T12:00:00Z'

````