Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Variables and secrets

Weik.io 2026.2

Set the variables and secrets that routes use as Camel properties, as a default or for one environment. Video

Watch: Where the values live, 4:37

The video moves a value into a variable and an API key into a secret, and shows what reaches the running integration.

On this page

Routes use variables and secrets as Camel properties, such as {{erp-url}}. A value set without --env is the default, but one set with --env overrides it in that environment. A project’s values reach all of its integrations, while a value set with --integration reaches only that integration.

Setting a value doesn’t restart the deployments that use it, so they get the new value at their next start. The command lists those deployments with the command line that restarts them, or restarts them when you add --restart.

Weik.io stores secrets encrypted and lists them without their values.

Commands on this page#

Command What it does
weikio get variables List the variables of a project and its integrations.
weikio describe variable Show a variable’s value and description.
weikio variable set Set a variable’s default, or with --env one environment’s override.
weikio delete variable Delete a variable’s default, or with --env one environment’s override.
weikio get secrets List the secrets of a project and its integrations, without values.
weikio secret set Set a secret’s default, or with --env one environment’s override.
weikio secret reveal Print a secret’s value where the environment allows reveals.
weikio delete secret Delete a secret’s default, or with --env one environment’s override.

The flags every command accepts, such as --env, --project, -o and --context, are on the CLI reference page and are left out of the tables below.

weikio get variables#

List the variables of a project and its integrations. --resolved with --integration shows the values one deployment receives and where each one comes from.

Terminal
weikio get variables [--project P] [--env E] [--integration N] [--resolved]
Argument or flag What it does
<project> Identifies the project, which is the current one by default.
--resolved Shows the values the integration’s deployment receives. Use it with --integration.
--integration <integration> Lists this integration’s own variables, or with --resolved the values its deployment receives.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/variables, GET /api/v1/environments/{environment}/projects/{project}/variables, GET /api/v1/projects/{project}/integration-variables, GET /api/v1/projects/{project}/integrations/{integration}/variables, GET /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/variables, GET /api/v1/environments/{environment}/projects/{project}/deployments/{name}/configuration.

Terminal
$ weikio get variables --env production --resolved --integration erp-invoice-export
You see
NAME          VALUE                          SOURCE
erp-url       https://erp.example.internal   variable:production
page-size     10                             deployment-override
erp-api-key   ********                       secret:production
Terminal
$ weikio get variables --env devtest --resolved --integration billing
You see
NAME       VALUE                 SOURCE
greeting   Hello from the file   application.properties

weikio describe variable#

Show a variable’s value and description.

Terminal
weikio describe variable <p>/<name> [--integration N] [--env E]
Argument or flag What it does
<variable> Identifies the variable as project/name.
--integration <integration> Identifies the integration whose own variable to show.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/variables/{name}, GET /api/v1/environments/{environment}/projects/{project}/variables/{name}, GET /api/v1/projects/{project}/integrations/{integration}/variables/{name}, GET /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/variables/{name}.

weikio variable set#

Set a variable’s default, or with --env one environment’s override. The command lists the deployments the new value reaches.

Terminal
weikio variable set <p>/<name> <value> [--integration N] [--env E] [--description S] [--restart] [--dry-run] [-y]
Argument or flag What it does
<variable> Identifies the variable as project/name.
<value> Sets the variable’s value.
--integration <integration> Sets the variable for this integration’s deployments only.
--description <description> Sets the variable’s description.
--restart Restarts the deployments that use the value, instead of waiting for their next start.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author. A default, set without --env, needs a grant that covers every environment. With --restart, the grant’s role also needs operate.

API: GET /api/v1/projects/{project}/integration-variables, GET /api/v1/projects/{project}/integration-secrets, GET /api/v1/projects/{project}/variables/{name}, GET /api/v1/environments/{environment}/projects/{project}/variables/{name}, PUT /api/v1/projects/{project}/variables/{name}, PUT /api/v1/environments/{environment}/projects/{project}/variables/{name}, PUT /api/v1/projects/{project}/integrations/{integration}/variables/{name}, PUT /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/variables/{name}, PATCH /api/v1/environments/{environment}/projects/{project}/deployments/{name}.

Terminal
$ weikio apply -f ./finance/variables/ -f ./finance/production/variables/ --env production
You see
Target: https://hub.example, project finance (from finance/project.yaml), environment production (--env)
variable finance/erp-url unchanged
variable production/finance/erp-url updated
variable production/finance/page-size created
2 deployments take the new value at their next start: production/finance/erp-invoice-export (running), production/finance/nightly-payroll (stopped)
  restart the running one now with:   weikio restart finance/erp-invoice-export --env production
Terminal
$ weikio variable set finance/page-size 200
You see
Target: https://hub.example, project finance (argument), default environment (no --env)
variable finance/page-size updated (revision 4195)
2 deployments take the new value at their next start:
  devtest      finance/erp-invoice-export   (started)
  production   finance/erp-invoice-export   (started)

To restart them now, run:
  weikio variable set finance/page-size 200 --restart
Terminal
$ weikio variable set finance/page-size 200 --restart
You see
Target: https://hub.example, project finance (argument), default environment (no --env)
Deployments that will restart:
  devtest      finance/erp-invoice-export
  production   finance/erp-invoice-export
'production' is a production environment.
Continue? [y/N] y
variable finance/page-size updated (revision 4196)
deployment devtest/finance/erp-invoice-export restarted
deployment production/finance/erp-invoice-export restarted
Terminal
$ weikio variable set finance/page-size 200 --restart --dry-run --env devtest
You see
Target: https://hub.example, project finance (argument), environment devtest (--env)
Deployments that will restart:
  devtest   finance/erp-invoice-export
variable finance/page-size would be set for devtest
1 deployment takes the new value at its next start:
  devtest   finance/erp-invoice-export   (started)
Terminal
$ weikio variable set shop/greeting 'Hello from orders' --integration orders
You see
Target: https://hub.example, project shop (argument), integration orders (--integration), default environment (no --env)
variable shop/greeting created (integration orders, revision 5120)
1 deployment takes the new value at its next start:
  devtest   shop/orders   (started)

To restart it now, run:
  weikio variable set shop/greeting 'Hello from orders' --integration orders --restart

weikio delete variable#

Delete a variable’s default, or with --env one environment’s override. After you delete an override, the default applies in that environment again.

Terminal
weikio delete variable <p>/<name> [--integration N] [--env E] [--dry-run] [-y]
Argument or flag What it does
<variable> Identifies the variable as project/name.
--integration <integration> Identifies the integration whose own variable to delete.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: DELETE /api/v1/projects/{project}/variables/{name}, DELETE /api/v1/environments/{environment}/projects/{project}/variables/{name}, DELETE /api/v1/projects/{project}/integrations/{integration}/variables/{name}, DELETE /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/variables/{name}.

weikio get secrets#

List the secrets of a project and its integrations, without values.

Terminal
weikio get secrets [--project P] [--env E] [--integration N]
Argument or flag What it does
<project> Identifies the project, which is the current one by default.
--integration <integration> Lists only this integration’s own secrets.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/secrets, GET /api/v1/environments/{environment}/projects/{project}/secrets, GET /api/v1/projects/{project}/integration-secrets, GET /api/v1/projects/{project}/integrations/{integration}/secrets, GET /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/secrets.

weikio secret set#

Set a secret’s default, or with --env one environment’s override. The command doesn’t accept the value as an argument, so it doesn’t end up in the shell history. Type the value at the hidden prompt or pipe it to standard input. To read it from a file, use --from-file.

Terminal
weikio secret set <p>/<name> [--integration N] [--env E] [--from-file PATH] [--as-file] [--description S] [--restart] [--dry-run] [-y]
Argument or flag What it does
<secret> Identifies the secret as project/name.
--integration <integration> Sets the secret for this integration’s deployments only.
--from-file <from-file> Uses the value in this file instead of standard input.
--as-file Stores a file of up to 128 KiB and gives routes its path.
--description <description> Sets the secret’s description.
--restart Restarts the deployments that use the value, instead of waiting for their next start.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant whose role has operate in the environment. A default, set without --env, needs a grant that covers every environment.

API: GET /api/v1/projects/{project}/integration-variables, GET /api/v1/projects/{project}/integration-secrets, GET /api/v1/projects/{project}/secrets/{name}, GET /api/v1/environments/{environment}/projects/{project}/secrets/{name}, PUT /api/v1/projects/{project}/secrets/{name}, PUT /api/v1/environments/{environment}/projects/{project}/secrets/{name}, PUT /api/v1/projects/{project}/integrations/{integration}/secrets/{name}, PUT /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/secrets/{name}, PATCH /api/v1/environments/{environment}/projects/{project}/deployments/{name}.

Terminal
$ weikio secret set finance/erp-api-key --env devtest
You see
Target: https://hub.example, project finance (argument), environment devtest (--env)
Value:
secret finance/erp-api-key set for devtest (revision 4192)
1 deployment takes the new value at its next start:
  devtest   finance/erp-invoice-export   (started)

To restart it now, run:
  weikio secret set finance/erp-api-key --env devtest --restart

weikio secret reveal#

Print a secret’s value where the environment allows reveals. Weik.io rate limits reveals and writes each one to the audit log.

Terminal
weikio secret reveal <p>/<name> [--integration N] [--env E]
Argument or flag What it does
<secret> Identifies the secret as project/name.
--integration <integration> Identifies the integration whose own secret to reveal.
--reason <reason> Stores a reason for the reveal with the audit record.

Who can run it: a grant whose role has reveal in an environment that allows reveals.

API: GET /api/v1/environments/{environment}/projects/{project}/secrets/{name}/reveal, GET /api/v1/projects/{project}/secrets/{name}/reveal, GET /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/secrets/{name}/reveal, GET /api/v1/projects/{project}/integrations/{integration}/secrets/{name}/reveal.

Terminal
$ weikio secret reveal finance/erp-api-key --env production
You see
error: Secret reveals aren't allowed in production.
       Ask a platform admin to run:
         weikio env set production --allow-secret-reveal=true
Terminal
$ echo $?
You see
3

weikio delete secret#

Delete a secret’s default, or with --env one environment’s override.

Terminal
weikio delete secret <p>/<name> [--integration N] [--env E] [--dry-run] [-y]
Argument or flag What it does
<secret> Identifies the secret as project/name.
--integration <integration> Identifies the integration whose own secret to delete.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant whose role has operate in the environment.

API: DELETE /api/v1/projects/{project}/secrets/{name}, DELETE /api/v1/environments/{environment}/projects/{project}/secrets/{name}, DELETE /api/v1/projects/{project}/integrations/{integration}/secrets/{name}, DELETE /api/v1/environments/{environment}/projects/{project}/integrations/{integration}/secrets/{name}.

Exit codes#

The codes match the exit code table in the CLI reference.

Code Meaning
0 The command succeeded.
1 The command stopped without making the change.
2 The command has a usage error.
3 Your key is missing, expired or revoked, or its access doesn’t cover the command.
4 What you named doesn’t exist.
5 The change conflicts with another change.
6 Weik.io couldn’t be reached or wasn’t ready, or it was rate limiting your calls or out of storage. Run the command again later.
8 A document isn’t valid.

weikio secret reveal exits 3 in an environment that doesn’t allow reveals. It exits 6 when you go over the limit of 10 reveals a minute and prints how many seconds to wait.

See also#

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo