Privatekeys are used for creation of certificates which could be assigned to domains in order to secure its traffic via ssl.
Returns a list of all private key resources associated with the currently logged in user.
GET /rest/privatekeys
[
{
"id": 1,
"name": "MyPrivateKey",
"_links":
[
{
"href": "https://d9tready.com/rest/privatekeys/1",
"rel": "self"
}
]
},
...
]
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
Retrieve a single privatekey resource.
GET /rest/privatekeys/<PRIVATEKEY_ID>
{
"id": 1,
"name": "MyPrivateKey",
"key": "-----BEGIN PRIVATE KEY-----....",
"_links":
[
{
"href": "https://d9tready.com/rest/privatekeys/1",
"rel": "self"
},
{
"href": "https://d9tready.com/rest/privatekeys/1/certificates",
"rel": "self"
}
]
}
| Status Code | Description |
|---|---|
| 200 OK | No error, operation successful |
| 403 FORBIDDEN | Authentication failure |
| 404 NOT FOUND | Resource not found |
Create a new privatekey resource.
POST /rest/privatekeys
{
"name": "<NAME>",
"key": "<KEY>"
}
On successful creation the URL to the new resource is set in the Location-Header.
| Status Code | Description |
|---|---|
| 201 CREATED | Successful creation of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
Permanently delete a private key resource with all its associated certificates.
DELETE /rest/privatekeys/<PRIVATEKEY_ID>
| Status Code | Description |
|---|---|
| 204 NO CONTENT | Successful deletion of resource |
| 400 BAD REQUEST | Malformed syntax or bad query |
| 403 FORBIDDEN | Authentication failure |