> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Span

> Get a span by ID



## OpenAPI

````yaml https://agentex.dev-sgp.scale.com/openapi.json get /spans/{span_id}
openapi: 3.1.0
info:
  title: Agentex API
  version: 0.1.0
servers: []
security: []
paths:
  /spans/{span_id}:
    get:
      tags:
        - Spans
      summary: Get Span
      description: Get a span by ID
      operationId: get_span_spans__span_id__get
      parameters:
        - name: span_id
          in: path
          required: true
          schema:
            type: string
            title: Span Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Span'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Span:
      properties:
        id:
          type: string
          title: Unique Span ID
        trace_id:
          type: string
          title: The trace ID for this span
          description: Unique identifier for the trace this span belongs to
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: The task ID this span is associated with
          description: ID of the task this span belongs to
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: The parent span ID if this is a child span
          description: ID of the parent span if this is a child span in a trace
        name:
          type: string
          title: The name of the span
          description: Name that describes what operation this span represents
        start_time:
          type: string
          format: date-time
          title: The start time of the span
          description: The time the span started
        end_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: The end time of the span
          description: The time the span ended
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: The input data for the span
          description: Input parameters or data for the operation
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: The output data from the span
          description: Output data resulting from the operation
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Additional data associated with the span
          description: Any additional metadata or context for the span
      type: object
      required:
        - id
        - trace_id
        - name
        - start_time
      title: Span
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````