1. Introduction

1.1. Overview

CredHub manages credentials like passwords, users, certificates, certificate authorities, ssh keys, rsa keys and arbitrary values (strings and JSON blobs). The following spec details the API exposed by the CredHub server and the equivalent requests using the CredHub CLI.

More information on CredHub can be found here.

1.2. Credential Naming and Paths

Credentials can be named with any value up to 255 characters containing:

  • alpha

  • numeric

  • underscore _

  • hyphen -

  • forward slash /

  • period .

  • colon :

  • parenthesis ( )

  • bracket [ ] characters

The character limit includes the leading slash, which will be prepended automatically if absent.

Paths can be used to namespace a set of credential names for a different deployment or environment. To add a path to a credential, simply add the path prior to the credential name, separated by a forward slash (/), e.g. credhub set -t password -n /prod/deploy123/cc_password -w 'myPassword'. If a leading slash is not provided, it will be automatically prepended.

In this example, path refers to /prod/deploy123/ and name refers to either cc_password or /prod/deploy123/cc_password.

1.3. Credential IDs

Credential responses include a unique identifier in the key 'id'. This ID is a unique identifier for a specific credential version. When a credential value is updated, a new ID will be returned. This identifier can be useful in applications where a specific credential value should be pinned until a manual action (such as a deployment) is performed. If your application should receive the latest value of the credential, retrieving by name is preferred.

1.4. Overwriting Credential Values

As of 2.0.0, set requests always overwrite the credential that already exists.

As of 2.0.1, generate requests can be set to overwrite, no-overwrite, or converge for the mode parameter. The default mode for generate is converge as of 2.0.0. Converge will only overwrite if the generate request parameters do not match the existing credential.

As of 2.10.0, when the generate requests are set to converge for the mode parameter, converge will not overwrite certificates if duration is the only parameter that does not match the existing certificate credentials.


2. Authentication

2.1. Overview

All requests to CredHub, with the exception of /info and /health, must include an authentication method. CredHub supports two authentication provider types, UAA and mutual TLS.

2.2. UAA (OAuth2)

Authentication via UAA is performed directly with the trusted UAA server. When successfully authenticated, the UAA server will return an access token, which must be sent to CredHub in each request.

The address of the UAA server trusted by the targeted CredHub server can be obtained by requesting the /info endpoint. With that endpoint, you may send a token request as detailed here.

Once you have obtained a token, you must include the token value in the header Authorization: Bearer [token] in your request to CredHub.

2.3. Mutual TLS

CredHub also supports mutual TLS authentication. Certificates issued by trusted Certificate Authorities are accepted by CredHub. To provide an authenticated identity in the client mtls certificate, CredHub requires the Organization Unit of the certificate to comply with the pattern app:<v4 UUId>. CredHub validates the authenticated identity, signing authority, validity dates and presence of x509 extension Extended Key Usage 'Client Authentication' during the authentication workflow.


3. Credentials Endpoint

3.1. Overview

Credentials are the primary object in CredHub. Any passwords, secrets, configurations or other sensitive information that you store is saved to a named credential. You can retrieve, update and delete a credential using its name. Each credential has a maximum size of 64 KB.

All credentials, regardless of type, share a common namespace, e.g. a credential named /diego-tls exists once in CredHub. Credential names are not reservable, so two users updating a credential of the same name will result in updates to the same credential. If you prefer a separate namespace for your credentials, you can add a path prior to the credential name.

Credentials are typed based on the format of the stored value, value validation and generation procedure. Once a credential type has been set, it cannot be updated to a new type. If you mistakenly set the type, you must delete the credential, then set it with the correct type.

When viewing all versions of a credential, the versions will be returned in descending order of their creation date.


3.2. Find a Credential by Path

Returns an array of versions, sorted in order from newest to oldest.

Curl request

$ curl 'https://example.com/api/v1/data?path=some-credential-path&expires-within-days=1' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data?path=some-credential-path&expires-within-days=1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 118

{
  "credentials" : [ {
    "version_created_at" : "2019-02-01T20:37:52Z",
    "name" : "some-credential-name"
  } ]
}

Request parameters

Parameter Required Description

path

true

The credential path

expires-within-days

false

The number of days the credential should expire within

Note: If a certificate credential only has one version and it is marked as transitional the credential name will not be returned by this endpoint.


3.3. Find a Credential by ID (Type: Value)

Curl request

$ curl 'https://example.com/api/v1/data/b6380fe8-1636-441b-a81f-43d21e3ac5c7' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/b6380fe8-1636-441b-a81f-43d21e3ac5c7 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 238

{
  "type" : "value",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "b6380fe8-1636-441b-a81f-43d21e3ac5c7",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-value"
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.4. Find a Credential by ID (Type: JSON)

Curl request

$ curl 'https://example.com/api/v1/data/0cec8025-0c61-48f7-b24b-4d0d8b571636' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/0cec8025-0c61-48f7-b24b-4d0d8b571636 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 270

{
  "type" : "json",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "0cec8025-0c61-48f7-b24b-4d0d8b571636",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "some-json-key" : "some-json-value"
  }
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.5. Find a Credential by ID (Type: Password)

Curl request

$ curl 'https://example.com/api/v1/data/08f9ad21-b9df-4ed7-b56f-b6a4c4667f89' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/08f9ad21-b9df-4ed7-b56f-b6a4c4667f89 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 244

{
  "type" : "password",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "08f9ad21-b9df-4ed7-b56f-b6a4c4667f89",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-password"
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.6. Find a Credential by ID (Type: User)

Curl request

$ curl 'https://example.com/api/v1/data/517cf7dd-2b6a-42f8-b605-4c6c83903595' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/517cf7dd-2b6a-42f8-b605-4c6c83903595 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 336

{
  "type" : "user",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "517cf7dd-2b6a-42f8-b605-4c6c83903595",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "username" : "some-username",
    "password" : "some-password",
    "password_hash" : "foQzXY.HaydB."
  }
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.7. Find a Credential by ID (Type: Certificate)

Curl request

$ curl 'https://example.com/api/v1/data/1d293483-05fd-49b6-ae1e-4e81220f08e8' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/1d293483-05fd-49b6-ae1e-4e81220f08e8 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4402

{
  "type" : "certificate",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "1d293483-05fd-49b6-ae1e-4e81220f08e8",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaF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t9vdY\nu2dbIwcYX4FK9J5NdsWXAkPE/jEJsbuxPc+U9Evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----",
    "transitional" : false,
    "certificate_authority" : true,
    "self_signed" : false,
    "generated" : true,
    "expiry_date" : "2020-09-03T18:30:11Z"
  }
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.8. Find a Credential by ID (Type: RSA)

Curl request

$ curl 'https://example.com/api/v1/data/189d64e5-239a-4899-9631-e8a541c42d0c' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/189d64e5-239a-4899-9631-e8a541c42d0c HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4384

{
  "type" : "rsa",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "189d64e5-239a-4899-9631-e8a541c42d0c",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "-----BEGIN PUBLIC KE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5Zva04khbLtvHvr6qzKnsJQ9AoLjtxhtVyNm4o4DM8xhsXynBhX+\nHAJfMxrrClyvfua5o3QalELRBLIwTL01lXc0SWQxoN0AuZTOxuQciT7hIU0VfjFq\nXYVJAoIBAEYBpN9Wn4WBdLSa+LzP6PwU5Ld9lfL87j/It4xjjKpOzwMJSXl5TCLT\npE4ag6TSxwrPi1qc6E964V8H9h97tcEOpergYO4GBq7Jgquo4nNm+WDcKJ4nqAJB\ngFxb8vcCetAtYFEAmj73GlilBYF1vTHzlZ2AghA7ah9NWu8kXmtPWXO8f1LnLSem\nRw2YaaEbAuw0DdBPlyikcFyidw4JYXThZUBcvlKRGxnuaCuMu3+K5LxZMEg6n4ND\nVNhDUrmW6wigp0Ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.9. Find a Credential by ID (Type: SSH)

Curl request

$ curl 'https://example.com/api/v1/data/62a34921-9a32-43fa-a512-dd5a4ff48d0a' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/62a34921-9a32-43fa-a512-dd5a4ff48d0a HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4333

{
  "type" : "ssh",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "62a34921-9a32-43fa-a512-dd5a4ff48d0a",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYSwV+6ln+Txn79LQT8gStbK+mJBFWnGplHNU+loHdHkKckOVihBgDfjsW58s46X9HmKAiUetXBazQX2pVOhOKBETgEstVKB1CoN0fP98mbergW+THHxDpbtodep1EoWZePn/Qe/jly7joL8HZuVAwzunmBsrrm0B1cRF3mG4/XZDdHqbz1humoz/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOyr43obFIzGUcLLMj3p1SDukgzpxCHPmiZ72zO/hZ+HkB6319iZPsZgrR8vapQsJY5MfYJO9KPj0BKlFdi9y578VCj1pw6OYz7fuRrSfu/W0S1l9FLI450aFsNSji5ZX7elJ5A0qDQaFblECAsmbMjT9MCDyJDjZfmtb9UY4j/ywFeYP26RLqbdWMZBYgukVg+isCyxJczecaJKRWBnUryz5sSvbsOC38rdu7LAl/vxf8m2ZY6d/TZ2SgTEDgD4YxOG6WZEm2z2JGpgGtQcVO4ulfSa/xqovvidLc/kTWR15dVts+r1Uv7Btaax7XqTKqBkrxjhbpXD2RVQAeZhBOQ80pPbFtvUPN1pAdgc14w==",
    "private_key" : "-----BEGIN RSA PRIVATE KEY----- fake\nMIIJKAIBAAKCAgEA7PJUCHSfrZ3PY7n1/cC8wj1UtbraEycM0DtjUuRdOzhFl50f\neF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsFf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uGts/\nCZozYew3njh0xaLILlzoeXktWjY1DjVMPIxm+akWF/5N3iDZoxFOjeE5xgPGSF39\nZCVyubPbLIUDTYVDUmLtzz/7bi4KHU7sOK3bxPe2oEdjF9Epm+nKAa6J2JYlqYJa\ndC5Oi0g8GeIB5Zva04khbLtvHvr6qzKnsJQ9AoLjtxhtVyNm4o4DM8xhsXynBhX+\nHAJfMxrrClyvfua5o3QalELRBLIwTL01lXc0SWQxoN0AuZTOxuQciT7hIU0VfjFq\nXYVJAoIBAEYBpN9Wn4WBdLSa+LzP6PwU5Ld9lfL87j/It4xjjKpOzwMJSXl5TCLT\npE4ag6TSxwrPi1qc6E964V8H9h97tcEOpergYO4GBq7Jgquo4nNm+WDcKJ4nqAJB\ngFxb8vcCetAtYFEAmj73GlilBYF1vTHzlZ2AghA7ah9NWu8kXmtPWXO8f1LnLSem\nRw2YaaEbAuw0DdBPlyikcFyidw4JYXThZUBcvlKRGxnuaCuMu3+K5LxZMEg6n4ND\nVNhDUrmW6wigp0Ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----",
    "public_key_fingerprint" : null
  }
}

Path parameters

Table 1. /api/v1/data/{uuid}
Parameter Description

uuid

The credential uuid


3.10. Find a Credential by Name-Like

Returns an array of versions, sorted in order from newest to oldest.

Curl request

$ curl 'https://example.com/api/v1/data?name-like=some-credential&expires-within-days=1' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data?name-like=some-credential&expires-within-days=1 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 118

{
  "credentials" : [ {
    "version_created_at" : "2019-02-01T20:37:52Z",
    "name" : "some-credential-name"
  } ]
}

Request parameters

Parameter Required Description

name-like

true

The credential name substring

expires-within-days

false

The number of days the credential should expire within


3.11. Get a Credential by Name

Curl request

$ curl 'https://example.com/api/v1/data?name=%2Fsome-name&current=true' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data?name=%2Fsome-name&current=true HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 269

{
  "data" : [ {
    "type" : "value",
    "version_created_at" : "2019-02-01T20:37:52Z",
    "id" : "0efe85b6-f27f-4510-b2a0-e709c5162fe7",
    "name" : "/some-name",
    "metadata" : {
      "description" : "example metadata"
    },
    "value" : "some-value"
  } ]
}

Request parameters

Parameter Required Description

name

true

The name of the credential.

versions

false

The number of versions to return. Note: this cannot be combined with 'current'. Defaults to all versions if not provided.

current

false

Only return the latest version of a credential. Note: this cannot be combined with 'versions'.


3.12. Generate a Certificate Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-certificate-name",
  "type": "certificate",
  "parameters": {
    "common_name": "some-common-name",
    "ca": "some-ca",
    "is_ca": true,
    "duration": 730
  },
  "metadata": { "description": "example metadata"}
}'

HTTP request

POST /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 237
Host: example.com

{
  "name": "/some-certificate-name",
  "type": "certificate",
  "parameters": {
    "common_name": "some-common-name",
    "ca": "some-ca",
    "is_ca": true,
    "duration": 730
  },
  "metadata": { "description": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4456

{
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : true,
  "self_signed" : false,
  "generated" : true,
  "duration_overridden" : true,
  "duration_used" : 1460,
  "transitional" : false,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "3edfb571-28de-428f-a2cf-b72bb05ac0d8",
  "name" : "/some-certificate-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJj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lgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

mode

String

false

Overwrite interaction mode (Default: 'converge'). Supported modes are: overwrite, no-overwrite, converge

metadata

Object

false

Additional metadata of the credential.

parameters.common_name

String

false

Common name of generated credential value.

parameters.alternative_names

Array

false

Alternative names of generated credential value.

parameters.organization

String

false

Organization of generated credential value.

parameters.organization_unit

String

false

Organization Unit of generated credential value.

parameters.locality

String

false

Locality/city of generated credential value.

parameters.state

String

false

Locality/city of generated credential value.

parameters.country

String

false

Country of generated credential value.

parameters.key_usage

Array

false

Key usage extensions of generated credential value.

parameters.extended_key_usage

Array

false

Extended key usage extensions of generated credential value.

parameters.key_length

Number

false

Key length of generated credential value (Default: 2048). Valid key lengths are: 2048, 3072, 4096

parameters.duration

Number

false

Duration in days of generated credential value (Default: 365). If a minimum duration is configured and is greater than this duration, the minimum duration will be used instead.

parameters.ca

String

false

Name of certificate authority to sign of generated credential value.

parameters.is_ca

Boolean

false

Whether to generate credential value as a certificate authority.

parameters.self_sign

Boolean

false

Whether to self-sign generated credential value.

Notes:

  • If the duration is overridden by the minimum duration, the response will contain the duration_overridden flag set to true. It will also include the actual duration used to generate the certificate in the duration_used field.

  • When the mode is set to converge, certificates are no longer regenerated if the duration doesn’t match the existing certificate’s duration.


3.13. Generate a Password Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-password-name",
  "type": "password",
  "metadata": { "description": "example metadata"}
}'

HTTP request

POST /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 109
Host: example.com

{
  "name": "/some-password-name",
  "type": "password",
  "metadata": { "description": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 247

{
  "type" : "password",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "e200d19e-ff2f-4310-8038-3f2351af1d4e",
  "name" : "/some-password-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-password"
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

mode

String

false

Overwrite interaction mode (Default: 'converge'). Supported modes are: overwrite, no-overwrite, converge

metadata

Object

false

Additional metadata of the credential.

parameters.length

Number

false

Length of the generated value (Default: 30)

parameters.exclude_upper

Boolean

false

Exclude upper alpha characters from generated credential value

parameters.exclude_lower

Boolean

false

Exclude lower alpha characters from generated credential value

parameters.exclude_number

Boolean

false

Exclude number characters from generated credential value

parameters.include_special

Boolean

false

Include special characters from generated credential value


3.14. Generate a User Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-user-name",
  "type": "user",
  "metadata": { "description": "example metadata"}
}'

HTTP request

POST /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 101
Host: example.com

{
  "name": "/some-user-name",
  "type": "user",
  "metadata": { "description": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 335

{
  "type" : "user",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "ec4b3008-6db5-4035-88e1-db19c656782b",
  "name" : "/some-user-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "username" : "some-username",
    "password" : "some-password",
    "password_hash" : "foQzXY.HaydB."
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

mode

String

false

Overwrite interaction mode (Default: 'converge'). Supported modes are: overwrite, no-overwrite, converge

metadata

Object

false

Additional metadata of the credential.

parameters.username

String

false

User provided value for username

parameters.length

Number

false

Length of the generated value (Default: 30)

parameters.exclude_upper

Boolean

false

Exclude upper alpha characters from generated credential value

parameters.exclude_lower

Boolean

false

Exclude lower alpha characters from generated credential value

parameters.exclude_number

Boolean

false

Exclude number characters from generated credential value

parameters.include_special

Boolean

false

Include special characters from generated credential value


3.15. Generate a RSA Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-rsa-name",
  "type": "rsa",
  "metadata": { "description": "example metadata"}
}'

HTTP request

POST /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 99
Host: example.com

{
  "name": "/some-rsa-name",
  "type": "rsa",
  "metadata": { "description": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4382

{
  "type" : "rsa",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "482de224-a7d0-47af-9abf-72464c4717d9",
  "name" : "/some-rsa-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7PJUCHSfrZ3PY7n1/cC8\nwj1UtbraEycM0DtjUuRdOzhFl50feF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsF\nfupZ/k8Z+/S0E/IErWyvpiQRVpxqZRzVPpaB3R5CnJDlYoQYA347FufLOOl/R5ig\nIlHrVwWs0F9qVToTigRE4BLLVSgdQqDdHz/fJm3q4Fvkxx8Q6W7aHXqdRKFmXj5/\n0Hv45cu46C/B2blQMM7p5gbK65tAdXERd5huP12Q3R6m89YbpqM//FfCjAbgvPfV\n4Tdcmb5nWantzoaRDa/Dt3tuqe8cU8gsjrOZJNjMr+2Kljsq+N6GxSMxlHCyzI96\ndUg7pIM6cQhz5ome9szv4Wfh5Aet9fYmT7GYK0fL2qULCWOTH2CTvSj49ASpRXYv\ncue/FQo9acOjmM+37ka0n7v1tEtZfRSyOOdGhbDUo4uWV+3pSeQNKg0Gh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HNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

mode

String

false

Overwrite interaction mode (Default: 'converge'). Supported modes are: overwrite, no-overwrite, converge

metadata

Object

false

Additional metadata of the credential.

parameters.key_length

Number

false

Key length of generated credential value (Default: 2048). Valid key lengths are: 2048, 3072, 4096


3.16. Generate a SSH Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-ssh-name",
  "type": "ssh",
  "metadata": { "description": "example metadata"}
}'

HTTP request

POST /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 99
Host: example.com

{
  "name": "/some-ssh-name",
  "type": "ssh",
  "metadata": { "description": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4372

{
  "type" : "ssh",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "133f5f9c-6b22-4507-b788-57a1528cdc6f",
  "name" : "/some-ssh-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYS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c6E964V8H9h97tcEOpergYO4GBq7Jgquo4nNm+WDcKJ4nqAJB\ngFxb8vcCetAtYFEAmj73GlilBYF1vTHzlZ2AghA7ah9NWu8kXmtPWXO8f1LnLSem\nRw2YaaEbAuw0DdBPlyikcFyidw4JYXThZUBcvlKRGxnuaCuMu3+K5LxZMEg6n4ND\nVNhDUrmW6wigp0Ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----",
    "public_key_fingerprint" : "EvI0/GIUgDjcoCzUQM+EtwnVTryNsKRd6TrHAGKJJSI"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

mode

String

false

Overwrite interaction mode (Default: 'converge'). Supported modes are: overwrite, no-overwrite, converge

metadata

Object

false

Additional metadata of the credential.

parameters.key_length

Number

false

Key length of generated credential value (Default: 2048). Valid key lengths are: 2048, 3072, 4096

parameters.ssh_comment

String

false

SSH comment of generated credential value


3.17. Set a JSON Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-value-name",
  "type": "json",
  "metadata": { "description": "example metadata"},
  "value": {
    "some-json-key": "some-json-value"
  }
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 159
Host: example.com

{
  "name": "/some-value-name",
  "type": "json",
  "metadata": { "description": "example metadata"},
  "value": {
    "some-json-key": "some-json-value"
  }
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 270

{
  "type" : "json",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "a2454f7b-6dd5-4df9-a9e3-1107bdd132cc",
  "name" : "/some-value-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "some-json-key" : "some-json-value"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value

Object

true

Value of credential to set


3.18. Set a Certificate Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-certificate-name",
  "type": "certificate",
  "metadata": { "description": "example metadata"},
  "value": {
    "ca": "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmS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mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 4136
Host: example.com

{
  "name": "/some-certificate-name",
  "type": "certificate",
  "metadata": { "description": "example metadata"},
  "value": {
    "ca": "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw98SgEqfAy4btJjAP\nBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEHLDlselE4BZ+angg\n00eHE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" : "certificate",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "8a1efd46-5df0-4588-bb2b-ef9486258f2f",
  "name" : "/some-certificate-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw98SgEqfAy4btJjAP\nBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEHLDlselE4BZ+angg\n00eHEJ2RU4BaIdfzYgcCwj7rfh2HeHFl4OphM3XWjzDFuEDFc7u2dhfaSZbkHJtc\nzGCkKPRkYMHci6Aq2nbeIXahKRHwfycQWbOKE4aOooblY7dH8iTbzrHQY7TO3sJV\nowt82sKm+FMdjWI0CkCsK55X+zT8WkNPxo6xLWSppaRcGYLYPFGuBcIVWuFyqCN/\nT4DSBV+SD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lGQs6ei1AonFnjvGEhg+/H7104qm903Pkcr6\nXvHXp4cSK22OeendqVjpLAEnP3GOq5caGIiU8Q/sDbfVS+hh3eC+86fVpsWxn6rj\nFSeZU/sNt18vDgxfPmlHsNOdmphwOneX95fAbE6Bj46b6uJg4wJ6yaRtsXspJtgk\n7S/JfXIWVECjyaUE\n-----END CERTIFICATE-----",
    "private_key" : "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAta0x06fz7zHtD9z2++pwK/8a3V3oa74GJXT87+yNlp0dyRzI\neUpPV5q2tuyXetXuduewtxCmvGKZwCEkbzy1FKnBc753EOgWByIi8HUaV3jWIezp\nahUENv+koHidjl1o90KiPSId0FR2AJ7zD+HBqFSTab5KLaHRPox34xTtoo5slZCh\nqjUsstGCrxdDnDY69kVbxv48hZjBMyKkibSdcGbRGSE2femWi3Uw/uhoDsbgh3Zd\nJ1DyPpv/94UqJ/3/WDTuBU3zI1AI7sIe6+X1/lXRMqVnMp/35cH6fdcWepS7Yybi\nfv2XFB/g3HcJtVRKfYFayS1hg5+YXazdgmsuRwIDAQABAoIBABkK3EZqQplNuXlT\n97DhL5XGSU61kMG2j3mpoZVKIc40BBS3ufk2Fq+4V3KUNDaDYfvT6KujSPMeEvFv\n4BTROmi0aZe/FlcnQU9kaN/aVHI1lCwC+xMF/e8S1/94AMfMn8O4Kfg2nq4b0P7k\nP2mIsJK3wxtyq8jpzZegnISZsD6VcGimahRkNeU15/qVRYjVIH291RpfUkI2bp2V\nfC8AwdnvS20K2KdL9rJIWKFTWRY1ziOdlNLd2EfYhFXbMyRgh5lBd1gl/pLaDihS\nOmaEsgVaEADAFWU6LeCC7pNKdUKT2F+3VZflf1Hkz+8dx1LJ250zrROFQFcpneB8\nE1zg3dECgYEA4KA3ymC1O5vNjdW22jFud/O0iwna95dtiFJ3gSjq+VnAjV4Q1yo5\nWQgi3xzKS1pIw5CpS3A8cR2zJ39eMbWvUmfd8m9rUnN6dJLUedvJt2ho2jl2o5a5\n/wX2B/O2y3uf8hoJjN6tK9COVyBF8j9KjE7Rzdd/Qhi7FWxUtGL5KKkCgYEAzw1F\nCkErY//xs3ygk3y/Pdn3Z6nddCyd2ySfCOo/6S1HPrliX6AImYfE/TU3Sxa1D5hl\nDf/kFEx/81Bs61QPhPDDVPnQ3gs+517fv3jbHe3R1bWX0eunnX3Tn+rQ4ep+LCIQ\nI44b3SxiSKmjYxIj0l35cJwIOVhNxznfjBAlRW8CgYAoh6ApavOocr9PFT2t9vdY\nu2dbIwcYX4FK9J5NdsWXAkPE/jEJsbuxPc+U9Evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----",
    "transitional" : false,
    "certificate_authority" : true,
    "self_signed" : false,
    "generated" : false,
    "expiry_date" : "2020-09-03T18:30:11Z"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value.ca

String

true

Certificate authority value of credential to set. Note: 'ca' and 'ca_name' are mutually exclusive values.

value.ca_name

String

false

Name of CA credential in credhub that has signed this certificate. Note: 'ca' and 'ca_name' are mutually exclusive values.

value.certificate

String

true

Certificate value of credential to set.

value.private_key

String

true

Private key value of credential to set.


3.19. Set a Password Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-password-name",
  "type": "password",
  "metadata": { "description": "example metadata"},
  "value": "some-password"
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 137
Host: example.com

{
  "name": "/some-password-name",
  "type": "password",
  "metadata": { "description": "example metadata"},
  "value": "some-password"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 247

{
  "type" : "password",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "bd3aa1bc-9e54-460c-8ae7-d3a3c146327a",
  "name" : "/some-password-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-password"
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value

String

true

Value of credential to set


3.20. Set a RSA Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-rsa-name",
  "type": "rsa",
  "metadata": { "description": "example metadata"},
  "value": {
    "public_key": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7PJUCHSfrZ3PY7n1/cC8\nwj1UtbraEycM0DtjUuRdOzhFl50feF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsF\nfupZ/k8Z+/S0E/IErWyvpiQRVpxqZRzVPpaB3R5CnJDlYoQYA347FufLOOl/R5ig\nIlHrVwWs0F9qVToTigRE4BLLVSgdQqDdHz/fJm3q4Fvkxx8Q6W7aHXqdRKFmXj5/\n0Hv45cu46C/B2blQMM7p5gbK65tAdXERd5huP12Q3R6m89YbpqM//FfCjAbg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dBPlyikcFyidw4JYXThZUBcvlKRGxnuaCuMu3+K5LxZMEg6n4ND\nVNhDUrmW6wigp0Ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 4270
Host: example.com

{
  "name": "/some-rsa-name",
  "type": "rsa",
  "metadata": { "description": "example metadata"},
  "value": {
    "public_key": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7PJUCHSfrZ3PY7n1/cC8\nwj1UtbraEycM0DtjUuRdOzhFl50feF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsF\nfupZ/k8Z+/S0E/IErWyvpiQRVpxqZRzVPpaB3R5CnJDlYoQYA347FufLOOl/R5ig\nIlHrVwWs0F9qVToTigRE4BLLVSgdQqDdHz/fJm3q4Fvkxx8Q6W7aHXqdRKFmXj5/\n0Hv45cu46C/B2blQMM7p5gbK65tAdXERd5huP12Q3R6m89YbpqM//FfCjAbgvPfV\n4Tdcmb5nWantzoaRDa/Dt3tuqe8cU8gsjrOZJNjMr+2Kljsq+N6GxS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igp0Ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4382

{
  "type" : "rsa",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "72113e99-b9a5-4e5c-b692-c7ab07e1d2ba",
  "name" : "/some-rsa-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7PJUCHSfrZ3PY7n1/cC8\nwj1UtbraEycM0DtjUuRdOzhFl50feF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsF\nfupZ/k8Z+/S0E/IErWyvpiQRVpxqZRzVPpaB3R5CnJDlYoQYA347FufLOOl/R5ig\nIlHrVwWs0F9qVToTigRE4BLLVSgdQqDdHz/fJm3q4Fvkxx8Q6W7aHXqdRKFmXj5/\n0Hv45cu46C/B2blQMM7p5gbK65tAdXERd5huP12Q3R6m89YbpqM//FfCjAbgvPfV\n4Tdcmb5nWantzoaRDa/Dt3tuqe8cU8gsjrOZJNjMr+2Kljsq+N6GxSMxlHCy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ka/JRQIOmFldh37ZfzkRdX9QP9EIKYrcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value.public_key

String

true

Public key value of credential to set.

value.private_key

String

true

Private key value of credential to set.


3.21. Set a SSH Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-ssh-name",
  "type": "ssh",
  "metadata": { "description": "example metadata" },
  "value": {
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYSwV+6ln+Txn79LQT8gStbK+mJBFWnGplHNU+loHdHkKckOVihBgDfjsW58s46X9HmKAiUetXBazQX2pVOhOKBETgEstVKB1CoN0fP98mbergW+THHxDpbtodep1EoWZePn/Qe/jly7joL8HZuVAwzunmBsrrm0B1cRF3mG4/XZDdHqbz1humoz/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOy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rcFT8wg+f58GBRRTSBk2\nv4mk5kyGfPTIaN4+PhNV03GXq5WhpsECggEBAMFMfqnqDWFVhkV7+cLYzcEmNXeb\n1GqbszI7sDRHNt3yb1JIkNDAbwmX4aCPWgF0xIn0LVHaAg2nbGGZQKX4PE3+8A+h\n2fogM0KlS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 4183
Host: example.com

{
  "name": "/some-ssh-name",
  "type": "ssh",
  "metadata": { "description": "example metadata" },
  "value": {
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYSwV+6ln+Txn79LQT8gStbK+mJBFWnGplHNU+loHdHkKckOVihBgDfjsW58s46X9HmKAiUetXBazQX2pVOhOKBETgEstVKB1CoN0fP98mbergW+THHxDpbtodep1EoWZePn/Qe/jly7joL8HZuVAwzunmBsrrm0B1cRF3mG4/XZDdHqbz1humoz/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOyr43obFIzGUcLLMj3p1SDukgzpxCHPmiZ72zO/hZ+HkB6319iZPsZgrR8vapQsJY5MfYJO9KPj0BKlFdi9y578VCj1pw6OYz7fuRrSfu/W0S1l9FLI450aFsNSji5ZX7elJ5A0qDQaFblECAsmbMjT9MCDyJDjZfmtb9UY4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lS3zn+qFuZJ3A8WETaD6zZcNff4wANz9NDZHUwYb4LAf6pptwlQexW1NH\nw+u5e8YFE2iF3yCMP60GApTyR3RBNWa6I4yZ72s9p92Kcv5+bkR3srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----"
  }
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4331

{
  "type" : "ssh",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "2463199a-5ee6-47fd-8a40-e589a289c302",
  "name" : "/some-ssh-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYSwV+6ln+Txn79LQT8gStbK+mJBFWnGplHNU+loHdHkKckOVihBgDfjsW58s46X9HmKAiUetXBazQX2pVOhOKBETgEstVKB1CoN0fP98mbergW+THHxDpbtodep1EoWZePn/Qe/jly7joL8HZuVAwzunmBsrrm0B1cRF3mG4/XZDdHqbz1humoz/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOyr43obFIzGUcLLMj3p1SDukgzpxCHPmiZ72zO/hZ+HkB6319iZPsZgrR8vapQsJY5MfYJO9KPj0BKlFdi9y578VCj1pw6OYz7fuRrSfu/W0S1l9FLI450aFsNSji5ZX7elJ5A0qDQaFblECAsmbMjT9MCDyJDjZfmtb9UY4j/ywFeYP26RLqbdWMZBYgukVg+isCyxJczecaJKRWBnUryz5sSvbsOC38rdu7LAl/vxf8m2ZY6d/TZ2SgTEDgD4YxOG6WZEm2z2JGpgGtQcVO4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srnw1eJsvHEE\nlzD+HCQtoCJlCSDhur+osEsS+zpwclpPHsgAoyqfMlneu/H8Zssa0TUxLBDVx6fp\ngVJz8k/YqVaXX3OmF2YLihmku7Stsqwifnpu/Io9gLL2wM8GyPonwfe3d1E=\n-----END RSA PRIVATE KEY-----",
    "public_key_fingerprint" : null
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value.public_key

String

true

Public key value of credential to set.

value.private_key

String

true

Private key value of credential to set.


3.22. Set a User Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-user-name",
  "type": "user",
  "metadata": { "description": "example metadata"},
  "value": {
    "username": "some-username",
    "password": "some-password"
  }
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 184
Host: example.com

{
  "name": "/some-user-name",
  "type": "user",
  "metadata": { "description": "example metadata"},
  "value": {
    "username": "some-username",
    "password": "some-password"
  }
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 335

{
  "type" : "user",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "df1ba163-3265-4d71-8e78-11c6f6e7c69c",
  "name" : "/some-user-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "username" : "some-username",
    "password" : "some-password",
    "password_hash" : "foQzXY.HaydB."
  }
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value.username

String

true

The username to set.

value.password

String

true

The password to set.


3.23. Set a Value Credential

Curl request

$ curl 'https://example.com/api/v1/data' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "name": "/some-value-name",
  "type": "value",
  "metadata": { "description": "example metadata"},
  "value": "some-value"
}'

HTTP request

PUT /api/v1/data HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 128
Host: example.com

{
  "name": "/some-value-name",
  "type": "value",
  "metadata": { "description": "example metadata"},
  "value": "some-value"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 238

{
  "type" : "value",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "faea716d-b6cb-4062-80c7-dea8e43ee143",
  "name" : "/some-value-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-value"
}

Request fields

Path Type Required Description

name

String

true

The name of the credential.

type

String

true

The type of credential.

metadata

Object

false

Additional metadata for credential to set.

value

String

true

Value of credential to set


3.24. Delete a Credential

Curl request

$ curl 'https://example.com/api/v1/data?name=/some-credential-name' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

DELETE /api/v1/data?name=/some-credential-name HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 204 No Content

Request parameters

Parameter Required Description

name

true

The credential name


4. Certificates Endpoint

4.1. Rotation Instructions

See here for certificate rotation instructions.


4.2. Minimum Duration

A minimum duration can be configured for leaf and CA certificates using the certificates.leaf_minimum_duration_in_days and certificates.ca_minimum_duration_in_days server-level configuration fields. When these fields are configured, if a request to generate or regenerate a certificate has a duration lower than the minimum, then the minimum duration is used instead.

The API response will include two fields:

  • A duration_overridden field that is true when the minimum duration was used instead, or false if the requested duration was used.

  • A duration_used field that is the duration (in days) used when the certificate was generated.


4.3. Get All Certificates

Curl request

$ curl 'https://example.com/api/v1/certificates' -i -X GET \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json'

HTTP request

GET /api/v1/certificates HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 660

{
  "certificates" : [ {
    "name" : "/some-name",
    "versions" : [ {
      "id" : "bb5f5b60-2d9d-43d0-88bd-c228c4e4baf0",
      "expiry_date" : "2020-02-01T20:37:52Z",
      "transitional" : true,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    }, {
      "id" : "f58f0562-b68f-4012-a4e1-6ec84564f113",
      "expiry_date" : "2019-02-01T20:37:52Z",
      "transitional" : false,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    } ],
    "signed_by" : "/testCa",
    "signs" : [ "/cert1", "/cert2" ],
    "id" : "ffd414cc-246c-47b5-b8be-5d12bd2cf102"
  } ]
}

Note: The certificate versions will be sorted in descending order of their creation date.


4.4. Get a Certificate By Name

Curl request

$ curl 'https://example.com/api/v1/certificates?name=%2Fsome-name' -i -X GET \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json'

HTTP request

GET /api/v1/certificates?name=%2Fsome-name HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 429

{
  "certificates" : [ {
    "name" : "/some-name",
    "versions" : [ {
      "id" : "aa31a45c-b6ef-4d3e-9aaf-2d87a87d9952",
      "expiry_date" : "2019-02-01T20:37:52Z",
      "transitional" : false,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    } ],
    "signed_by" : "/testCa",
    "signs" : [ "/cert1", "/cert2" ],
    "id" : "d40b3bc7-351e-4385-a975-f5394f51bb17"
  } ]
}

Request parameters

Parameter Required Description

name

true

The name of the certificate.

Note: The certificate versions will be sorted in descending order of their creation date.


4.5. Regenerate a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/4006a837-8b06-4152-ba5a-20d451952cdf/regenerate' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json' \
    -d '{"set_as_transitional": true, "allow_transitional_parent_to_sign": true, "metadata": {"description": "example metadata"}}'

HTTP request

POST /api/v1/certificates/4006a837-8b06-4152-ba5a-20d451952cdf/regenerate HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json
Content-Length: 121
Host: example.com

{"set_as_transitional": true, "allow_transitional_parent_to_sign": true, "metadata": {"description": "example metadata"}}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4444

{
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : false,
  "self_signed" : false,
  "generated" : true,
  "duration_overridden" : true,
  "duration_used" : 1234,
  "transitional" : true,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "4006a837-8b06-4152-ba5a-20d451952cdf",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw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4guI=\n-----END RSA PRIVATE KEY-----"
  }
}

Path parameters

Table 1. /api/v1/certificates/{certificateId}/regenerate
Parameter Description

certificateId

The certificate identifier.

Request fields

Path Type Required Description

set_as_transitional

Boolean

false

Set if certificate is transitional

allow_transitional_parent_to_sign

Boolean

false

Allows a transitional version of the parent CA to sign this certificate if the transitional version is the latest version

metadata

Object

false

Additional metadata of the credential.

Note:

  • If a certificate credential only has one version and it is marked as transitional the credential cannot be regenerated using this endpoint.

  • If the duration used to generate the currently active version of the certificate is lower than the minimum duration, the regenerated certificate will use the minimum duration instead and the response will contain the duration_overridden flag set to true. The duration value used to regenerate the certificate is included in the duration_used field of the response.


4.6. Update Transitional Version

Curl request

$ curl 'https://example.com/api/v1/certificates/bd37d1b9-32b1-4545-b0fb-3fa3f435650f/update_transitional_version' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json' \
    -d '{"version": "bc69b5de-f4dd-415f-b6d6-b9fc03eaad1d"}'

HTTP request

PUT /api/v1/certificates/bd37d1b9-32b1-4545-b0fb-3fa3f435650f/update_transitional_version HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json
Content-Length: 51
Host: example.com

{"version": "bc69b5de-f4dd-415f-b6d6-b9fc03eaad1d"}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4390

[ {
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : false,
  "self_signed" : false,
  "generated" : true,
  "transitional" : true,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "bd37d1b9-32b1-4545-b0fb-3fa3f435650f",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVz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BAlRW8CgYAoh6ApavOocr9PFT2t9vdY\nu2dbIwcYX4FK9J5NdsWXAkPE/jEJsbuxPc+U9Evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
} ]

Path parameters

Table 1. /api/v1/certificates/{certificateId}/update_transitional_version
Parameter Description

certificateId

The certificate identifier.

Request fields

Path Type Required Description

version

String

true

Version UUID of certificate to set as transitional. Set version to null to ensure no versions are transitional.


4.7. Get All Versions of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/2008b556-ab4c-4ae4-8647-a08a40bac2f4/versions?current=true' -i -X GET \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json'

HTTP request

GET /api/v1/certificates/2008b556-ab4c-4ae4-8647-a08a40bac2f4/versions?current=true HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4390

[ {
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : false,
  "self_signed" : false,
  "generated" : true,
  "transitional" : true,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "2008b556-ab4c-4ae4-8647-a08a40bac2f4",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw98SgEqfAy4btJjAP\nBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEHLDlselE4BZ+angg\n00eHEJ2RU4BaIdfzYgcCwj7rfh2HeHFl4OphM3XWjzDFuEDFc7u2dhfaSZbkHJtc\nzGCkKPRkYMHci6Aq2nbeIXahKRHwfycQWbOKE4aOooblY7dH8iTbzrHQY7TO3sJV\nowt82sKm+FMdjWI0CkCsK55X+zT8WkNPxo6xLWSppaRcGYLYPFGuBcIVWuFyqCN/\nT4DSBV+SDFTp0SOd9R4HydAmwksar+tdhJoCW+N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F8j9KjE7Rzdd/Qhi7FWxUtGL5KKkCgYEAzw1F\nCkErY//xs3ygk3y/Pdn3Z6nddCyd2ySfCOo/6S1HPrliX6AImYfE/TU3Sxa1D5hl\nDf/kFEx/81Bs61QPhPDDVPnQ3gs+517fv3jbHe3R1bWX0eunnX3Tn+rQ4ep+LCIQ\nI44b3SxiSKmjYxIj0l35cJwIOVhNxznfjBAlRW8CgYAoh6ApavOocr9PFT2t9vdY\nu2dbIwcYX4FK9J5NdsWXAkPE/jEJsbuxPc+U9Evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
} ]

Path parameters

Table 1. /api/v1/certificates/{certificateId}/versions
Parameter Description

certificateId

The certificate identifier.

Request parameters

Parameter Required Description

current

false

Return current active version

Note: The certificate versions will be sorted in descending order of their creation date.


4.8. Create a Version of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/a0c2f146-09c5-4515-89bb-c1605527a0ba/versions' -i -X POST \
    -H 'Content-Type: application/json;charset=utf-8' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json' \
    -d '{
  "value": {
    "ca": "-----BEGIN CER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/kFEx/81Bs61QPhPDDVPnQ3gs+517fv3jbHe3R1bWX0eunnX3Tn+rQ4ep+LCIQ\nI44b3SxiSKmjYxIj0l35cJwIOVhNxznfjBAlRW8CgYAoh6ApavOocr9PFT2t9vdY\nu2dbIwcYX4FK9J5NdsWXAkPE/jEJsbuxPc+U9Evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  },
  "transitional": true
}'

HTTP request

POST /api/v1/certificates/a0c2f146-09c5-4515-89bb-c1605527a0ba/versions HTTP/1.1
Content-Type: application/json;charset=utf-8
Authorization: Bearer [some-token]
Accept: application/json
Content-Length: 4047
Host: example.com

{
  "value": {
    "ca": "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9J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Pp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  },
  "transitional": true
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4387

{
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : false,
  "self_signed" : false,
  "generated" : false,
  "transitional" : true,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "a0c2f146-09c5-4515-89bb-c1605527a0ba",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1m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rrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
}

Path parameters

Table 1. /api/v1/certificates/{certificateId}/versions
Parameter Description

certificateId

The certificate identifier.


4.9. Delete a Version of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/9d9726fe-b71a-4f77-a753-6a76c6c3fc50/versions/e3d646fe-be86-42fa-a2a2-7de8f469855c' -i -X DELETE \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json'

HTTP request

DELETE /api/v1/certificates/9d9726fe-b71a-4f77-a753-6a76c6c3fc50/versions/e3d646fe-be86-42fa-a2a2-7de8f469855c HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4386

{
  "type" : "certificate",
  "expiry_date" : "2020-09-03T18:30:11Z",
  "certificate_authority" : false,
  "self_signed" : false,
  "generated" : true,
  "transitional" : true,
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "9d9726fe-b71a-4f77-a753-6a76c6c3fc50",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggE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evn9r1kVAjH7NNrEZHO0aN8Uqz0\nsHsSkFoMAXwZ5phh+G9YIYWxwmaOs9aRllDDNI1J/99nPp10hoU2f6X/QHp+cD8S\nO/KNMpHqqi2veuF5vtX4KQKBgHTc6oDVM6ZniYZi60cTe+VvJwLtjz7JB/fufYzM\nmnIDyliOzgVnEDOHvBmmdaT+FgfNXgw+x/7lBrrQRAm3EmNYeQd3UPpiooh4thUe\nI56K4oqayiwDtEFiCZYTNP6uGbTTLQTEatm0+WxFwyBh1rIftHBowQOM4al28sPd\nQQwlAoGAQubX3mTUkJ5F1z/J6iVxUDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  }
}

Path parameters

Table 1. /api/v1/certificates/{certificateId}/versions/{versionId}
Parameter Description

certificateId

The certificate identifier.

versionId

Version Id


5. Permissions V2 Endpoint

5.1. Overview

Permissions can be defined for namespaces as well as on explicit credential names. Permissions are additive — if any rule exists authorizing a user to take an action, then the action will be permitted.


5.2. Get a V2 Permission by Actor and Path

Curl request

$ curl 'https://example.com/api/v2/permissions?path=%2Fsome-path%2F*&actor=some-actor' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v2/permissions?path=%2Fsome-path%2F*&actor=some-actor HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "3b8fde14-16f0-4e31-829c-18d34909384a"
}

Request parameters

Parameter Required Description

path

true

The credential path. Can be either a path with an asterisk (*) at the end, or the full name of a credential.

actor

true

The credential actor


5.3. Get a V2 Permission by UUID

Curl request

$ curl 'https://example.com/api/v2/permissions/9f6ecc20-c4db-48fb-b098-7c154f38a328' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v2/permissions/9f6ecc20-c4db-48fb-b098-7c154f38a328 HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "9f6ecc20-c4db-48fb-b098-7c154f38a328"
}

Path parameters

Table 1. /api/v2/permissions/{uuid}
Parameter Description

uuid

The permission uuid


5.4. Create a V2 Permission

Curl request

$ curl 'https://example.com/api/v2/permissions' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "path": "/some-path/*",
  "actor": "some-actor",
  "operations": [
    "read",
    "write"
  ]
}'

HTTP request

POST /api/v2/permissions HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 100
Host: example.com

{
  "path": "/some-path/*",
  "actor": "some-actor",
  "operations": [
    "read",
    "write"
  ]
}

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "fb5ccd03-4ff2-4223-b5fd-521135e75698"
}

Request fields

Path Type Required Description

path

String

true

The credential path. Can be either a path with an asterisk (*) at the end, or the full name of a credential.

actor

String

true

The credential actor

operations

Array

true

The list of permissions to be granted. Supported operations are: read, write, delete, read_acl, write_acl


5.5. Update a V2 Permission

Curl request

$ curl 'https://example.com/api/v2/permissions/cd56f040-412f-455c-ad41-5527693ccb4d' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "path": "/some-path/*",
  "actor": "some-actor",
  "operations": [
    "read",
    "write"
  ]
}'

HTTP request

PUT /api/v2/permissions/cd56f040-412f-455c-ad41-5527693ccb4d HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 100
Host: example.com

{
  "path": "/some-path/*",
  "actor": "some-actor",
  "operations": [
    "read",
    "write"
  ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "cd56f040-412f-455c-ad41-5527693ccb4d"
}

Path parameters

Table 1. /api/v2/permissions/{uuid}
Parameter Description

uuid

The permission uuid

Request fields

Path Type Required Description

path

String

true

The credential path. Can be either a path with an asterisk (*) at the end, or the full name of a credential.

actor

String

true

The credential actor

operations

Array

true

The list of permissions to be granted. Supported operations are: read, write, delete, read_acl, write_acl


5.6. Update a V2 Permission Operation

Curl request

$ curl 'https://example.com/api/v2/permissions/258765d7-e916-4eb7-bed2-4b48a011a9ed' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "operations": [
    "read",
    "write"
  ]
}'

HTTP request

PATCH /api/v2/permissions/258765d7-e916-4eb7-bed2-4b48a011a9ed HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 49
Host: example.com

{
  "operations": [
    "read",
    "write"
  ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "258765d7-e916-4eb7-bed2-4b48a011a9ed"
}

Path parameters

Table 1. /api/v2/permissions/{uuid}
Parameter Description

uuid

The permission uuid

Request fields

Path Type Required Description

operations

Array

true

The list of permissions to be granted. Supported operations are: read, write, delete, read_acl, write_acl


5.7. Delete a V2 Permission

Curl request

$ curl 'https://example.com/api/v2/permissions/f361ff67-2529-43ff-9a0c-f27418285d1a' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

DELETE /api/v2/permissions/f361ff67-2529-43ff-9a0c-f27418285d1a HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 144

{
  "path" : "/some-path/*",
  "operations" : [ "read", "write" ],
  "actor" : "some-actor",
  "uuid" : "f361ff67-2529-43ff-9a0c-f27418285d1a"
}

Path parameters

Table 1. /api/v2/permissions/{uuid}
Parameter Description

uuid

The permission uuid


6. Permissions V1 (Deprecated)

6.1. Get a V1 Permission by Actor and Name

Curl request

$ curl 'https://example.com/api/v1/permissions?credential_name=some-credential-name' -i -X GET \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/permissions?credential_name=some-credential-name HTTP/1.1
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 162

{
  "credential_name" : "/some-credential-name",
  "permissions" : [ {
    "actor" : "some-actor",
    "path" : "some-path",
    "operations" : [ "read" ]
  } ]
}

Request parameters

Parameter Required Description

credential_name

true

The name of the credential to get permissions for.


6.2. Create a V1 Permission

Curl request

$ curl 'https://example.com/api/v1/permissions' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "credential_name": "/some-credential-name",
  "permissions": [
    {
      "actor": "some-actor",
      "path": "some-path",
      "operations": [
        "read"
      ]
    }
  ]
}'

HTTP request

POST /api/v1/permissions HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 185
Host: example.com

{
  "credential_name": "/some-credential-name",
  "permissions": [
    {
      "actor": "some-actor",
      "path": "some-path",
      "operations": [
        "read"
      ]
    }
  ]
}

HTTP response

HTTP/1.1 201 Created

Request fields

Path Type Required Description

credential_name

String

true

The name of the credential to create permissions for

permissions[].path

String

true

The credential path

permissions[].actor

String

true

The credential actor

permissions[].operations

Array

true

The list of permissions to be granted. Supported operations are: read, write, delete, read_acl, write_acl


6.3. Delete a V1 Permission

Curl request

$ curl 'https://example.com/api/v1/permissions?credential_name=some-credential-name&actor=some-actor' -i -X DELETE \
    -H 'Authorization: Bearer [some-token]'

HTTP request

DELETE /api/v1/permissions?credential_name=some-credential-name&actor=some-actor HTTP/1.1
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 204 No Content

Request parameters

Parameter Required Description

credential_name

true

The name of the credential to delete permissions for.

actor

true

The actor to delete permissions for.


7. Regenerate Credentials Endpoint

7.1. Overview

The regenerate endpoints generate new values for credentials using the same parameters as the stored value. All RSA and SSH credentials may be regenerated. Password and user credentials must have been generated to enable regeneration. Statically set certificates may be regenerated if they are self-signed or if the CA name has been set to a stored CA certificate.


7.2. Regenerate a Credential

Curl request

$ curl 'https://example.com/api/v1/regenerate' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json' \
    -d '{
    "name": "/some-name",
    "metadata": { "some": "example metadata"}
}'

HTTP request

POST /api/v1/regenerate HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json
Content-Length: 75
Host: example.com

{
    "name": "/some-name",
    "metadata": { "some": "example metadata"}
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 232

{
  "type" : "value",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "310efcf5-703d-43a8-95ab-6fa52354dcbc",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : "some-value"
}

Request fields

Path Type Required Description

name

String

true

The credential name to regenerate.

metadata

Object

false

Additional metadata of the credential.


7.3. Bulk Regenerate Credentials

Curl request

$ curl 'https://example.com/api/v1/bulk-regenerate' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json' \
    -d '{
    "signed_by": "/some-ca"
}'

HTTP request

POST /api/v1/bulk-regenerate HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json
Content-Length: 31
Host: example.com

{
    "signed_by": "/some-ca"
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 92

{
  "regenerated_credentials" : [ "/some-credential-name", "/some-other-credential-name" ]
}

Request fields

Path Type Required Description

signed_by

String

true

The name of the CA that signs regenerated certificates.


8. Interpolation Endpoint

8.1. Interpolate a JSON Object

This endpoint receives a VCAP_SERVICES object containing CredHub references and responds with the object containing the credential values interpolated.

Note
At this time, only credential references at credentials.credhub-ref will be interpolated. The key credhub-ref will be removed and the referenced credential object will be set as the value of credentials.

Curl request

$ curl 'https://example.com/api/v1/interpolate' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "service-name": [
    {
      "credentials": {
        "credhub-ref": "/some-credhub-ref"
      },
      "label": "service-name",
      "other-metadata": "some-other-metadata"
    }
  ]
}'

HTTP request

POST /api/v1/interpolate HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 191
Host: example.com

{
  "service-name": [
    {
      "credentials": {
        "credhub-ref": "/some-credhub-ref"
      },
      "label": "service-name",
      "other-metadata": "some-other-metadata"
    }
  ]
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 207

{
  "service-name" : [ {
    "credentials" : {
      "username" : "some-username",
      "password" : "some-password"
    },
    "label" : "service-name",
    "other-metadata" : "some-other-metadata"
  } ]
}

9. Encryption Key Usage Endpoint

9.1. Overview

This endpoint retrieves the number of credentials encrypted by the active key, provided inactive keys and unknown keys. After initiating an encryption key rotation, you may validate the status of the encryption key rotation, and whether it successfully rotated all of the stored data, using this endpoint.


9.2. Get Encryption Key Usage

Curl request

$ curl 'https://example.com/api/v1/key-usage' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/key-usage HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 68

{
  "active_key" : 10,
  "inactive_keys" : 2,
  "unknown_keys" : 1
}

10. Management Endpoint

10.1. Overview

This endpoint can toggle read only mode for the entire API.


10.2. Get Read Only Mode Status

Curl request

$ curl 'https://example.com/management' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /management HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 30

{
  "read_only_mode" : false
}

10.3. Set Read Only Mode Status

Curl request

$ curl 'https://example.com/management' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
    "read_only_mode": true
}'

HTTP request

POST /management HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Content-Length: 30
Host: example.com

{
    "read_only_mode": true
}

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 29

{
  "read_only_mode" : true
}

Request fields

Path Type Required Description

read_only_mode

Boolean

true

Enables / disables read only mode for the entire API.


11. Info Endpoint

11.1. Overview

This endpoint returns the location of the UAA server that this API is registered to communicate with. Clients can authenticate with this UAA server.

11.2. Get Info

Curl request

$ curl 'https://example.com/info' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /info HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 109

{
  "auth-server" : {
    "url" : "https://uaa.url.example.com"
  },
  "app" : {
    "name" : "CredHub"
  }
}

12. Version Endpoint

12.1. Overview

This request displays the server version.


12.2. Get Version

Curl request

$ curl 'https://example.com/version' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /version HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 25

{
  "version" : "x.x.x"
}

13. Health Endpoint

13.1. Overview

This endpoint verifies that communication with the server via the API is possible.


13.2. Get Server Status

Curl request

$ curl 'https://example.com/health' -i -X GET

HTTP request

GET /health HTTP/1.1
Host: example.com

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 21

{
  "status" : "UP"
}