GoRunner docs
Search or askSearch⌘K

List variables

GET/api/workflows/{id}/variables

Lists a workflow’s variables. Sensitive ones come back by name only.

Needs an API token with the Read permission for workflows (workflow:read).

Parameters

Path

idRequired · UUID

The workflow’s ID.

Two kinds

WhatPlainSensitive
Where it is keptIn the draftEncrypted, outside the draft
Read backWith its valueNever: value is ""
Takes effectWhen you publishAt once
In exports and templatesYesNo
In a duplicateYesYes

Steps read both as {{$vars.NAME}}. secretsAvailable is false when the server has no encryption key: sensitive variables can’t be saved there.

Responses

  • 200OK

    Every variable, sensitive ones first, then by name.

  • id isn’t a UUID.

  • The token lacks the Read permission for workflows.

  • No workflow with this ID in the token’s workspace.

  • The sensitive variables couldn’t be read. Try again.

Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.

Request

GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…"  # needs Read for workflows
WORKFLOW_ID="your-workflow-id"

curl "$GORUNNER/api/workflows/$WORKFLOW_ID/variables" \
  -H "Authorization: Bearer $GORUNNER_TOKEN"

Response · 200 OK

json
{
  "data": {
    "variables": [
      {
        "name": "STRIPE_KEY",
        "value": "",
        "isSecret": true
      },
      {
        "name": "SLACK_CHANNEL",
        "value": "#alerts",
        "isSecret": false
      }
    ],
    "secretsAvailable": true,
    "definitionRev": 7,
    "hasUnpublishedChanges": false
  }
}
Every field

It takes no body.

Response · 200 OK

dataobject
variablesarray of objects

Sensitive variables first, then by name.

namestring
valuestring

The value for a PLAIN variable. Always an empty string for a sensitive one — there is no read path for a secret.

isSecretboolean

True = stored encrypted outside the definition and takes effect immediately, without a publish. False = lives in the draft definition and reaches production only when you publish.

secretsAvailableboolean

False when the server has no encryption key configured — writing any isSecret variable will then be refused with 422.

definitionRevinteger

The workflow’s revision as this answer leaves it. Plain variables live in the draft definition, so a PUT moves it: send this as expectedRev on your next write to the workflow (PUT /api/workflows/{id} or this endpoint).

hasUnpublishedChangesboolean

Whether the draft is now ahead of the published version — a variable change on a live workflow takes effect only when published.