I was looking at the API reference for Certificates Management, and I couldn’t see a bulk export of certificates endpoint. Our use case is that we want to perform automated exports of all the certificates within an application, but currently it looks like you can only do it one by one. Can we export all the certificates at once using the application’s ID?
You’re right that there’s no single bulk export endpoint today. Certificate bodies are only returned per certificate.
The closest pattern right now is a two step one. POST /api/v1/projects/{projectId}/certificates/search gives you the full certificate list for a project with filtering and pagination, but it returns metadata only (common name, serial number, issue/expiry, plus a hasPrivateKey flag). This is the same endpoint the certificates page in the UI uses. From there you’d pull each body with GET /api/v1/pki/certificates/{id}/certificate for the cert and chain, or /bundle if you also need the private key. If your certs are issued through subscribers, GET /api/v1/pki-subscribers/{subscriberName}/certificates is another paginated list to iterate over.
Not elegant for a large inventory, but it does script cleanly, and the search endpoint means you’re only fanning out on the certs you actually care about. There’s no CLI command for this yet.
Question for you here: what’s the export feeding into? If the goal is getting certs onto infrastructure rather than producing a file dump, PKI Syncs may be a better fit. They push the certificate, chain, and private key to a destination automatically on issuance and renewal, with support for AWS Certificate Manager, AWS Secrets Manager, Azure Key Vault, GCP Certificate Manager, Cloudflare, F5 BIG-IP, NetScaler, and Linux/Windows servers over SSH/WinRM, among others. If it really is an archive or an offline audit trail you need, that’s a fair gap and I’m happy to pass it along as a feature request with your use case attached.