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

# Asset Fields

> Retrieve the fields and operators the asset filter accepts.



## OpenAPI

````yaml GET /api/assets/query/fields
openapi: 3.0.1
info:
  title: EZYiD API
  version: '1.0'
servers:
  - url: https://api-external.ezyid.io
security: []
tags:
  - name: EZYiD.External.API
paths:
  /api/assets/query/fields:
    get:
      tags:
        - EZYiD.External.API
      summary: Asset fields and operators
      description: >-
        Lists the field ids the asset filter accepts, the operators valid on
        each one, and the time range presets. Read this rather than hard-coding
        field names.
      operationId: EZYiDExternalAPIAssetsGetAssetQueryFields
      parameters:
        - name: apiKey
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetQueryFieldsResponse'
        '400':
          description: The API key is missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetQueryError'
        '401':
          description: The API key is revoked or expired.
        '404':
          description: The API key does not exist.
components:
  schemas:
    DatasetQueryFieldsResponse:
      type: object
      properties:
        datasetId:
          type: string
        name:
          type: string
        defaultDateFieldId:
          type: string
          description: >-
            Field the time range shorthand applies to. Null when the dataset has
            no date axis, in which case timeRange is rejected.
          nullable: true
        timeRangePresets:
          type: array
          items:
            type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/DatasetQueryFieldDto'
    DatasetQueryError:
      type: object
      properties:
        error:
          type: string
          description: >-
            What was wrong with the request, naming the field or operator at
            fault.
    DatasetQueryFieldDto:
      type: object
      properties:
        id:
          type: string
          description: Name this field by in filters, sort and fields.
        displayName:
          type: string
        type:
          type: string
          enum:
            - string
            - int
            - decimal
            - date
            - bool
            - enum
        role:
          type: string
          enum:
            - dimension
            - measure
            - both
        operators:
          type: array
          description: The only operators this field accepts.
          items:
            type: string
        values:
          type: array
          description: Codes and labels of an enum field. Null for every other type.
          items:
            $ref: '#/components/schemas/DatasetEnumValueDto'
          nullable: true
    DatasetEnumValueDto:
      type: object
      properties:
        value:
          type: integer
          format: int32
          description: Code stored on the row and returned in responses.
        label:
          type: string
          description: Human-readable name, also accepted in a filter value.

````