Certificates can be accessed either:
Certificates are immutable and not versioned.
Authorization: Bearer VAULT_ACCESS_KEY
Accept: application/json
Authorization: Bearer RESOURCE_PUBLIC_TOKEN
Public tokens only apply to certificates marked Public during creation or upload.
Use include=certificates:
GET /api/v1/vaults/{vault_id}?include=certificates
Example:
curl --request GET \
--url "https://secryn.example.com/api/v1/vaults/{vault_id}?include=certificates" \
--header "Accept: application/json" \
--header "Authorization: Bearer VAULT_ACCESS_KEY"
id, name, type, expires_at, tags
If a certificate is expired, it may be returned as:
{ "id": "<cert-id>", "message": "Resource expired" }
Use the vault endpoint with resource=:
GET /api/v1/vaults/{vault_id}?resource={certificate_id}
Example:
curl --request GET \
--url "https://secryn.example.com/api/v1/vaults/{vault_id}?resource={certificate_id}" \
--header "Authorization: Bearer VAULT_ACCESS_KEY"
When fetching a certificate by resource ID, Secryn returns the certificate file contents (PEM) with:
Content-Type: application/x-pem-fileno-store, no-cache)410 Gone -> certificate expired404 Not Found -> certificate not found in that vaultIf a certificate was created/uploaded with Public visibility, it can be accessed directly using the public token:
GET /api/v1/certificates/{certificate_id}
Authorization: Bearer RESOURCE_PUBLIC_TOKEN
Example:
curl --request GET \
--url "https://secryn.example.com/api/v1/certificates/{certificate_id}" \
--header "Authorization: Bearer RESOURCE_PUBLIC_TOKEN"
Public access behavior:
application/x-pem-file)410 when fetched directly