Generate self-signed CA certificate
const url = 'http://localhost:3000/api/v1/ca-certificates/generate';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"Development Root CA","commonName":"logiccloud orchestrate Dev CA","organization":"logiccloud","country":"DE","validityYears":10,"isDefault":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/ca-certificates/generate \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "Development Root CA", "commonName": "logiccloud orchestrate Dev CA", "organization": "logiccloud", "country": "DE", "validityYears": 10, "isDefault": false }'Generate a new self-signed CA certificate with RSA 4096 key pair. For development and testing only. In production, use a proper PKI.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Human-readable name for the CA certificate
Example
Development Root CACommon Name (CN) for the certificate subject
Example
logiccloud orchestrate Dev CAOrganization (O) for the certificate subject
Example
logiccloudCountry code (C) for the certificate subject (2-letter ISO 3166-1 alpha-2)
Example
DEValidity period in years (1-30)
Example
10Set as the default signing CA for new device certificates
Example
falseResponses
Section titled “Responses”CA certificate generated successfully
object
Unique CA certificate identifier (UUID)
Human-readable name for the CA certificate
SHA-256 fingerprint of the certificate
Whether this is a root CA certificate
Whether this is the default signing CA
Certificate validity start date
Certificate validity end date (expiration)
Date when the CA certificate was retired
Timestamp when the CA certificate was created
Full subject distinguished name
Full issuer distinguished name
Certificate serial number (hex)
Public key algorithm and size
Signature algorithm
Subject Alternative Names
PEM-encoded public certificate (safe to share)
Example
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production Root CA", "fingerprint": "A1:B2:C3:D4:E5:F6:A1:B2:C3:D4:E5:F6:A1:B2:C3:D4:E5:F6:A1:B2:C3:D4:E5:F6:A1:B2:C3:D4:E5:F6:A1:B2", "isRoot": true, "isDefault": true, "notBefore": "2024-01-01T00:00:00Z", "notAfter": "2034-01-01T00:00:00Z", "retiredAt": "2024-06-01T00:00:00Z", "createdAt": "2024-01-01T00:00:00Z", "subject": "CN=Root CA, O=logiccloud, C=US", "issuer": "CN=Root CA, O=logiccloud, C=US", "serialNumber": "01:AB:CD:EF", "keyAlgorithm": "RSA-4096", "signatureAlgorithm": "SHA256withRSA", "subjectAltNames": [ "DNS:example.com", "IP:192.168.1.1" ], "certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}Bad Request - Invalid parameters
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions (admin only)
Conflict - CA certificate with same fingerprint already exists