List all certificates
const url = 'http://localhost:3000/api/v1/certificates?status=all&type=all&deviceId=550e8400-e29b-41d4-a716-446655440000&search=CN%3Ddevice-001&page=1&limit=20';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/certificates?status=all&type=all&deviceId=550e8400-e29b-41d4-a716-446655440000&search=CN%3Ddevice-001&page=1&limit=20' \ --header 'X-API-Key: <X-API-Key>'Retrieves all certificates (device and CA) for the organization with filtering and pagination support.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Filter by certificate status
Filter by certificate type
Example
550e8400-e29b-41d4-a716-446655440000Filter by device ID (only for device certificates)
Example
CN=device-001Search by subject or fingerprint
Page number (1-based)
Number of items per page
Responses
Section titled “ Responses ”List of certificates retrieved successfully
object
List of certificates
object
Certificate UUID
Certificate type
Certificate subject (Common Name)
Certificate issuer
Certificate SHA-256 fingerprint
Certificate validity start date
Certificate expiration date
Certificate status
Device ID (only for device certificates)
Device name (only for device certificates)
Certificate creation date
Certificate serial number (hex)
Public key algorithm and size
Signature algorithm
Subject Alternative Names
PEM-encoded public certificate (CA certs only)
Total number of certificates matching the filter
Current page number
Number of items per page
Total number of pages
Example
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "type": "device", "subject": "CN=device-001.example.com", "issuer": "CN=Margo Root CA", "fingerprint": "A1:B2:C3:D4:E5:F6...", "notBefore": "2024-01-01T00:00:00.000Z", "notAfter": "2025-01-01T00:00:00.000Z", "status": "valid", "deviceId": "550e8400-e29b-41d4-a716-446655440001", "deviceName": "Production Gateway 1", "createdAt": "2024-01-01T00:00:00.000Z" } ], "total": 150, "page": 1, "limit": 20, "totalPages": 8}Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions