API Reference (Certificates)
This API documentation is intentionally scoped for end users who manage certificate issuance and distribution. It focuses on:
- Creating and renewing certificates
- Viewing issuance status/history
- Downloading/exporting certificate material
- Distributing certs to devices (automation)
For the certificate-focused endpoint list, see:
Base URL
Examples use https://cjj365.cc. For local development:
http://localhost:8080https://localhost:10000(TLS proxy)
Authentication
This public reference is API-key-first:
- API key (
Authorization: Bearer ak_...): automation that acts on/apiv1/me/*endpoints.
Session-cookie flows are intentionally omitted here.
Response format
- Success:
200/201with{ "data": ... }or204 No Content(no body) - Error: HTTP status >=
400with{ "error": { "code": int, "what": string } }
Common workflow
1) Create a certificate (API key)
curl -X POST https://cjj365.cc/apiv1/me/certificates \
-H "Authorization: Bearer ak_yourtoken" \
-H "Content-Type: application/json" \
-d '{
"domain_name": "example.com",
"sans": ["example.com", "www.example.com"],
"acct_id": 7,
"action": "create",
"key_algorithm": "ECDSA",
"policy": "HYBRID"
}'
2) Issue / renew the certificate (API key)
curl -X POST https://cjj365.cc/apiv1/me/certificates/123/issues \
-H "Authorization: Bearer ak_yourtoken" \
-H "Content-Type: application/json" \
-d '{"action":"issue"}'
Then poll issuance history:
curl -s https://cjj365.cc/apiv1/me/certificates/123/issues/history \
-H "Authorization: Bearer ak_yourtoken"
3) Download / export certificate material (API key)
Export as a ZIP bundle (for manual deployment or backup):
curl -L -o cert_123.zip \
"https://cjj365.cc/apiv1/me/certificates/123/export?format=zip" \
-H "Authorization: Bearer ak_yourtoken"
4) Distribute to devices
Typical patterns:
- Automation: use an API key to assign a certificate to a device.
Assign a certificate to a device (API key):
curl -X POST https://cjj365.cc/apiv1/me/certificate-assign \
-H "Authorization: Bearer ak_yourtoken" \
-H "Content-Type: application/json" \
-d '{"device_public_id":"dev_abc123"}'
Notes
- Many other endpoints exist (billing, notifications, admin tooling). They’re intentionally omitted here to keep this guide user-focused on certificate issuance and distribution.