Secrets

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.

List Secrets

List secrets in a Vault.

List Secrets

GET https://vault.provide.services/api/v1/vaults/:id/secrets

Returns a list of secrets hosted in a specified

Vault

Path Parameters

NameTypeDescription

id

string

id of target

Vault

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

,

Organization

or

User

[
    {
        "id": "1fcbf9b2-a382-4c7a-ab96-af62d29d60c8",
        "created_at": "2021-08-17T18:31:02.026336Z",
        "vault_id": "5fd0ad08-ccc5-4c76-a8a5-0de66fa4efd2",
        "type": "super-secret",
        "name": "secret #1",
        "description": "this secret is being stored for demonstration purposes"
    },
    {
        "id": "d460519b-5f2a-4244-bfd9-0f792b1d1972",
        "created_at": "2021-08-17T18:35:22.309064Z",
        "vault_id": "5fd0ad08-ccc5-4c76-a8a5-0de66fa4efd2",
        "type": "G14 Classified",
        "name": "Columbia Secret",
        "description": "this secret is being stored for demonstration purposes"
]
curl -i \
    -H 'Authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk0Mzk2Nzk4LCJpYXQiOjE1OTQzMTAzOTgsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjIzN2JjZjdjLTFkMGUtNDIxOS05OWEyLWVlMGQ2MWQ1MTAxMyIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuMjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiMjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIn0sInN1YiI6InVzZXI6Mjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIn0.q-3XLO1ikupPv0sp2CtiQv3kYFVgVnsh0BQGyqKc9-6GyQIC-pKgTOJWK2ZqOk5-ovGDYXV3i5i_oNDzZo3IahdRoGev06-tuH55TX2Qla5z5GHNSWd7TrqzWEVnE3OsVAwkpYi4MDDcTbODi_z6yOEwIO2BARkXI3Nh5inDwlKpUvnFDq3858r8E0yRVv7MMjFoYxtpMZ-Wdy63j7ICehLSTmya7WYCxu_9dnmZEZd1UJuDjfAh54uRINNJS4BH3qPDD-pgF1k-k3emC82G-livcjhCx7ApsJngjb858qKCGB0N-HCnpLO3TnPcCUJRTJq8jUjpI2KndEfEP_i1xTAep4pT4qdWpDIFZr45GROlGrQe5N9Sr_TpqJoOWJJ0_eZeTnKhr99VRxt740iNAW1jxJcPVYitc8hL3WL27jHFPK060DLXnRoLLCdc6mPiRKKi33yoa1mEWIObA7PfccbC-fYi4uO4XCis4nkApzD4WqvgkBIe7FnT7LyHzhANgbL32jU9QYa1JeBPpbwyan2rSDEHEHRtAPYlUtpc4t42uYGYGEMokSG2fAuFlvyVzGeQEWBY-Wl-0pgRERlzjFJv65rbF1MidWPNeKuVWMdQ8a1TIhgZ235uRCahW9b6jMqAyUxmLfJg88fI6jLSSobzyxkdeYo95cfTEY1hY_I' \
    https://vault.provide.services/api/v1/vaults/e2efa148-b71f-4f2e-9a56-b90cfa804955/secrets  
HTTP/2 200

Response JSON:

[
  {
    "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

ParameterDescription

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)

Store Secret

POST https://vault.provide.services/api/v1/vaults/:id/secrets

Stores a secret in a specified

Vault

Path Parameters

NameTypeDescription

id

string

id of

Vault

to store secret

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

,

Organization

or

User

Request Body

NameTypeDescription

description

string

brief descriptor for secret to be stored

name

string

name for secret to be stored

type

string

type of secret to be stored; this is arbitrary

value

string

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.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk0Mzk2Nzk4LCJpYXQiOjE1OTQzMTAzOTgsImlzcyI6Imh0dHBzOi8v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KuVWMdQ8a1TIhgZ235uRCahW9b6jMqAyUxmLfJg88fI6jLSSobzyxkdeYo95cfTEY1hY_I' \
    -H 'Content-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"
}

Retrieve Secret

Retrieve a secret from a Vault.

Retrieve Secret

GET https://vault.provide.services/api/v1/vaults/:id/secrets/:secret_id

Retrieves a specific secret from a specified

Vault

Path Parameters

NameTypeDescription

id

string

id of

Vault

storing secret

secret_id

string

id of secret to be retrieved

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

,

Organization

or

User

{
    "id": "d460519b-5f2a-4244-bfd9-0f792b1d1972",
    "created_at": "2021-08-17T18:35:22.309064Z",
    "vault_id": "5fd0ad08-ccc5-4c76-a8a5-0de66fa4efd2",
    "type": "G14 Classified",
    "name": "Columbia Secret",
    "description": "this secret is being stored for demonstration purposes",
    "value": "0x}
curl -i \
    -H 'Authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk0Mzk2Nzk4LCJpYXQiOjE1OTQzMTAzOTgsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjIzN2JjZjdjLTFkMGUtNDIxOS05OWEyLWV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ault.provide.services/api/v1/vaults/e2efa148-b71f-4f2e-9a56-b90cfa804955/secrets/b31830db-81ee-4831-b6ee-a3d9898c2aa7
HTTP/2 200

Response JSON:

{
  "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"
}

Delete Secret

Permanently delete a secret from a Vault.

Delete Secret

DELETE https://vault.provide.services/api/v1/vaults/:id/secrets/:secret_id

Permanently deletes a specified secret

Path Parameters

NameTypeDescription

id

string

id of

Vault

storing secret

secret_id

string

id of secret to be deleted

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

,

Organization

or

User

curl -X "DELETE" \
    -H 'Authorization: bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwOjJlOmQ5OmUxOmI4OmEyOjM0OjM3Ojk5OjNhOjI0OmZjOmFhOmQxOmM4OjU5IiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL3Byb3ZpZGUuc2VydmljZXMvYXBpL3YxIiwiZXhwIjoxNTk0Mzk2Nzk4LCJpYXQiOjE1OTQzMTAzOTgsImlzcyI6Imh0dHBzOi8vaWRlbnQucHJvdmlkZS5zZXJ2aWNlcyIsImp0aSI6IjIzN2JjZjdjLTFkMGUtNDIxOS05OWEyLWVlMGQ2MWQ1MTAxMyIsIm5hdHMiOnsicGVybWlzc2lvbnMiOnsic3Vic2NyaWJlIjp7ImFsbG93IjpbInVzZXIuMjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIiwibmV0d29yay4qLmNvbm5lY3Rvci4qIiwibmV0d29yay4qLnN0YXR1cyIsInBsYXRmb3JtLlx1MDAzZSJdfX19LCJwcnZkIjp7InBlcm1pc3Npb25zIjo3NTUzLCJ1c2VyX2lkIjoiMjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIn0sInN1YiI6InVzZXI6Mjg0ZDJiMWEtMTc3OS00MjRiLWI2YzUtMzAyYTc5YzE1NGExIn0.q-3XLO1ikupPv0sp2CtiQv3kYFVgVnsh0BQGyqKc9-6GyQIC-pKgTOJWK2ZqOk5-ovGDYXV3i5i_oNDzZo3IahdRoGev06-tuH55TX2Qla5z5GHNSWd7TrqzWEVnE3OsVAwkpYi4MDDcTbODi_z6yOEwIO2BARkXI3Nh5inDwlKpUvnFDq3858r8E0yRVv7MMjFoYxtpMZ-Wdy63j7ICehLSTmya7WYCxu_9dnmZEZd1UJuDjfAh54uRINNJS4BH3qPDD-pgF1k-k3emC82G-livcjhCx7ApsJngjb858qKCGB0N-HCnpLO3TnPcCUJRTJq8jUjpI2KndEfEP_i1xTAep4pT4qdWpDIFZr45GROlGrQe5N9Sr_TpqJoOWJJ0_eZeTnKhr99VRxt740iNAW1jxJcPVYitc8hL3WL27jHFPK060DLXnRoLLCdc6mPiRKKi33yoa1mEWIObA7PfccbC-fYi4uO4XCis4nkApzD4WqvgkBIe7FnT7LyHzhANgbL32jU9QYa1JeBPpbwyan2rSDEHEHRtAPYlUtpc4t42uYGYGEMokSG2fAuFlvyVzGeQEWBY-Wl-0pgRERlzjFJv65rbF1MidWPNeKuVWMdQ8a1TIhgZ235uRCahW9b6jMqAyUxmLfJg88fI6jLSSobzyxkdeYo95cfTEY1hY_I' \
    https://vault.provide.services/api/v1/vaults/e2efa148-b71f-4f2e-9a56-b90cfa804955/secrets/fae299c3-e7d5-4574-a832-7cda137b2517
HTTP/2 204

Last updated