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:


curl -X POST 'https://mango.sievedata.com/v2/secrets/{your_secret_name}' \
-H 'X-API-Key: <your api key>' \
-H 'Content-Type: application/json' \
--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>' \
  -H 'Content-Type: application/json' \
  --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>'