List device certificates
const url = 'http://localhost:3000/api/v1/devices/550e8400-e29b-41d4-a716-446655440000/certificates';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/devices/550e8400-e29b-41d4-a716-446655440000/certificates \ --header 'X-API-Key: <X-API-Key>'Retrieves all certificates for a specific device.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
550e8400-e29b-41d4-a716-446655440000Device UUID
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.
Responses
Section titled “Responses”List of device certificates retrieved successfully
object
List of device certificates
object
Unique certificate identifier (UUID)
Device ID this certificate belongs to
SHA-256 fingerprint of the certificate
Certificate subject (Distinguished Name)
Certificate issuer (Distinguished Name)
Certificate validity start date
Certificate validity end date (expiration)
False for a legacy certificate record whose notBefore, notAfter and issuer were not read from a certificate (stored before the presented certificate was kept). Its dates are placeholders. The record refreshes when the device re-onboards.
Whether the certificate has been revoked
Date when the certificate was revoked
Reason for certificate revocation
Timestamp when the certificate was issued
Total number of certificates for this device
Example
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "deviceId": "550e8400-e29b-41d4-a716-446655440001", "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", "subject": "CN=edge-device-001,O=Margo WFM,OU=Devices", "issuer": "CN=Margo Root CA,O=Margo WFM,OU=Certificate Authority", "notBefore": "2024-01-01T00:00:00Z", "notAfter": "2025-01-01T00:00:00Z", "validityKnown": true, "revoked": false, "revokedAt": "2024-06-01T00:00:00Z", "revokeReason": "Key compromise", "createdAt": "2024-01-01T00:00:00Z" } ], "total": 3}Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Device not found