List Accessible Secrets
Endpoint: GET /api/secrets
Retrieves all secret names that the user has access to. Use the access query parameter to filter by the specific action you can perform on the secrets.
Query parameters
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| access Available since v5.4.2 and later | Filter secrets by access type. Supported values:
READ if not specified. Multiple values use AND semantics. Only secrets where the user has all specified access types are returned. | array of strings | Optional. |
Response
Returns an array of secret names (strings) that are accessible to the invoked user.
Examples
List accessible secrets
Request
curl -X 'GET' \
'https://<YOUR-SERVER-URL>/api/secrets' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'
Response
[
[
"sendgrid_api_key",
"open-ai-service-account-key",
"ghp_your_github_token",
"atlassian-token",
"my_secret",
"SendGrid",
"slack_secret",
"slack-secret",
"GITHUB_TOKEN",
"gcp_private_key",
"payment_api_token",
"openai_api_key",
"neutrino_api_key",
"neutrino_user_id",
"weather-api",
"slack_standup_token"
]
]
List secrets the user can update
Request
curl -X 'GET' \
'https://<YOUR-SERVER-URL>/api/secrets?access=UPDATE' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'
Response
[
"sendgrid_api_key",
"open-ai-service-account-key"
]