Apache Airflow · Capability

Airflow API — Variable

Airflow API — Variable. 6 operations. Lead operation: Airflow Get Variables. Self-contained Naftiko capability covering one Airflow business surface.

Run with Naftiko AirflowVariable

What You Can Do

GET
Getvariables — Airflow Get Variables
/v1/api/v2/variables
POST
Postvariable — Airflow Post Variable
/v1/api/v2/variables
PATCH
Bulkvariables — Airflow Bulk Variables
/v1/api/v2/variables
DELETE
Deletevariable — Airflow Delete Variable
/v1/api/v2/variables/{variable-key}
GET
Getvariable — Airflow Get Variable
/v1/api/v2/variables/{variable-key}
PATCH
Patchvariable — Airflow Patch Variable
/v1/api/v2/variables/{variable-key}

MCP Tools

airflow-get-variables

Airflow Get Variables

read-only idempotent
airflow-post-variable

Airflow Post Variable

airflow-bulk-variables

Airflow Bulk Variables

idempotent
airflow-delete-variable

Airflow Delete Variable

idempotent
airflow-get-variable

Airflow Get Variable

read-only idempotent
airflow-patch-variable

Airflow Patch Variable

idempotent

Capability Spec

airflow-variable.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Airflow API — Variable
  description: 'Airflow API — Variable. 6 operations. Lead operation: Airflow Get Variables. Self-contained Naftiko capability
    covering one Airflow business surface.'
  tags:
  - Airflow
  - Variable
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    AIRFLOW_API_KEY: AIRFLOW_API_KEY
capability:
  consumes:
  - type: http
    namespace: airflow-variable
    baseUri: ''
    description: Airflow API — Variable business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-variables
      path: /api/v2/variables
      operations:
      - name: getvariables
        method: GET
        description: Airflow Get Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: integer
        - name: offset
          in: query
          type: integer
        - name: order_by
          in: query
          type: array
          description: 'Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported
            attributes: `key, id, _val, description, is_encrypted,'
        - name: variable_key_pattern
          in: query
          type: string
          description: 'SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). or the pipe `|` operator for OR
            logic (e.g. `dag1 | dag2`). Regular expressions are **not** '
      - name: postvariable
        method: POST
        description: Airflow Post Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: bulkvariables
        method: PATCH
        description: Airflow Bulk Variables
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-variables-variable_key
      path: /api/v2/variables/{variable_key}
      operations:
      - name: deletevariable
        method: DELETE
        description: Airflow Delete Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: variable_key
          in: path
          type: string
          required: true
      - name: getvariable
        method: GET
        description: Airflow Get Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: variable_key
          in: path
          type: string
          required: true
      - name: patchvariable
        method: PATCH
        description: Airflow Patch Variable
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: variable_key
          in: path
          type: string
          required: true
        - name: update_mask
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.AIRFLOW_API_KEY}}'
  exposes:
  - type: rest
    namespace: airflow-variable-rest
    port: 8080
    description: REST adapter for Airflow API — Variable. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v2/variables
      name: api-v2-variables
      description: REST surface for api-v2-variables.
      operations:
      - method: GET
        name: getvariables
        description: Airflow Get Variables
        call: airflow-variable.getvariables
        with:
          limit: rest.limit
          offset: rest.offset
          order_by: rest.order_by
          variable_key_pattern: rest.variable_key_pattern
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postvariable
        description: Airflow Post Variable
        call: airflow-variable.postvariable
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: bulkvariables
        description: Airflow Bulk Variables
        call: airflow-variable.bulkvariables
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/variables/{variable-key}
      name: api-v2-variables-variable-key
      description: REST surface for api-v2-variables-variable_key.
      operations:
      - method: DELETE
        name: deletevariable
        description: Airflow Delete Variable
        call: airflow-variable.deletevariable
        with:
          variable_key: rest.variable_key
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getvariable
        description: Airflow Get Variable
        call: airflow-variable.getvariable
        with:
          variable_key: rest.variable_key
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchvariable
        description: Airflow Patch Variable
        call: airflow-variable.patchvariable
        with:
          variable_key: rest.variable_key
          update_mask: rest.update_mask
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: airflow-variable-mcp
    port: 9090
    transport: http
    description: MCP adapter for Airflow API — Variable. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: airflow-get-variables
      description: Airflow Get Variables
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: airflow-variable.getvariables
      with:
        limit: tools.limit
        offset: tools.offset
        order_by: tools.order_by
        variable_key_pattern: tools.variable_key_pattern
      outputParameters:
      - type: object
        mapping: $.
    - name: airflow-post-variable
      description: Airflow Post Variable
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: airflow-variable.postvariable
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: airflow-bulk-variables
      description: Airflow Bulk Variables
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: airflow-variable.bulkvariables
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: airflow-delete-variable
      description: Airflow Delete Variable
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: airflow-variable.deletevariable
      with:
        variable_key: tools.variable_key
      outputParameters:
      - type: object
        mapping: $.
    - name: airflow-get-variable
      description: Airflow Get Variable
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: airflow-variable.getvariable
      with:
        variable_key: tools.variable_key
      outputParameters:
      - type: object
        mapping: $.
    - name: airflow-patch-variable
      description: Airflow Patch Variable
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: airflow-variable.patchvariable
      with:
        variable_key: tools.variable_key
        update_mask: tools.update_mask
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.