12.3. Showing SSH key details

GET /os-keypairs/{keypair_name}

Shows the details of a keypair with the specified name that is associated with the account.

Source: https://docs.openstack.org/api-ref/compute/#show-keypair-details

12.3.1. Request

Name In Type Description
keypair_name path string The keypair name.
user_id (Optional) query string

This allows administrative users to operate key-pairs of specified user ID.

New in version 2.10 Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \

12.3.2. Response

Name In Type Description
keypair body object Keypair object
created_at body string

The date and time when the resource was created. The date and time stamp format is ISO 8601


For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.

deleted body boolean A boolean indicates whether this keypair is deleted or not. The value is always false (not deleted).
deleted_at body none It is always null.
fingerprint body string The fingerprint for the keypair.
id body integer The keypair ID.
name body string A name for the keypair which will be used to reference it later.
public_key body string The keypair public key.
updated_at body none It is always null.
user_id body string The user_id for a keypair.
type body string

The type of the keypair. Allowed values are ssh or x509.

New in version 2.2 Status codes Success

Code Reason
200 - OK Request was successful. Error

Code Reason
401 - Unauthorized User must authenticate before making a request.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found. Example

  "keypair": {
    "public_key": "ssh-rsa AAAA<...> VSTOR-KEY-DESC:Key description",
    "user_id": "eb481bff7b7c4ec6a686646957d8064b",
    "name": "key1",
    "deleted": false,
    "created_at": "2020-01-31T12:56:51.515306",
    "updated_at": null,
    "fingerprint": "36:2e:c4:95:95:1a:4d:9d:81:82:3a:da:46:93:e1:1d",
    "deleted_at": null,
    "id": 1