> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/global-variable-api/get-global-variable-by-id.md).

# Get Global Variable by ID

Fetch a single global variable by its entity ID (`data.id` from the create response or the list response). The response includes the full variable object, including `checksum` - copy it before calling update.

The `value` field is masked as `***` when `isSecret` is `true`.

## Get global variable by id

> Fetch a single global variable by its entity ID.\
> \
> \*\*Response \`data\`\*\* is the full variable object: \`id\`, \`name\`, \`dataType\`, \`value\` (masked for secrets), \`isSecret\`, \`canReset\`, \`checksum\`, \`createdAt\` and \`updatedAt\`.\
> \
> \*\*Copy \`data.checksum\`\*\* from this response before calling update.

```json
{"openapi":"3.0.3","info":{"title":"Nected Global Variable API (Dev V1)","version":"1.0"},"tags":[{"name":"Global Variable API","description":"The Global Variable API lets you list, create, read and update **global variables** in your workspace. Global variables are reusable, named values referenced across rules and workflows, useful for configuration values, feature flags, rate constants and secrets.\n\nAll endpoints follow the generic `/dev/v1/{entity-type}` path, with `entity-type` set to `variable`.\n\n**Supported operations:** list, create, get and update. Delete is not available in the `/dev/v1` API.\n\n**Supported `dataType` values:** `string`, `numeric`, `boolean`, `json`.\n\n**`checksum` and optimistic locking:** updating a variable requires its current `checksum` in the request body. Get it from the create response or from a get response. If it doesn't match the server's current checksum, the update is rejected.\n\n**Secret variables:** when `isSecret` is `true`, the `value` is masked as `***` in all get and list responses."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Your Nected API key. Obtain from workspace settings."}},"schemas":{"VariableResponse":{"type":"object","description":"Success response for get by id","properties":{"data":{"$ref":"#/components/schemas/GlobalVariable"},"code":{"type":"string"},"message":{"type":"string"}}},"GlobalVariable":{"type":"object","description":"A global variable object as returned by get and list endpoints","properties":{"id":{"type":"string","description":"The variable's entity ID"},"name":{"type":"string","description":"Unique variable name within the workspace"},"dataType":{"type":"string","description":"Data type — one of `string`, `numeric`, `boolean`, `json`","enum":["string","numeric","boolean","json"]},"value":{"description":"Variable value. Masked as `***` in responses when `isSecret` is true."},"isSecret":{"type":"boolean","description":"When true, value is masked in all get and list responses"},"canReset":{"type":"boolean","description":"When true, the variable can be reset to its original value via the UI"},"checksum":{"type":"string","description":"Current checksum — required to update the variable"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","description":"Error response wrapper","properties":{"code":{"type":"string"},"message":{"type":"string","description":"Human-readable error description"},"data":{"type":"object","nullable":true}}}}},"paths":{"/dev/v1/variable/{entity-id}":{"get":{"operationId":"getGlobalVariableById","tags":["Global Variable API"],"summary":"Get global variable by id","description":"Fetch a single global variable by its entity ID.\n\n**Response `data`** is the full variable object: `id`, `name`, `dataType`, `value` (masked for secrets), `isSecret`, `canReset`, `checksum`, `createdAt` and `updatedAt`.\n\n**Copy `data.checksum`** from this response before calling update.","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional)","schema":{"type":"string"}},{"name":"entity-id","in":"path","required":true,"description":"The variable's entity ID (from the create response `data.id`)","schema":{"type":"string"}},{"name":"version","in":"query","required":false,"description":"Specific version to fetch. Omit for the current version.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK — full variable object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariableResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no variable with that entity ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
