Certificate resources are used to provide a ssl secured connection to your containers.
Returns a list of all certificate resources associated with the private key.
GET /rest/privatekeys/<ID>/certificates
[
{
"id": "1",
"name": "MyCertificate",
"common_name": "demo.d9tready.com",
"valid_from": "2014-09-02T12:17:55Z",
"valid_thru": "2024-08-30T12:17:55Z",
"_links":
[
{
"href": "https://d9tready.com/rest/privatekeys/1/certificates/1",
"rel": "self"
}
]
},
...
]
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
| 404 NOT FOUND | Resource not found |
Retrieve a single certificate resource.
GET /rest/privatekeys/<PRIVATEKEY_ID>/certificates/<CERTIFICATE_ID>
{
"name": "MyCert",
"common_name": "demo.d9tready.com",
"organization_name": "D9T GmbH",
"organization_unit": "IT",
"locality": "Ulm",
"state_province": "BW",
"country_code": "DE",
"email": "oliver.roch@d9t.de",
"ssl_certificate": "-----BEGIN CERTIFICATE-----...",
"valid_from": "2014-09-02T12:17:55Z",
"valid_thru": "2024-08-30T12:17:55Z",
"_links":
[
{
"href": "https://d9tready.com/rest/privatekeys/1/certificates/1",
"rel": "self"
},
{
"href": "https://d9tready.com/rest/privatekeys/1/certificates/1/csr",
"rel": "certificate-signing-request"
}
]
}
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
| 404 NOT FOUND | Resource not found |
Creat a new certificate resource. For convenience a self signed certificate is generated automatically if no ssl_certificate is provided.
POST /rest/privatekeys/<ID>/certificates
{
"name": "<NAME>",
"common_name": "<COMMON_NAME>",
"organization_name": "<ORGANIZATION_NAME>",
"organization_unit": "<ORGANIZATION_UNIT>",
"locality": "<LOCALITY>",
"state_province": "<STATE_PROVINCE>",
"country_code": "<COUNTRY_CODE>",
"email": "<EMAIL>",
"ssl_certificate": "<SSL_CERTIFICATE>",
}
On successful creation the URL to the new certificate resource is set in the Location-Header.
HTTP/1.0 201 CREATED
Location: https://d9tready.com/rest/privatekeys/<PRIVATEKEY_ID>/certificates/<CERTIFICATE_ID>
| Status Code | Description |
|---|---|
| 201 CREATED | Successful creation of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 403 FORBIDDEN | Authentication failure |
Update the ssl_certificate of an existing certificate resource.
PUT /rest/privatekeys/<PRIVATEKEY_ID>/certificates/<CERTIFICATE_ID>
{
"ssl_certificate": "<SSL_CERTIFICATE>",
}
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 403 FORBIDDEN | Authentication failure |
Permanently delete a certificate resource.
DELETE /rest/privatekeys/<PRIVATEKEY_ID>/certificates/<CERTIFICATE_ID>
| Status Code | Description |
|---|---|
| 204 NO CONTENT | Successful deletion of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 404 NOT FOUND | Resource not found |