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.


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/e9a3b7cd-101e-47bb-bee5-28dbe3abcc8a' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/e9a3b7cd-101e-47bb-bee5-28dbe3abcc8a 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" : "e9a3b7cd-101e-47bb-bee5-28dbe3abcc8a",
  "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/4dbff4bf-fe80-41e3-b510-b655e4a9801f' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/4dbff4bf-fe80-41e3-b510-b655e4a9801f 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" : "4dbff4bf-fe80-41e3-b510-b655e4a9801f",
  "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/e081c0df-dd6a-4c0c-994a-f2aa21c167a8' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/e081c0df-dd6a-4c0c-994a-f2aa21c167a8 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" : "e081c0df-dd6a-4c0c-994a-f2aa21c167a8",
  "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/bab1c528-5c6b-4aba-8ccd-9c6ab59ba8da' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/bab1c528-5c6b-4aba-8ccd-9c6ab59ba8da 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" : "bab1c528-5c6b-4aba-8ccd-9c6ab59ba8da",
  "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/d194122c-efc6-4188-8912-51dfb0a45da0' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/d194122c-efc6-4188-8912-51dfb0a45da0 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" : "d194122c-efc6-4188-8912-51dfb0a45da0",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GC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VAjH7NNrEZHO0aN8Uqz0\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/82575850-898a-46c9-aa70-20b00b6f824c' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/82575850-898a-46c9-aa70-20b00b6f824c 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" : "82575850-898a-46c9-aa70-20b00b6f824c",
  "name" : "/some-value-path",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7PJUCHSf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JfMxrrClyvfua5o3QalELRBLIwTL01lXc0SWQxoN0AuZTOxuQciT7hIU0VfjFq\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/d7a576af-25bf-4dcc-a2d4-cbf06c09c9fc' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v1/data/d7a576af-25bf-4dcc-a2d4-cbf06c09c9fc 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" : "d7a576af-25bf-4dcc-a2d4-cbf06c09c9fc",
  "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+BoGEsFfupZ/k8Z+/S0E/IErWyvpiQRVpxq\nZRzVPpaB3R5CnJDl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iDZoxFOjeE5xgPGSF39\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" : "21e49897-53ff-4cef-b31a-59923b89303a",
    "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
  },
  "metadata": { "description": "example metadata"}
}'

HTTP request

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

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

HTTP response

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

{
  "type" : "certificate",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "450409f3-0057-42c7-b4f3-2b8c85ee7fde",
  "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\n00eHEJ2RU4BaIdfzYgcCwj7rfh2HeHFl4OphM3XWjzDFuEDFc7u2dhfaS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250zrROFQFcpneB8\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" : true,
    "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.

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).

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.


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" : "d59e759f-c277-4da7-8435-6a54e892305e",
  "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" : "7aed84d1-6c71-48c0-a4c0-6d0d832623ce",
  "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" : "5cbab92f-22ed-498f-90b3-b93e7e147a83",
  "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+3pSeQNKg0GhW5RAgLJ\nmzI0/TAg8iQ42X5rW/VGOI/8sBXmD9ukS6m3VjGQWILpFYPorAssSXM3nGiSkVgZ\n1K8s+bEr27Dgt/K3buywJf78X/JtmWOnf02dkoExA4A+GMThulmRJts9iRqYBrUH\nFTuLpX0mv8aqL74nS3P5E1kdeXVbbPq9VL+wbWmse16kyqgZK8Y4W6Vw9kVUAHmY\nQTkPNKT2xbb1DzdaQHYHNeMCAwEAAQ==\n-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BDVx6fp\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" : "a6936779-9282-4327-a009-354a011ed17d",
  "name" : "/some-ssh-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "public_key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDs8lQIdJ+tnc9jufX9wLzCPVS1utoTJwzQO2NS5F07OEWXnR94XtYY3KtBLu10LHjZzH5maxdWYkyb4GgYSwV+6ln+Txn79LQT8gStbK+mJBFWnGplHNU+loHdHkKckOVihBgDfjsW58s46X9HmKAiUetXBazQX2pVOhOKBETgEstVKB1CoN0fP98mbergW+THHxDpbtodep1EoWZePn/Qe/jly7joL8HZuVAwzunmBsrrm0B1cRF3mG4/XZDdHqbz1humoz/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOyr43obFIzGUcLLMj3p1SDukgzpx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4mk5kyGfPTIaN4+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" : "cf05c9b5-f90f-48f4-adbf-192397c7794f",
  "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\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw98SgEqfAy4btJjAP\nBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEHLDlselE4BZ+angg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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\n00eHEJ2RU4BaIdfzYgcCwj7rfh2HeHFl4OphM3XWjzDFuEDFc7u2dhfaSZbkHJtc\nzGCkKPRkYMHci6Aq2nbeIXahKRHwfycQWbOKE4aOooblY7dH8iTbzrHQY7TO3sJV\nowt82sKm+FMdjWI0CkCsK55X+zT8WkNPxo6xLWSppaRcGYLYPFGuBcIVWuFyqCN/\nT4DSBV+SDFTp0SOd9R4HydAmwksar+tdhJoCW+N1WkF02q83NLkVX7rlPrJ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xUtGL5KKkCgYEAzw1F\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-----"
  }
}

HTTP response

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

{
  "type" : "certificate",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "55a164c4-9bcd-4f9d-ad7c-a13b4b0bd492",
  "name" : "/some-certificate-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xO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Aoh6ApavOocr9PFT2t9vdY\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" : "7796ebfd-79a6-4994-8d4b-cae3c0da7cdc",
  "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//FfCjAbgvPfV\n4Tdcmb5nWantzoaRDa/Dt3tuqe8cU8gsjrOZJNjMr+2Kljsq+N6GxSMxlHCyzI96\ndUg7pIM6cQhz5ome9szv4Wfh5Aet9fYmT7GYK0fL2qULCWOTH2CTvSj49ASpRXYv\ncue/FQo9acOjmM+37ka0n7v1tEtZfRSyOOdGhbDUo4uWV+3pSeQNKg0GhW5RAgLJ\nmzI0/TAg8iQ42X5rW/VGOI/8sBXmD9ukS6m3VjG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A+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+N6GxSMxlHCyzI96\ndUg7pIM6cQhz5ome9szv4Wfh5Aet9fYmT7GYK0fL2qULCWOTH2CTvSj49ASpRXYv\ncue/FQo9acOjmM+37ka0n7v1tEtZfRSyOOdGhbDUo4uWV+3pSeQNKg0GhW5RAgLJ\nmzI0/TAg8iQ42X5rW/VGOI/8sBXmD9ukS6m3VjGQWILpFYPorAssSXM3nGiSkVgZ\n1K8s+bEr27Dgt/K3buywJf78X/JtmWOnf02dkoEx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W1NH\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" : "b1db3aac-a4e4-47d6-b1c5-784d0d0bb9bd",
  "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+3pSeQNKg0GhW5RAgLJ\nmzI0/TAg8iQ42X5rW/VGOI/8sBXmD9ukS6m3VjGQWILpFYPorAssSXM3nGiSkVgZ\n1K8s+bEr27Dgt/K3buywJf78X/JtmWOnf02dkoExA4A+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H\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/8V8KMBuC899XhN1yZvmdZqe3OhpENr8O3e26p7xxTyCyOs5kk2Myv7YqWOyr43obFIzGUcLLMj3p1SDukgzpxCHPmiZ72zO/hZ+HkB6319iZPsZgrR8vapQsJY5MfYJO9KPj0BKlFdi9y578VCj1pw6OYz7fuRrSfu/W0S1l9FLI450aFsNSji5ZX7elJ5A0qDQaFblECAsmbMjT9MCDyJDjZfmtb9UY4j/ywFeYP26RLqbdWMZBYgukVg+isCyxJczecaJKRWBnUryz5sSvbsOC38rdu7LAl/vxf8m2ZY6d/TZ2SgTEDg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BNWa6I4yZ72s9p92Kcv5+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/W0S1l9FLI450aFsNSji5ZX7elJ5A0qDQaFblECAsmbMjT9MCDyJDjZfmtb9UY4j/ywFeYP26RLqbdWMZBYgukVg+isCyxJczecaJKRWBnUryz5sSvbsOC38rdu7LAl/vxf8m2ZY6d/TZ2SgTEDgD4YxOG6WZEm2z2JGpgGtQcVO4ulfSa/xqovvidLc/kTWR15dVts+r1Uv7Btaax7XqTKqBkrxjhbpXD2RVQAeZhBOQ80pPbFtvUPN1pAdgc14w==",
    "private_key": "-----BEGIN RSA PRIVATE KEY----- fake\nMIIJKAIBAAKCAgEA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=\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" : "758b9bf2-3096-4dc6-bce2-9c1a3dc929af",
  "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/TZ2SgTEDgD4YxOG6WZEm2z2JGpgGtQcVO4ulfSa/xqovvidLc/kTWR15dVts+r1Uv7Btaax7XqTKqBkrxjhbpXD2RVQAeZhBOQ80pPbFtvUPN1pAdgc14w==",
    "private_key" : "-----BEGIN RSA PRIVATE KEY----- fake\nMIIJKAIBAAKCAgEA7PJUCHSfrZ3PY7n1/cC8wj1UtbraEycM0DtjUuRdOzhFl50f\neF7WGNyrQS7tdCx42cx+ZmsXVmJMm+BoGEsFfupZ/k8Z+/S0E/IErW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LILlzoeXktWjY1DjVMPIxm+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
  }
}

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" : "fd525f38-6aa8-4cb4-8864-f948595ef397",
  "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" : "c20c7bec-2bd7-4138-920d-cf9c8d0802b5",
  "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. Get All Certificates

Curl request

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

HTTP request

GET /api/v1/certificates HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
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" : "31e397d7-d48e-450c-afe3-84f516f6a32e",
      "expiry_date" : "2020-02-01T20:37:52Z",
      "transitional" : true,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    }, {
      "id" : "e7239963-7621-4b53-8ab0-628c3ec0c67a",
      "expiry_date" : "2019-02-01T20:37:52Z",
      "transitional" : false,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    } ],
    "signed_by" : "/testCa",
    "signs" : [ "/cert1", "/cert2" ],
    "id" : "5ea1a9d6-b04d-41c8-8098-0712dbf41a8c"
  } ]
}

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


4.3. 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;charset=UTF-8'

HTTP request

GET /api/v1/certificates?name=%2Fsome-name HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
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" : "1697b3e3-5170-4c5c-9278-411ce2548e07",
      "expiry_date" : "2019-02-01T20:37:52Z",
      "transitional" : false,
      "certificate_authority" : false,
      "self_signed" : false,
      "generated" : false
    } ],
    "signed_by" : "/testCa",
    "signs" : [ "/cert1", "/cert2" ],
    "id" : "4469ef2d-a33e-47be-9a27-88afc157f29e"
  } ]
}

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.4. Regenerate a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/cbfd83c1-1b3f-445a-92e9-cefb0eb2376e/regenerate' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json;charset=UTF-8' \
    -d '{"set_as_transitional": true, "allow_transitional_parent_to_sign": true, "metadata": {"description": "example metadata"}}'

HTTP request

POST /api/v1/certificates/cbfd83c1-1b3f-445a-92e9-cefb0eb2376e/regenerate HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
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: 4396

{
  "type" : "certificate",
  "version_created_at" : "2019-02-01T20:37:52Z",
  "id" : "cbfd83c1-1b3f-445a-92e9-cefb0eb2376e",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQ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ep+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,
    "certificate_authority" : false,
    "self_signed" : false,
    "generated" : true,
    "expiry_date" : "2020-09-03T18:30:11Z"
  }
}

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.


4.5. Update Transitional Version

Curl request

$ curl 'https://example.com/api/v1/certificates/7744ae19-f8af-4421-bdbb-0a86286387b2/update_transitional_version' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json;charset=UTF-8' \
    -d '{"version": "976cbdcb-fce9-47f9-8fd9-419b5c434c2f"}'

HTTP request

PUT /api/v1/certificates/7744ae19-f8af-4421-bdbb-0a86286387b2/update_transitional_version HTTP/1.1
Content-Type: application/json
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
Content-Length: 51
Host: example.com

{"version": "976cbdcb-fce9-47f9-8fd9-419b5c434c2f"}

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" : "7744ae19-f8af-4421-bdbb-0a86286387b2",
  "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\nM5Bw98SgEqfAy4bt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uAlgv5XqwDBfi/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.6. Get All Versions of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/623d3b5d-5e9f-4a4d-b99a-33596f8b4628/versions?current=true' -i -X GET \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json;charset=UTF-8'

HTTP request

GET /api/v1/certificates/623d3b5d-5e9f-4a4d-b99a-33596f8b4628/versions?current=true HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
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" : "623d3b5d-5e9f-4a4d-b99a-33596f8b4628",
  "name" : "/some-name",
  "metadata" : {
    "description" : "example metadata"
  },
  "value" : {
    "ca" : "-----BEGIN CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCL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mNYeQd3UPpiooh4thUe\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.7. Create a Version of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/b1d9906d-80ea-4f91-b9df-4c9786bce575/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 CERTIFICATE-----\nMIIC/zCCAeegAwIBAgIUbW0U9/70rhPUj7qsG+kplvNKxfYwDQYJKoZIhvcNAQEL\nBQAwDzENMAsGA1UEAxMEdGVzdDAeFw0xOTA5MDQxODI5NTRaFw0yMDA5MDMxODI5\nNTRaMA8xDTALBgNVBAMTBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/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UDKJtGRwLL8gr4pFN7HX37vdnlbAkh317Y4l\nVxynZOICM9G6M1VyN9FjY7v4VyRv6kTnIhDHlVyCpQYnrccAtYkl3QoYbPPmVgZL\n0jFnIGaLpUtFZYFbHuAlgv5XqwDBfi/qOQwBD3MVdqn2z5v4guI=\n-----END RSA PRIVATE KEY-----"
  },
  "transitional": true
}'

HTTP request

POST /api/v1/certificates/b1d9906d-80ea-4f91-b9df-4c9786bce575/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\nAoIBAQC43kce29qg4h46x4b6K7WVxR4EQTKaa9JS+sj8NN8FJRQJljxNDiWH/0kM\nYwG2VYq/XGibDDaEiGqhJ4ozbWiZcwczddPLQlRuV7XIwsY0RW/iqt2CT5hf6QXC\njQX3XD3hcez0S1KpEcYMycLYkoNARGxcQz1mh7EuyzCLN+Uh47JK56eOlUN4iS2o\nxz9HfB5NNORBZi8QSPZdZ6VrKOzaeQw7bO4jptyHJSmFGU9FiOa2OTj/kYnWggJH\ngmSE4qh5e55Lgl4aCr/Cl31DIChxnIgMz0qiCyuV111sBnKq3kyFrEejMHshIYeU\nkk+iAGoOCaIsxkbTkL8id+8uszJxAgMBAAGjUzBRMB0GA1UdDgQWBBRio//8/deq\nM5Bw98SgEqfAy4btJjAfBgNVHSMEGDAWgBRio//8/deqM5Bw98SgEqfAy4btJjAP\nBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCEHLDlselE4BZ+angg\n00eHEJ2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OmaEsgVaEADAFWU6LeCC7pNKdUKT2F+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": 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" : "b1d9906d-80ea-4f91-b9df-4c9786bce575",
  "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\nowt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zPPj2tydCCb695Ozb2v5vWteiaUbIJEJuO4VU7paKPa\nHltRvnI8BAv/8wdIm0xnm6hl7Gs3lGQs6ei1AonFnjvGEhg+/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-----"
  }
}

Path parameters

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

certificateId

The certificate identifier.


4.8. Delete a Version of a Certificate

Curl request

$ curl 'https://example.com/api/v1/certificates/777ada98-7b28-4a5d-9fd5-636212e45ce9/versions/b3187163-d777-4daf-8e01-be1e65faca13' -i -X DELETE \
    -H 'Authorization: Bearer [some-token]' \
    -H 'Accept: application/json;charset=UTF-8'

HTTP request

DELETE /api/v1/certificates/777ada98-7b28-4a5d-9fd5-636212e45ce9/versions/b3187163-d777-4daf-8e01-be1e65faca13 HTTP/1.1
Authorization: Bearer [some-token]
Accept: application/json;charset=UTF-8
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" : "777ada98-7b28-4a5d-9fd5-636212e45ce9",
  "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/deqM5Bw98SgEqfAy4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21t5ktgBaHKCXUokgFN5iDAfBgNVHSMEGDAWgBRio//8/deqM5Bw\n98SgEqfAy4btJjAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCROXru\nJ3h8hKRsS4EvLpwyfEPp5A4sdY8mPzX0XGNTfnXnsNPvprDmwDdlTaejyMbK7vD+\nV6R2XFr+D5XwkMqa4sWRJzPPj2tydCCb695Ozb2v5vWteiaUbIJEJuO4VU7paKPa\nHltRvnI8BAv/8wdIm0xnm6hl7Gs3lGQs6ei1AonFnjvGEhg+/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/qVRYjVIH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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" : "ac99c14b-977a-468d-a606-9e1c2d28fb4d"
}

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/1ac0b12f-3000-48b0-ae33-91ea3cd40c34' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

GET /api/v2/permissions/1ac0b12f-3000-48b0-ae33-91ea3cd40c34 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" : "1ac0b12f-3000-48b0-ae33-91ea3cd40c34"
}

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" : "8500bacd-21af-40e8-ad14-8ab9853d4a7e"
}

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/96e70d6e-6e77-4d44-a6e2-fda601056282' -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/96e70d6e-6e77-4d44-a6e2-fda601056282 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" : "96e70d6e-6e77-4d44-a6e2-fda601056282"
}

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/b7e9c17b-2ff0-4c9b-b4d1-6c33a7d53ff8' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]' \
    -d '{
  "operations": [
    "read",
    "write"
  ]
}'

HTTP request

PATCH /api/v2/permissions/b7e9c17b-2ff0-4c9b-b4d1-6c33a7d53ff8 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" : "b7e9c17b-2ff0-4c9b-b4d1-6c33a7d53ff8"
}

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/4f8c3654-caf3-473f-80d2-443a1165cce2' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer [some-token]'

HTTP request

DELETE /api/v2/permissions/4f8c3654-caf3-473f-80d2-443a1165cce2 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" : "4f8c3654-caf3-473f-80d2-443a1165cce2"
}

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' -i -X DELETE \
    -H 'Authorization: Bearer [some-token]'

HTTP request

DELETE /api/v1/permissions 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" : "a5765ed4-f35d-4b63-ac3b-fe0587dd3a4e",
  "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"
}