Managing Secrets
Securely access private information within the Sieve ecosystem.
About Secrets
Secrets allow you to send private credentials to your jobs. We currently support secrets at the organizational level via the dashboard or API.
Within Sieve, secrets are treated as environment variables. At runtime, these are mapped to the environment variables required by Sieve functions.
Setting Secrets via Dashboard
The easiest way to set secrets on Sieve is via the settings page on the dashboard.
You can create a secret by entering the name of the environment variable (e.g. OPENAI_API_KEY
) and the credential.
To delete a secret, you can simply click the Delete
button next to the secret, and it will be removed from Sieve. To update a secret, you must delete it and re-create it.
Automating Secrets via API
The Sieve API allows users to programmatically set, update, and delete secrets.
Set a new secret by sending a POST request to the /v2/secrets/{name}
endpoint:
curl -X POST 'https://mango.sievedata.com/v2/secrets/{your_secret_name}' \
-H 'X-API-Key: <your api key>' \
--data-raw '{
"value": "my_secret_value"
}'
Update this secret by sending a PUT request to the /v2/secrets/{name}
endpoint:
curl -X PUT 'https://mango.sievedata.com/v2/secrets/{your_secret_name}' \
-H 'X-API-Key: <your api key>' \
--data-raw '{
"value": "my_secret_value"
}'
Delete this secret by sending a DELETE request to the /v2/secrets/{name}
endpoint:
curl -X DELETE 'https://mango.sievedata.com/v2/secrets/{your_secret_name}' \
-H 'X-API-Key: <your api key>'
Finally, you can get information on an individual secret or list all the secrets you’ve stored thus far. For security reasons, we don’t return the whole secret; instead, we return the first couple of letters.
curl 'https://mango.sievedata.com/v2/secrets/{your_secret_name}' \
-H 'X-API-Key: <your api key>'
curl 'https://mango.sievedata.com/v2/secrets' \
-H 'X-API-Key: <your api key>'
Was this page helpful?