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

# Fetch variables

> Returns a list of the variables in the workspace.



## OpenAPI

````yaml openapi.json get /variables
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /variables:
    get:
      tags:
        - Variables
      summary: Fetch variables
      description: Returns a list of the variables in the workspace.
      responses:
        '200':
          description: Returns an array of variables in the workspace
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - number
                        data:
                          type: object
                          properties:
                            example:
                              anyOf:
                                - type: number
                                - type: string
                            fallback:
                              anyOf:
                                - type: number
                                - type: string
                          required:
                            - example
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - string
                        data:
                          type: object
                          properties:
                            example:
                              type: string
                            fallback:
                              type: string
                          required:
                            - example
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - hyperlink
                        data:
                          type: object
                          properties:
                            text:
                              type: string
                            url:
                              type: string
                          required:
                            - text
                            - url
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - list
                        data:
                          type: array
                          items:
                            type: string
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                    - type: object
                      properties:
                        name:
                          type: string
                          pattern: ^[A-Za-z0-9_]+$
                        type:
                          type: string
                          enum:
                            - map
                        data:
                          type: object
                          additionalProperties:
                            type: string
                        id:
                          type: string
                      required:
                        - name
                        - type
                        - data
                        - id
                example:
                  - id: Age
                    name: Age
                    type: number
                    data:
                      example: 21
                      fallback: '18'
                  - id: Jobs
                    name: Jobs
                    type: string
                    data:
                      example: Engineer
                      fallback: Designer
                  - id: Link
                    name: Link
                    type: hyperlink
                    data:
                      text: View
                      url: https://www.google.com/
                  - id: List
                    name: List
                    type: list
                    data:
                      - 'true'
                      - 'false'
                  - id: Map
                    name: Map
                    type: map
                    data:
                      '0': Zero
                      '1': One
                      '2': Two
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````