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.
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:
Update this secret by sending a PUT request to the /v2/secrets/{name}
endpoint:
Delete this secret by sending a DELETE request to the /v2/secrets/{name}
endpoint:
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.
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:
Update this secret by sending a PUT request to the /v2/secrets/{name}
endpoint:
Delete this secret by sending a DELETE request to the /v2/secrets/{name}
endpoint:
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.
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.
This will automatically populate the environment variable in the function’s playground as shown below:
Entering your private keys is completely optional. If you don’t enter any secrets, the function will run using Sieve’s default API keys for the respective providers.