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

# Get columns for a datasource

> Returns metadata about the whitelisted columns for a specific datasource that can be used for filtering in reporting queries.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml get /v0/reporting/datasources/{id}/columns
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/reporting/datasources/{id}/columns:
    get:
      tags:
        - Reports
      summary: Get columns for a datasource
      description: >-
        Returns metadata about the whitelisted columns for a specific datasource
        that can be used for filtering in reporting queries.
      operationId: getReportingColumns
      parameters:
        - in: path
          name: id
          schema:
            $ref: '#/components/schemas/ReportingQueryDatasource'
            description: Datasource name
            example: task
          required: true
          description: Datasource name
      responses:
        '200':
          description: Successfully retrieved datasource column metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportingColumnsResponse'
              examples:
                taskDatasource:
                  summary: Task datasource columns
                  value:
                    data:
                      datasource: task
                      columns:
                        - id: id
                          name: Task ID
                          type: string
                        - id: createdAt
                          name: Created Date
                          type: date
                        - id: title
                          name: Title
                          type: string
                        - id: description
                          name: Description
                          type: string
                        - id: type
                          name: Task Type
                          type: string
                        - id: topicId
                          name: Topic
                          type: string
                        - id: lastTest
                          name: Last Test Date
                          type: date
                      isOrgLevel: false
                evalDatasource:
                  summary: Eval datasource columns
                  value:
                    data:
                      datasource: eval
                      columns:
                        - id: id
                          name: Evaluation ID
                          type: string
                        - id: createdAt
                          name: Created Date
                          type: date
                        - id: status
                          name: Status
                          type: string
                        - id: definitionId
                          name: Definition
                          type: string
                        - id: score
                          name: Score
                          type: number
                        - id: passed
                          name: Passed
                          type: boolean
                        - id: testId
                          name: Test
                          type: string
                        - id: taskId
                          name: Task
                          type: string
                        - id: topicId
                          name: Topic
                          type: string
                        - id: tagId
                          name: Tag
                          type: string
                      isOrgLevel: false
                topicDatasource:
                  summary: Topic datasource columns (org-level)
                  value:
                    data:
                      datasource: topic
                      columns:
                        - id: id
                          name: Topic ID
                          type: string
                        - id: createdAt
                          name: Created Date
                          type: date
                        - id: title
                          name: Title
                          type: string
                      isOrgLevel: true
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ReportingQueryDatasource:
      type: string
      enum:
        - task
        - test
        - eval
        - topic
        - tag
        - human_annotation
    ReportingColumnsResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ReportingDatasourceMetadataOutput'
      required:
        - data
      additionalProperties: false
      title: ReportingColumnsResponse
      description: Response containing datasource column metadata
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
    ReportingDatasourceMetadataOutput:
      type: object
      properties:
        datasource:
          $ref: '#/components/schemas/ReportingQueryDatasource'
          description: Datasource name
          example: task
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ReportingColumnMetadataOutput'
          description: List of whitelisted columns for this datasource
        isOrgLevel:
          type: boolean
          description: >-
            Whether this datasource is scoped to organization (true) or
            application (false)
          example: false
      required:
        - datasource
        - columns
        - isOrgLevel
      additionalProperties: false
      title: ReportingDatasourceMetadata
      description: Metadata about a reporting datasource
    ReportingColumnMetadataOutput:
      type: object
      properties:
        id:
          type: string
          description: Column identifier
          example: id
        name:
          type: string
          description: Column name
          example: Evaluation ID
        type:
          type: string
          enum:
            - string
            - number
            - date
            - boolean
          description: Column data type
          example: string
      required:
        - id
        - name
        - type
      additionalProperties: false
      title: ReportingColumnMetadata
      description: Metadata about a column in a datasource
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````