> ## 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 Evaluation Data Schema

> Describe the data schema of an evaluation's items.

Inspects the item `data` and task-result fields and returns each discovered field with its
flattened key path, JSON type, source, and the number of items containing it, ordered
alphabetically by field name. For large evaluations the schema may be inferred from a sample of
items, in which case `is_sampled` is set and `sample_size` reports how many were analyzed. Set
`include_archived` to include archived items in the analysis.



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json get /v5/evaluations/{evaluation_id}/schema
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/evaluations/{evaluation_id}/schema:
    get:
      tags:
        - Evaluations
      summary: Get Evaluation Data Schema
      description: >-
        Describe the data schema of an evaluation's items.


        Inspects the item `data` and task-result fields and returns each
        discovered field with its

        flattened key path, JSON type, source, and the number of items
        containing it, ordered

        alphabetically by field name. For large evaluations the schema may be
        inferred from a sample of

        items, in which case `is_sampled` is set and `sample_size` reports how
        many were analyzed. Set

        `include_archived` to include archived items in the analysis.
      operationId: GET-V5-/v5/evaluations/evaluation_id/schema
      parameters:
        - name: evaluation_id
          in: path
          required: true
          schema:
            type: string
            title: Evaluation Id
        - name: include_archived
          in: query
          required: false
          schema:
            type: boolean
            description: Include archived items in schema analysis
            default: false
            title: Include Archived
          description: Include archived items in schema analysis
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EvaluationSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    EvaluationSchema:
      properties:
        object:
          type: string
          const: evaluation_schema
          title: Object
          default: evaluation_schema
        evaluation_id:
          type: string
          title: Evaluation Id
          description: The ID of the evaluation
        total_items:
          type: integer
          minimum: 0
          title: Total Items
          description: Total number of evaluation items
        fields:
          items:
            $ref: '#/components/schemas/FieldSchema'
          type: array
          title: Fields
          description: List of all discovered fields, ordered alphabetically by field_name
        is_sampled:
          type: boolean
          title: Is Sampled
          description: >-
            Whether schema was computed from a sample of items (for large
            evaluations)
          default: false
        sample_size:
          title: Sample Size
          description: Number of items sampled for schema inference, if applicable
          type: integer
          minimum: 0
      type: object
      required:
        - evaluation_id
        - total_items
        - fields
      description: Schema information for an evaluation's item data structure
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FieldSchema:
      properties:
        object:
          type: string
          const: field_schema
          title: Object
          default: field_schema
        field_name:
          type: string
          title: Field Name
          description: The flattened JSON key path (e.g., 'metadata.category')
        data_type:
          type: string
          title: Data Type
          description: >-
            JSON type: 'string', 'number', 'boolean', 'object', 'array', or
            'null'
        item_count:
          type: integer
          minimum: 0
          title: Item Count
          description: Number of evaluation items containing this field
        source:
          type: string
          enum:
            - data
            - task_result_cache
          title: Source
          description: 'The source of the field: ''data'' or ''task_result_cache'''
      type: object
      required:
        - field_name
        - data_type
        - item_count
        - source
      description: Schema information for a single field in evaluation item data
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````