Skip to content

variable

The variable domain has 6 actions. On the meta surface they are all reached through arcane_variable; on the individual surface each one is its own tool; on the dynamic surface run them with arcane_execute_action and the canonical ID.

ActionTitleKind
variable.createCreate a global variablewrite
variable.deleteDelete a global variabledestructive
variable.listList global variablesread
variable.syncSync global variableswrite
variable.sync_statusGet variable sync statusread
variable.updateUpdate a global variablewrite

Create a global variable

Create a global variable scoped to all or specific environments

  • Kind: write
  • Required parameters: key, value
  • Meta tool: arcane_variable with "action": "create"
  • Individual tool: arcane_variable_create
  • Arcane route: POST /api/variables
  • Operation ID: createVariable
  • Usage: Creates a global variable that Compose projects can interpolate as ${KEY}, and key must match [A-Za-z_][A-Za-z0-9_]*. Set allEnvironments=true, or give environmentIds (from environment.list, “0” is the local environment). One of the two is required (an unknown environment ID fails with 400), and an env-scoped variable overrides an all-environments one with the same key, while the same key in an overlapping scope fails with 409. A project’s own .env still overrides it. isSecret=true stores the value encrypted. The local environment’s file is written at once, remote environments are pushed in the background (reported as “pending” in syncResults), and running projects only see the value after project.up or project.redeploy.
  • Related actions: environment.list, variable.list, variable.sync_status, project.redeploy

Delete a global variable

Delete a global variable and re-sync affected environments

  • Kind: destructive — requires confirm: true
  • Required parameters: id
  • Meta tool: arcane_variable with "action": "delete"
  • Individual tool: arcane_variable_delete
  • Arcane route: DELETE /api/variables/{id}
  • Operation ID: deleteVariable
  • Usage: Permanently deletes a global variable by id (from variable.list) and rewrites .env.global for every environment (local at once, remote environments in the background). An unknown id fails with 404. On their next deploy, projects fall back to an all-environments variable with the same key if one exists, otherwise to their own .env or the compose default. To change its value or scope use variable.update instead.
  • Related actions: variable.list, variable.update, variable.sync_status

List global variables

List all global variables with their environment scope (secret values are redacted)

  • Kind: read
  • Required parameters: none
  • Meta tool: arcane_variable with "action": "list"
  • Individual tool: arcane_variable_list
  • Arcane route: GET /api/variables
  • Operation ID: listVariables
  • Usage: Lists every manager-level global variable (the .env.global values Compose projects interpolate) with id, key, isSecret, allEnvironments and environmentIds. The id is what variable.update and variable.delete take. Secret values come back as an empty string, never decrypted. Needs the variables:read permission.
  • Related actions: variable.create, variable.update, variable.delete, variable.sync_status

Sync global variables

Push the effective global variable set to every environment now

  • Kind: write
  • Required parameters: none
  • Meta tool: arcane_variable with "action": "sync"
  • Individual tool: arcane_variable_sync
  • Arcane route: POST /api/variables/sync
  • Operation ID: syncVariables
  • Usage: Forces a push of each environment’s effective global variables to the local environment and every enabled remote environment, resending even when nothing changed, and waits for all of them (up to 15 s per environment). Use it to repair an environment that variable.sync_status shows as “error”. Create/update/delete already sync on their own. The first push to a remote environment imports the keys already in its .env.global as variables scoped to that environment. Returns every recorded per-environment status (synced or error with its message), and needs the variables:sync permission.
  • Related actions: variable.sync_status, environment.list

Get variable sync status

Get the last global-variable sync result per environment

  • Kind: read
  • Required parameters: none
  • Meta tool: arcane_variable with "action": "sync_status"
  • Individual tool: arcane_variable_sync_status
  • Arcane route: GET /api/variables/sync-status
  • Operation ID: getVariableSyncStatus
  • Usage: Read-only: returns the last recorded global-variable sync result per environment (environmentId, status synced|pending|error, error, lastSyncedAt) without pushing anything. The record is held only in memory, so right after an Arcane restart it is empty until the startup sync (or a later variable.sync or environment health check) records results. “pending” means a background push after a variable change has not finished yet.
  • Related actions: variable.sync, variable.list

Update a global variable

Update a global variable’s key, value, secret flag, or environment scope

  • Kind: write
  • Required parameters: id
  • Meta tool: arcane_variable with "action": "update"
  • Individual tool: arcane_variable_update
  • Arcane route: PUT /api/variables/{id}
  • Operation ID: updateVariable
  • Usage: Changes a global variable by id (from variable.list). Omitted fields keep their current value, environmentIds replaces the whole scope list (from environment.list, and an unknown one fails with 400). To narrow an all-environments variable send allEnvironments=false together with environmentIds: environmentIds alone is silently ignored while allEnvironments stays true, and allEnvironments=false with no IDs fails with 400. Setting isSecret=true without a value encrypts the current value, while turning a secret back to readable (isSecret=false) requires a new value. Like variable.create it re-syncs (remote environments in the background). Redeploy projects to apply the new value.
  • Related actions: variable.list, environment.list, variable.sync_status, project.redeploy