personal secrets

Download Spec

get /vault/api/v1/user/{user_id}/secrets

Get secrets client owns.

offset

int

Offset where to start fetching the items

Default
0

limit

int

Number of items to return

Default
100
Max
100

Response

ExamplesSchema

Successful response, returns an array of secrets, returns an empty array if no secrets found

{
  "count": 123,
  "items": [
    {
      "name": "string",
      "data": {},
      "read_roles": [
        {
          "id": "string",
          "name": "string",
          "deleted": true
        }
      ],
      "write_roles": [
        {
          "id": "string",
          "name": "string",
          "deleted": true
        }
      ],
      "author": "string",
      "path": "string",
      "updated_by": "string",
      "created": "string",
      "updated": "string"
    }
  ]
}

post /vault/api/v1/user/{user_id}/secrets

Create a secret.

owner_id

string

required

ID of the user who owns this secret

name

string

required

data

object (data)

Secret to be stored.

read_roles

array[object]

List of roles that can read secret.

write_roles

array[object]

List of roles that can replace secret.

Request

{
  "owner_id": "string",
  "name": "string",
  "data": {},
  "read_roles": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "write_roles": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

Response

ExamplesSchema

Secret successfully created

{
  "name": "string"
}

get /vault/api/v1/user/{user_id}/secrets/{name}

Get a secret.

name

string

required

Secret name

user_id

string

required

User ID of the user who owns the secret

Response

ExamplesSchema

Successful response, returns a secret object

{
  "name": "string",
  "data": {},
  "read_roles": [
    {
      "id": "string",
      "name": "string",
      "deleted": true
    }
  ],
  "write_roles": [
    {
      "id": "string",
      "name": "string",
      "deleted": true
    }
  ],
  "author": "string",
  "path": "string",
  "updated_by": "string",
  "created": "string",
  "updated": "string"
}

put /vault/api/v1/user/{user_id}/secrets/{name}

Update a secret.

data

object (data)

Secret to be stored.

read_roles

array[object]

List of roles that can read secret.

write_roles

array[object]

List of roles that can replace secret.

Request

{
  "data": {},
  "read_roles": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "write_roles": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

Response

ExamplesSchema

Secret successfully updated

Empty response

delete /vault/api/v1/user/{user_id}/secrets/{name}

Delete a secret.

name

string

required

Secret name

user_id

string

required

User ID of the user who owns the secret

Response

ExamplesSchema

Secret successfully deleted

Empty response

Was this page helpful?