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

# Get a machine variable



## OpenAPI

````yaml /openapi.json get /machine-variables/{id}
openapi: 3.1.0
info:
  title: Cula Tracking API
  version: 0.3.10
servers:
  - url: https://api.demo.cula.earth/tracking/v1
security: []
tags:
  - name: Organisations
    description: ''
  - name: Sites
    description: ''
  - name: Machines
    description: ''
  - name: Machine Variables
    description: ''
  - name: Machine Data Imports
    description: ''
  - name: Delivery Configs
    description: ''
  - name: Deliveries
    description: ''
  - name: Material Sourcing Configs
    description: ''
  - name: Material Sourcings
    description: ''
  - name: Material Conversion Configs
    description: ''
  - name: Material Conversions
    description: ''
  - name: Material Utilization Configs
    description: ''
  - name: Material Utilizations
    description: ''
  - name: Material Batches
    description: ''
  - name: Material Pools
    description: ''
  - name: Material Containers
    description: ''
  - name: Sinks
    description: ''
  - name: Documents
    description: ''
  - name: Webhooks
    description: ''
paths:
  /machine-variables/{id}:
    get:
      tags:
        - Machine Variables
      summary: Get a machine variable
      parameters:
        - name: Cula-Organisation-Id
          in: header
          description: >-
            ID of the organisation the request operates on behalf of (e.g.
            `org_...`). Must be an organisation the API client has access to.
          required: true
          schema:
            type: string
            example: org_01k83mfmhgchya944v86ryvhpq
        - name: id
          required: true
          in: path
          schema:
            type: string
            example: mvr_01kae7a2kpkcqwy7fwk2fft11h
      responses:
        '200':
          description: Machine variable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MachineVariableResponse'
        '400':
          description: Invalid request payload or parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: bad_request
                message: The field limit must not be greater than 100.
        '401':
          description: Missing or invalid access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: unauthorized
                message: Invalid or expired token
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: not_found
                message: >-
                  Resource with ID xyz_01k56g7aec6dt5zrtamc72vw446 could not be
                  found.
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: internal_server_error
                message: Internal server error.
      security:
        - AccessToken: []
components:
  schemas:
    MachineVariableResponse:
      type: object
      properties:
        id:
          type: string
          example: mvr_01kae7a2kpkcqwy7fwk2fft11h
          description: Unique identifier of the machine variable.
        name:
          type: string
          example: retentate outlet flow rate
          description: Human-readable name of the machine variable.
        unit:
          type: string
          nullable: true
          example: m3/h
          description: Unit of the measured values. Null means the value is unitless.
        machine_id:
          type: string
          example: mch_01kqzcjrpyf27tge7875y20mmr
          description: The machine this variable belongs to.
        value_type:
          example: float
          description: >-
            Type that values of this variable must conform to when ingesting
            machine data. Variables of type `string`, `date_time` or `text`
            cannot receive imports.
          allOf:
            - $ref: '#/components/schemas/MachineVariableValueType'
        timestamp_precision:
          example: seconds
          description: >-
            Effective storage precision of ingested timestamps. Sub-second
            fractions are truncated for `seconds` variables; two values with the
            same effective timestamp overwrite each other.
          allOf:
            - $ref: '#/components/schemas/MachineVariableTimestampPrecision'
        factor:
          type: number
          nullable: true
          example: 1
          description: Factor applied to raw values during ingestion.
      required:
        - id
        - name
        - unit
        - machine_id
        - value_type
        - timestamp_precision
        - factor
    Error:
      type: object
      properties:
        code:
          type: string
          example: bad_request
        message:
          type: string
          example: The field limit must not be greater than 100.
      required:
        - code
        - message
    MachineVariableValueType:
      type: string
      enum:
        - int8
        - int16
        - int32
        - int64
        - uint8
        - uint16
        - uint32
        - uint64
        - float
        - double
        - boolean
        - string
        - date_time
        - text
      description: >-
        Type that values of this variable must conform to when ingesting machine
        data. Variables of type `string`, `date_time` or `text` cannot receive
        imports.
    MachineVariableTimestampPrecision:
      type: string
      enum:
        - seconds
        - milliseconds
      description: >-
        Effective storage precision of ingested timestamps. Sub-second fractions
        are truncated for `seconds` variables; two values with the same
        effective timestamp overwrite each other.
  securitySchemes:
    AccessToken:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://auth.demo.cula.earth/oauth2/token
          scopes: {}
      description: >-
        OAuth 2.0 client credentials. Exchange your client_id and client_secret
        for an access token scoped to the organisation that provides data
        access.

````