Preview — pending review
This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.
Export key pair material as a downloadable PEM artifact
Produces a downloadable PEM artifact for the selected key pair, backing the "Download .pem"
button shown in the key pair creation form. The exportable artifact is the public key material
(artifact: public-key-pem), returned inline as a KeyPairExport with the suggested
fileName, contentType and PEM content. Private key material is NOT exportable through this
endpoint: the private key is revealed exactly once in the create response (the UI downloads it
client-side at generation time) and is never persisted by the platform, so artifact: private-key-pem is always rejected.
Validation: scopeId must be accessible to the caller (404 when unknown); keyPairId must
identify a key pair within that scope (404 NOT_FOUND); artifact must be one of
public-key-pem | private-key-pem (422 VALIDATION_FAILED on unknown values); requests for
private-key-pem map to 409 CONFLICT because the material is not retained server-side.
Async & state: Synchronous command returning 200 with the export payload; requested data is
returned without mutating the resource and no SSE frames are emitted.
Errors: 401 unauthenticated; 403 caller lacks a read-capable role
(owner|admin|contributor|reader) on the scope; 404 unknown scopeId/keyPairId; 409 private
key material requested but not retained; 422 unknown artifact; 500 export rendering failure.
Idempotency/Concurrency: This operation does not use Idempotency-Key; it may be omitted
and a sent one is ignored. The export is derived purely from stored public material, so repeated
calls return the identical payload and are inherently safe.
bearerTokenAuthorizationBearer <token>An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
keyPairId*stringIdentifier of the key pair within the active scope.
application/json- body
Selector for the key pair export artifact.
artifact*stringpublic-key-pem exports the stored public material; private-key-pem is always rejected with 409 because private keys are revealed once at creation and never retained.
"public-key-pem""private-key-pem"PEM export of the key pair's public material (private keys are never exportable).
application/json- response
Inline PEM export of key pair public material.
fileName*stringSuggested file name (e.g. "prod-key.pem").
contentType*stringMIME type of the exported artifact (application/x-pem-file).
content*stringPEM-encoded public key material.
curl -X POST "https://example.com/scopes/string/compute/key-pairs/string/exports" \ -H "Content-Type: application/json" \ -d '{ "artifact": "public-key-pem" }'{ "fileName": "string", "contentType": "string", "content": "string"}