8.5Update or delete a secret
You can change only a secret's allowed sites. You cannot change its name or value. To change either, delete the secret and create it again. If you change the name, update the monitors that use it.
Change the allowed sites#
- Select secrets in the top bar, then select the secret's row.
- Select edit sites. For a secret with no sites, select set allowed sites →.
- Change the list in allowed sites, one site per line. The value is not shown and does not change.
- Select save sites.
The new list replaces the old one. Monitors use it from their next check. You do not need to save them again.
Delete a secret#
- Select secrets in the top bar, then select the secret's row.
- Select delete secret. The dialog lists the monitors that reference the secret.
- Type the secret's name in the box to confirm. It must match exactly.
- Select delete secret.
With the API, call DeleteSecret with the secret's id. Get the id from ListSecrets. An API key can delete secrets. An unknown id returns not_found (404).
# $API is set as in 8.2
curl -s $API/DeleteSecret \
-H "Authorization: Bearer $OBSRVLY_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "<secret-id>"}'What works where#
| Task | Dashboard | API key |
|---|---|---|
| Create a secret, with its allowed sites | Yes | Yes (CreateSecret) |
| List secrets (names, not values) | Yes | Yes (ListSecrets) |
| Change allowed sites | Yes | No |
| Delete a secret | Yes | Yes (DeleteSecret) |
| See or change a value | No | No |