Secrets are string values which are encrypted in a Vault for future retrieval by authorized users. Currently, the maximum allowed length of a stored secret is 4096 bytes.
[ {"id":"b31830db-81ee-4831-b6ee-a3d9898c2aa7","created_at":"2020-07-09T16:17:28.670485Z","vault_id":"e2efa148-b71f-4f2e-9a56-b90cfa804955","type":"sample secret","name":"secret #1","description":"this secret is being stored for demonstration purposes" }, {"id":"e84776dd-6f22-4cd8-98ab-22da8642298d","created_at":"2020-07-09T16:31:51.618166Z","vault_id":"e2efa148-b71f-4f2e-9a56-b90cfa804955","type":"sample secret","name":"secret #2","description":"this secret is being stored for demonstration purposes" }, {"id":"be9a1afe-7251-4556-b37a-b1f51fa3e547","created_at":"2020-07-09T16:32:05.088404Z","vault_id":"e2efa148-b71f-4f2e-9a56-b90cfa804955","type":"sample secret","name":"secret #3","description":"this secret is being stored for demonstration purposes" }]
Store Secret
Store a secret in a Vault.
Request Parameters
Parameter
Description
name
the name of the secret
type
the type of secret; this is arbitrary
description
an optional description to attach to the secret
value
the secret value to be encrypted (4096-byte maximum)
the secret value to be encrypted (4096-byte maximum)
{
"id": "d460519b-5f2a-4244-bfd9-0f792b1d1972",
"created_at": "2021-08-17T18:35:22.309064336Z",
"vault_id": "5fd0ad08-ccc5-4c76-a8a5-0de66fa4efd2",
"type": "G14 Classified",
"name": "Columbia Secret",
"description": "this secret is being stored for demonstration purposes"
}
curl-v-XPOST \ -H 'Authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk0Mzk2Nzk4LCJpYXQiOjE1OTQzMTAzOTgsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjIzN2JjZjdjLTFkMGUtNDIxOS05OWEyLWVl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-Type: application/json' \https://vault.provide.services/api/v1/vaults/e2efa148-b71f-4f2e-9a56-b90cfa804955/secrets--data-binary@-<<EOF{ "name": "secret #1", "type": "sample secret", "description": "this secret is being stored for demonstration purposes", "value": "mysecret :D"}EOF
Response JSON:
{"id":"b31830db-81ee-4831-b6ee-a3d9898c2aa7","created_at":"2020-07-09T16:17:28.67048471Z","vault_id":"e2efa148-b71f-4f2e-9a56-b90cfa804955","type":"sample secret","name":"secret #1","description":"this secret is being stored for demonstration purposes"}
{"id":"b31830db-81ee-4831-b6ee-a3d9898c2aa7","created_at":"2020-07-09T16:17:28.670485Z","vault_id":"e2efa148-b71f-4f2e-9a56-b90cfa804955","type":"sample secret","name":"secret #1","description":"this secret is being stored for demonstration purposes","value":"mysecret :D"}