Skip to main content

Listing SSH Key Pairs

GET/v2.1/{project_id}/os-keypairs

Retrieve all SSH (or X.509) key pairs that belong to the authenticated project. Each item in the result is wrapped in a keypair object.

info

Request​

Parameters​

project_idstringrequiredpath

The UUID of the project (tenant).

user_idstringquery

For administrators: list key pairs that belong to the specified user ID. New in version 2.10

limitintegerquery

Maximum number of items to return. Use with marker for pagination. New in version 2.35

markerstringquery

ID (name) of the last-seen item for pagination. New in version 2.35

Sample Request​

Using curl​

curl -ks \
-H 'Content-Type: application/json' \
-H 'X-Auth-Token: gAAAAA<...>' \
-H 'X-OpenStack-Nova-API-Version: 2.72' \
https://api.vietnix.cloud:8774/v2.1/os-keypairs

http request​

GET https://api.vietnix.cloud:8774/v2.1/f5d834d636c642c7bfe8af86139c6f26/os-keypairs

Response​

Response Body Fields​

keypairsarrayrequired

Array of key pair wrapper objects. Each element contains a keypair object.

keypairobjectrequired

The key pair wrapper object.

5 fields
namestringrequired

Human-readable name of the key pair (unique per user).

public_keystringrequired

The public key material.

fingerprintstringrequired

MD5 fingerprint of the public key (colon-delimited hex).

typestringrequired

The key type. Allowed: ssh or x509. New in version 2.2

created_atstringrequired

Timestamp when the key pair was created (ISO 8601).

keypairs_linksarray

Pagination or related links (present when pagination is used). New in version 2.35

Status Codes​

Success​

CodeReason
200 - OKRequest succeeded.

Error​

CodeReason
401 - UnauthorizedAuthentication is required or failed.
403 - ForbiddenPolicy does not allow the current user to perform this action.

Sample Response​

Response body
{
"keypairs": [
{
"keypair": {
"name": "Docs Writter",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDAbqUDd3jvW3fA49sJWv5+iTQR8uPDCx3lt7Y6qcFT9 rumiaxolotl@gmail.com",
"fingerprint": "07:8a:eb:63:6a:4b:b4:fd:be:c9:77:c2:58:da:84:fb",
"created_at": "2025-09-03T09:50:28.194592"
}
}
]
}