ACME credentials
Generated from core/api/router.go. Edit the router, not this file.
| Method | Path | Who can call it |
|---|---|---|
GET | /api/v1/acme/credentials | Admin |
POST | /api/v1/acme/credentials | Admin |
DELETE | /api/v1/acme/credentials/:id | Admin |
GET /api/v1/acme/credentials
| Who can call it | Admin |
| Handler | acmeHandler.List |
| Display token | Refused — not a viewer-safe GET |
Responses
| Status | Body |
|---|---|
200 | An object with data, enabled |
404 | { "error": … } |
500 | { "error": … } · could not read the ACME credentials · could not read the templates |
Example request
bash
curl -X GET 'https://certpilot.example.com/api/v1/acme/credentials' \
-H 'Authorization: Bearer <token>'POST /api/v1/acme/credentials
| Who can call it | Admin |
| Handler | acmeHandler.Create |
| Display token | Refused — not a viewer-safe GET |
Request body
| Field | Type | Description |
|---|---|---|
name | string | |
template | string | Template is a slug or an id. |
require_challenge | boolean | RequireChallenge makes the client prove each name by HTTP-01 or DNS-01. |
Responses
| Status | Body |
|---|---|
201 | An object with data, directory_url, hmac_key, message (string) |
400 | { "error": … } · a name and a template are required — the name is what identifies which client to revoke |
404 | { "error": … } |
500 | { "error": … } · could not read the template · could not generate a key · could not generate a key id · could not seal the key · could not store the credential |
Example request
bash
curl -X POST 'https://certpilot.example.com/api/v1/acme/credentials' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "<name>",
"template": "<template>",
"require_challenge": false
}'DELETE /api/v1/acme/credentials/:id
| Who can call it | Admin |
| Handler | acmeHandler.Revoke |
| Display token | Refused — not a viewer-safe GET |
Parameters
| Name | In | Default | |
|---|---|---|---|
id | path | required |
Responses
| Status | Body |
|---|---|
200 | An object with message (string) |
404 | { "error": … } |
500 | { "error": … } · could not read the ACME credential |
Example request
bash
curl -X DELETE 'https://certpilot.example.com/api/v1/acme/credentials/<id>' \
-H 'Authorization: Bearer <token>'