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.
Download the OpenSSH public key file of a key pair
Streams the OpenSSH public key blob of the selected key pair as a plain-text file, backing the
primary "Download public key" action on the key pair detail page (the UI saves it as
<key-pair-name>.pub, terminated with a trailing newline). The content is the exact
usedBy-independent public key line — algorithm prefix, base64 key material and comment — ready
to append to ~/.ssh/authorized_keys on any host or to attach when launching an instance. Only
public material is ever served here; the private key is not stored by the platform and is never
available from any read endpoint.
Validation: scopeId must be accessible to the caller (404 via ErrNotFound when unknown);
keyPairId must identify a key pair within that scope (404 NOT_FOUND). No body or query inputs
beyond the path.
Async & state: Synchronous read; no state change. The file is served with
Content-Disposition: attachment; filename="<name>.pub".
Errors: 401 unauthenticated; 403 caller lacks a read-capable role
(owner|admin|contributor|reader) on the scope; 404 unknown scopeId or keyPairId; 500 on
retrieval failure.
Idempotency/Concurrency: Safe, cacheable; no idempotency key required. The public key is
immutable for the life of the key pair, so responses are strongly cacheable by ETag.
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.
OpenSSH public key file (Content-Disposition attachment, <name>.pub).
response?stringtext/plainSingle-line OpenSSH public key (algorithm, base64 material, comment) with trailing newline.
curl -X GET "https://example.com/scopes/string/compute/key-pairs/string/public-key""string"