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, and --env sets an override for one environment. A project’s values reach its integrations, while --integration sets a value for one integration only.

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> The project, by default the current one.
--resolved Together with --integration, show the values that integration’s deployment receives.
--integration <integration> The integration whose own variables to list, or whose deployment --resolved shows.

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> The variable, as project/name.
--integration <integration> 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> The variable, as project/name.
<value> The value.
--integration <integration> The integration whose own variable to set (only its deployments receive it).
--description <description> Description of the variable.
--restart Restart the deployments that use the value, instead of waiting for their next start.
--dry-run Print what would happen and change nothing.
-y, --yes Don’t ask for confirmation.
--reason <reason> Reason for the change, stored 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> The variable, as project/name.
--integration <integration> The integration whose own variable to delete.
--dry-run Print what would happen and change nothing.
-y, --yes Don’t ask for confirmation.
--reason <reason> Reason for the change, stored 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> The project, by default the current one.
--integration <integration> The integration whose own secrets to list.

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 value comes from one of these:

  • A hidden prompt
  • Standard input
  • The file you give with --from-file

The command doesn’t accept the value as an argument, so it doesn’t end up in the shell history.

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> The secret, as project/name.
--integration <integration> The integration whose own secret to set (only its deployments receive it).
--from-file <from-file> File to read the value from, instead of standard input.
--as-file Store the file (up to 128 KiB) and give routes its path.
--description <description> Description of the secret.
--restart Restart the deployments that use the value, instead of waiting for their next start.
--dry-run Print what would happen and change nothing.
-y, --yes Don’t ask for confirmation.
--reason <reason> Reason for the change, stored 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> The secret, as project/name.
--integration <integration> The integration whose own secret to reveal.
--reason <reason> Reason for the change, stored with the audit record.

Who can run it: a grant whose role has reveal in the environment, and the environment has to allow 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> The secret, as project/name.
--integration <integration> The integration whose own secret to delete.
--dry-run Print what would happen and change nothing.
-y, --yes Don’t ask for confirmation.
--reason <reason> Reason for the change, stored 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 commands on this page exit with these codes from the exit code table:

Code Meaning
0 The command succeeded.
1 Weik.io refused the change.
2 The command line had a usage error.
3 The key is missing or not allowed.
4 Something wasn’t found.
5 The change conflicted with another change.
6 Weik.io couldn’t be reached.
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 rate limit on reveals.

See also#

Sign in to the live demo

Sign in with the shared viewer account, which can open every screen of the example projects and can't change anything.

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