---
title: "get variable"
method: GET
path: "/w/{workspace}/variables/get/{path}"
tags: ["variable"]
---

# get variable

`GET /w/{workspace}/variables/get/{path}`

## Path parameters

- `workspace` string, required
- `path` string, required

## Query parameters

- `decrypt_secret` boolean
- `include_encrypted` boolean
- `get_draft` boolean

## Response `200`

variable

- object — Overlay fields added to every "get by path" response that accepts the `get_draft` query parameter. The deployed payload is sent untouched in the response body; the authed user's saved draft for this path — whatever shape the editor wrote — is attached as the sibling `draft` field when `get_draft=true` and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them. When `no_deployed=true` there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only `draft` is canonical. Callers should disable "diff vs deployed" UI in that case.
  - `workspace_id` string, required
  - `path` string, required
  - `value` string
  - `is_secret` boolean, required
  - `description` string
  - `account` integer
  - `is_oauth` boolean
  - `extra_perms` object, required
  - `is_expired` boolean
  - `refresh_error` string
  - `is_linked` boolean
  - `is_refreshed` boolean
  - `expires_at` string, date-time
  - `labels` string[]
  - `inherited_labels` string[] — Labels inherited from the parent folder, computed at read time. Read-only — edit them on the folder.
  - `ws_specific` boolean
  - `edited_at` string, date-time
  - `edited_by` string
  - `draft_only` boolean — True when this row is a per-user draft with no deployed variable at the same path. Frontend renders a "Draft" badge.
  - `is_draft` boolean, required — True when the authed user has a per-user draft at this path (over a deployed row or a synthesized draft-only row). Frontend appends a `*` to the displayed name.
  - `draft_saved_at` string, date-time
  - `no_deployed` boolean
  - `draft` object
  - `other_drafts_users` object[] — Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's "get by path" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI.
    - `username` string, nullable — Workspace username of the draft owner. `null` represents the legacy workspace-level (NULL-email) row. Emails never leave the server.
    - `draft_saved_at` string, date-time, required — When this user's draft was last saved (`draft.created_at`), surfaced in the fork modal as "Last updated".

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/versions/155a35b3caff/schema)
