Skip to content

List key pairs in a project.

GET
/v1/projects/{projectId}/compute/key-pairs
Code sample: Shell / cURL
curl --request GET \
--url 'https://stratum.example.com/v1/projects/example/compute/key-pairs?limit=100' \
--header 'Authorization: Bearer <token>'
projectId
required
string
/^p-[a-z0-9-]+$/
limit
integer
default: 100 >= 1 <= 500
page_token
string

Opaque cursor from a previous response’s nextPageToken; omit for the first page. A token that cannot be parsed is treated as no token, so a client gets the first page rather than a 400.

Cursor-paginated, ordered name, id. Ordering on name alone is not a total order, so id is the tiebreaker: without it a cursor sitting on two same-named rows repeats or skips one.

This endpoint returned every matching row with no limit of any kind until.

Key pairs.

Media typeapplication/json
object
items
required
Array<object>
object
id
required
string
/^key-[a-z0-9-]+$/
projectId
required
string
/^p-[a-z0-9-]+$/
name
required

Customer-chosen name, unique within the project.

string
displayName
string
keyType
required

Parsed from the OpenSSH-format public key.

string
Allowed values: ssh-rsa ssh-ed25519 ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521
fingerprint
required

SHA-256 fingerprint in OpenSSH format (SHA256:<base64>).

string
publicKey
required

OpenSSH-format public key (ssh-ed25519 AAAA... user@host).

string
tags

AWS-shape resource tags. Freeform UTF-8 keys (1-128 bytes, no leading/trailing whitespace) mapped to freeform UTF-8 values (0-256 bytes). Max 50 tags per resource. Reserved prefixes (stratum.dev/, stratum.platform_health., stratum:, aws:) return 400 RESERVED_NAMESPACE on customer input. PATCH replaces the whole map..

object
<= 50 properties
key
additional properties
string
<= 256 characters
createdAt
required
string format: date-time
nextPageToken
string

Example

{
"items": [
{
"keyType": "ssh-rsa"
}
]
}