Ir al contenido

variable

El dominio variable tiene 6 acciones. En la superficie meta se alcanzan todas a través de arcane_variable; en la individual, cada una es una herramienta propia; en la dinámica se ejecutan con arcane_execute_action y el ID canónico.

AcciónTítuloTipo
variable.createCreate a global variableescritura
variable.deleteDelete a global variabledestructiva
variable.listList global variableslectura
variable.syncSync global variablesescritura
variable.sync_statusGet variable sync statuslectura
variable.updateUpdate a global variableescritura

Create a global variable

Create a global variable scoped to all or specific environments

  • Tipo: escritura
  • Parámetros obligatorios: key, value
  • Meta-herramienta: arcane_variable con "action": "create"
  • Herramienta individual: arcane_variable_create
  • Ruta de Arcane: POST /api/variables
  • ID de operación: createVariable
  • Uso: 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.
  • Acciones relacionadas: environment.list, variable.list, variable.sync_status, project.redeploy

Delete a global variable

Delete a global variable and re-sync affected environments

  • Tipo: destructiva — exige confirm: true
  • Parámetros obligatorios: id
  • Meta-herramienta: arcane_variable con "action": "delete"
  • Herramienta individual: arcane_variable_delete
  • Ruta de Arcane: DELETE /api/variables/{id}
  • ID de operación: deleteVariable
  • Uso: 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.
  • Acciones relacionadas: variable.list, variable.update, variable.sync_status

List global variables

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

  • Tipo: lectura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_variable con "action": "list"
  • Herramienta individual: arcane_variable_list
  • Ruta de Arcane: GET /api/variables
  • ID de operación: listVariables
  • Uso: 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.
  • Acciones relacionadas: variable.create, variable.update, variable.delete, variable.sync_status

Sync global variables

Push the effective global variable set to every environment now

  • Tipo: escritura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_variable con "action": "sync"
  • Herramienta individual: arcane_variable_sync
  • Ruta de Arcane: POST /api/variables/sync
  • ID de operación: syncVariables
  • Uso: 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.
  • Acciones relacionadas: variable.sync_status, environment.list

Get variable sync status

Get the last global-variable sync result per environment

  • Tipo: lectura
  • Parámetros obligatorios: ninguno
  • Meta-herramienta: arcane_variable con "action": "sync_status"
  • Herramienta individual: arcane_variable_sync_status
  • Ruta de Arcane: GET /api/variables/sync-status
  • ID de operación: getVariableSyncStatus
  • Uso: 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.
  • Acciones relacionadas: variable.sync, variable.list

Update a global variable

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

  • Tipo: escritura
  • Parámetros obligatorios: id
  • Meta-herramienta: arcane_variable con "action": "update"
  • Herramienta individual: arcane_variable_update
  • Ruta de Arcane: PUT /api/variables/{id}
  • ID de operación: updateVariable
  • Uso: 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.
  • Acciones relacionadas: variable.list, environment.list, variable.sync_status, project.redeploy