You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Group variables on the Variables tab in a check group. Group variables are only accessible in the context of a group, which includes the checks within the group and their configuration.
6
+
7
+

8
+
9
+
Add Global variables by clicking "Global variables" on the left-side menu. Global variables are available throughout Checkly, that includes checks, tests, and global configuration options.
10
+
11
+

12
+
13
+
By default, all variables are stored as string values. When using variables, you can click the lock icon to hide the value from all read-only users. Any data you “lock” is encrypted at rest and in flight on our back end and is only decrypted when needed.
14
+
15
+
Secrets are never visible for any user, and are always encrypted.
There are two ways to store configuration information in Checkly: Variables and secrets. Both variables and secrets are encrypted at rest and in flight.
7
+
-**Variables** are used to store non-sensitive information. Variables are shown in plaintext when being edited, on the check result page and in logs. Variables can be accessed via the CLI and API.
8
+
-**Secrets** allow you to store sensitive data for use in checks. Once saved secrets are never shown in the UI or in logs. The secret value cannot be accessed via the CLI or API.
9
+
10
+
From here on, in this document, we refer to both variables and secrets as 'variables' for ease of reading, unless explicitly mentioned.
Copy file name to clipboardExpand all lines: site/content/docs/alerting-and-retries/webhooks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ nutshell, you can:
20
20
21
21
The example above shows a webhook configured to create a Jira ticket on each event. Notice the following:
22
22
23
-
- We use the variable `JIRA_INSTANCE_URL` in the URL. We previously stored this variable in the [environment variables section](https://app.checklyhq.com/environment-variables).
23
+
- We use the variable `JIRA_INSTANCE_URL` in the URL. We previously stored this variable in the [environment variables section](https://app.checklyhq.com/environment-variables). Alerting configurations only support the use of environment variables, secrets are not supported.
24
24
- We use the variable `CHECK_ID` in the payload. This is one of many event-based variables that will change with each call. See below for the complete list.
25
25
26
26
In both cases we use the familiar Handlebars templating braces, i.e. `{{ }}` to insert the variable.
You can manage environment variables for API checks at two different levels:
18
20
19
21
* Group level
20
22
* Global level
21
23
22
-
Group variables are added on the Variables tab in a group. The variables stored here are accessible only in the group context.
23
-
24
-

25
-
26
-
Global variables are added on the Variables tab. The variables stored here are globally accessible throughout Checkly, hence the “Global environment variables” title.
27
-
28
-

29
-
30
-
All variables are stored as string values. You can click the lock icon to encrypt the values and hide the value from all users that do not have write access. Any data you “lock” is encrypted at rest and in flight on our back end and is only decrypted when needed.
Environment variables are exposed to your API checks using the common Handlebars/Moustache templating delimiters, i.e. `{{USER_API_KEY}}`. Note that Handlebars (double brackets) variables will be URI encoded. To avoid encoding, you can access your environment variables with triple brackets, i.e. `{{{USER_API_KEY}}}`.
28
+
Variables are exposed to your API checks using the common Handlebars/Moustache templating delimiters, i.e. `{{USER_API_KEY}}`. Note that Handlebars (double brackets) variables will be URI encoded. To avoid encoding, you can access your environment variables with triple brackets, i.e. `{{{USER_API_KEY}}}`.
35
29
Variables can be used in the following API checks fields:
36
30
37
31
- URL
@@ -40,12 +34,6 @@ Variables can be used in the following API checks fields:
40
34
- Query parameters values
41
35
- Basic authentication username and password
42
36
43
-
When typing in most of the variable-enabled fields we show a small helper popup to help select the right variable.
Whenever possible, store variables at the global level. This DRY's up your code.
@@ -46,7 +40,7 @@ If you want to avoid team members with Read Only access from viewing environment
46
40
47
41
## Accessing variables
48
42
49
-
Both check, group and global environment variables are accessible in your code using the standard Node.js `process.env.MY_VAR` notation.
43
+
Check, group and global variables are accessible in your code using the standard Node.js `process.env.MY_VAR` notation.
50
44
For example, the code snippet below show how you can log into GitHub. We have more [examples of login scenarios on this page.](/docs/browser-checks/login-scenarios/)
Copy file name to clipboardExpand all lines: site/content/docs/cli/command-line-reference.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,11 +163,11 @@ List all available runtimes and their dependencies.
163
163
164
164
## `npx checkly env`
165
165
166
-
Manage the global environment variables of a Checkly account. You can list, add, remove, update and export environment variables.
166
+
Manage the global variables of a Checkly account. You can list, add, remove, update and export environment variables.
167
167
168
168
### `npx checkly env pull`
169
169
170
-
Export global environment variables from your Checkly account to a local `.env` file or a different file of your choice.
170
+
Export global variables from your Checkly account to a local `.env` file or a different file of your choice. For secrets, only the key will be exported, not the value.
Pull all environment variables to the `.env` file and overwrite it if it already exists.
182
+
Pull all global variables to the `.env` file and overwrite it if it already exists.
183
183
184
184
### `npx checkly env ls`
185
185
186
-
List global environment variables. This command does not list environment variables on group or check level.
186
+
List global variables. This command does not list variables on group or check level. For secrets, only the key name will be shown, not its value.
187
187
188
188
```bash
189
189
checkly env ls
190
190
```
191
191
192
192
### `npx checkly env add`
193
193
194
-
Add a global environment variable.
194
+
Add a global variable.
195
195
196
196
```bash
197
-
checkly env add [KEY] [VALUE] [-l]
197
+
checkly env add [KEY] [VALUE] [-l|-s]
198
198
```
199
199
200
200
-`KEY`: Environment variable key.
201
201
-`VALUE`: Environment variable value.
202
202
-`--locked` or `-l`: Indicate that the environment variable will be locked, making it private to all read only users.
203
+
-`--secret` or `-s`: Indicate that the environment variable will be created as a secret.
203
204
204
205
205
206
### `npx checkly env update`
206
207
207
-
Update a global environment variable.
208
+
Update a global variable.
208
209
209
210
```bash
210
-
checkly env update [KEY] [VALUE] [-l]
211
+
checkly env update [KEY] [VALUE] [-l|-s]
211
212
```
212
213
213
-
-`KEY`: Environment variable key.
214
-
-`VALUE`: Environment variable value.
215
-
-`--locked` or `-l`: Indicate that the environment variable will be locked, making it private to all read only users.
214
+
-`KEY`: Variable key.
215
+
-`VALUE`: Variable value.
216
+
-`--locked` or `-l`: Indicate that the variable will be locked, making it private to all read only users.
217
+
-`--secret` or `-s`: Indicate that the variable will be changed to a secret. Note that secrets cannot be changed to variables. When updating a secret always pass the `-s` flag.
216
218
217
219
### `npx checkly env rm`
218
220
219
-
Remove a global environment variable.
221
+
Remove a global variable.
220
222
221
223
```bash
222
224
checkly env rm [KEY] [-f]
223
225
```
224
226
225
-
-`KEY`: Environment variable key.
226
-
-`--force` or `-f`: Skips the confirmation dialog when removing an environment.
227
+
-`KEY`: Variable key.
228
+
-`--force` or `-f`: Skips the confirmation dialog when removing a variable.
0 commit comments