Compute

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.

List and query SSH key pairs in the active scope

GET
/scopes/{scopeId}/compute/key-pairs

Returns the SSH key pairs registered in the active tenant/subscription/project scope, as rendered by the Key pairs page on route load. This single operation also serves the view's search/filter/sort/pagination controls (collapsed compute.key_pair.search_filter_sort): free-text q matches against the key pair name and fingerprint, the type filter narrows to one algorithm (the UI exposes All / Ed25519 / RSA counter chips), and sort (name | created) with order/page/pageSize control ordering and paging. Each row carries the name, algorithm/bits, SHA256 fingerprint, creation time, the full OpenSSH public key blob, the key comment, and the instances currently configured with the key (usedBy) so the list and detail pages can warn before deletion. Public keys are not sensitive; private keys are never present in list payloads. Validation: scopeId must reference a scope the caller can access (404 via ErrNotFound when unknown); type, when given, must be one of ssh-ed25519 | ssh-rsa | ecdsa-sha2-nistp256; sort must be name or created; page >= 1 and pageSize within bounds — violations map to 422 VALIDATION_FAILED. Async & state: Synchronous read; no state change. Key pairs created, imported or deleted elsewhere arrive at open consoles as resource.updated SSE frames of kind compute.keyPair. Errors: 401 unauthenticated; 403 caller lacks a read-capable role (owner|admin|contributor|reader) on the scope; 404 unknown scopeId; 422 malformed query parameters; 500 read-model failure. Idempotency/Concurrency: Safe, cacheable; no idempotency key required.

Authorization

bearerToken
headerAuthorizationBearer <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.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

Query Parameters

region?string

Restrict the result set to a single region.

Match^[a-z][a-z0-9-]{1,39}$
q?string

Free-text search.

sort?string

Field to sort by (entity-specific; defaults to the entity's natural order).

order?string

Sort direction.

Default"asc"
Value in"asc""desc"
page?integer

1-based page number.

Range1 <= value
Default1
pageSize?integer

Items per page (max 200).

Range1 <= value <= 200
Default50
type?string

Filter key pairs by key algorithm (UI counter chips expose Ed25519 and RSA).

Value in"ssh-ed25519""ssh-rsa""ecdsa-sha2-nistp256"

Response Body

Paginated collection of key pairs visible in the active scope.

application/json
  1. response
data*array<>
meta*

Pagination envelope metadata. List responses are always { data, meta } — never a naked array.

curl -X GET "https://example.com/scopes/string/compute/key-pairs"
{  "data": [    {      "id": "string",      "name": "string",      "fingerprint": "string",      "type": "ssh-ed25519",      "bits": 0,      "createdAt": "string",      "publicKey": "string",      "comment": "string",      "usedBy": [        {          "id": "string",          "name": "string",          "status": "ACTIVE"        }      ]    }  ],  "meta": {    "page": 1,    "pageSize": 1,    "total": 0,    "hasNext": true  }}