Information
- License: MIT
- OpenAPI version:
3.1.0
Public Key Infrastructure (PKI) Management System REST API.
This API provides RESTful endpoints for managing Certificate Authorities (CAs), certificates, Certificate Revocation Lists (CRLs), and related operations.
The OpenAPI 3.1 specification is available at:
/api/v1/openapi.json/api/v1/openapi.yamlUse these URLs to integrate with third-party tools, code generators, or API clients.
Most API endpoints require authentication via OAuth2/OIDC Bearer tokens.
For users (web application): Authentication is handled automatically via the web UI using Authorization Code flow with PKCE.
For machine-to-machine (M2M) access: Use the Client Credentials flow:
curl -X POST "http://keycloak:8080/realms/pki-dev/protocol/openid-connect/token" \
-d "grant_type=client_credentials" \
-d "client_id=pki-service" \
-d "client_secret=YOUR_SECRET"
Include the token in the Authorization header:
Authorization: Bearer <access_token>
The X.509 endpoints under /api/v1/external always require a CA-bound
pkimg_... service token, including when OIDC is disabled. Use the separate
integrationToken authorization scheme in Swagger. OIDC JWTs do not replace
service tokens on these endpoints.
Create an integration in Operations → Integrations, choose its type
(kubernetes, scep, or generic) and issuing CA, and copy the token
shown once at creation. Never distribute this backend token to SCEP devices.
Integration management uses the separate tRPC API at /trpc/integration.*
(list, getById, register, revoke), outside this REST specification. Register and
revoke require an admin role when OIDC is enabled. The legacy cluster.*
API remains compatible; new clients should use integration.*.
GET /health - Health checkGET /api/docs - This documentationGET /api/v1/openapi.json - OpenAPI specificationGET /cas/:caId.pem - CA certificate downloadGET /crl/:caId.crl - CRL downloadNo rate limiting is currently enforced. This may change in future versions.
CA-bound service token created under Operations → Integrations. Required for /external endpoints even when OIDC is disabled; independent of the OIDC JWT used for management.
Security scheme type: http
Bearer format: pkimg_ service token
JWT token obtained from OIDC provider (Keycloak, Auth0, Okta, etc.)
Security scheme type: http
Bearer format: JWT