Skip to main content
GET
/
cloud
/
v1
/
keypairs
/
{project_id}
/
{region_id}
/
{keypair_id}
Get keypair
curl --request GET \
  --url https://api.gcore.com/cloud/v1/keypairs/{project_id}/{region_id}/{keypair_id} \
  --header 'Authorization: <api-key>'
{
  "id": "<string>",
  "name": "<string>",
  "public_key": "<string>",
  "shared_in_project": true,
  "state": "ACTIVE",
  "created_at": "2023-11-07T05:31:56Z",
  "fingerprint": "86:75:ce:e7:e9:1e:f0:79:ec:6f:d8:92:9b:43:fc:4d",
  "private_key": "<private_key>",
  "project_id": 1
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

keypair_id
string
required

Keypair ID

Response

200 - application/json

OK

id
string
required

Key ID, equal to sshkey_name

name
string
required

Keypair name

Required string length: 1 - 255
public_key
string
required

Public part of the key. To generate public and private keys in the platform, do not specify the parameter in the request body.

shared_in_project
boolean
required

Keypair is shared for all users in the project

state
enum<string>
required

Keypair state

Available options:
ACTIVE,
DELETING
created_at
string<date-time> | null

Keypair creation datetime

fingerprint
string | null

Key fingerprint

Example:

"86:75:ce:e7:e9:1e:f0:79:ec:6f:d8:92:9b:43:fc:4d"

private_key
string | null

Private part of the key

Example:

"<private_key>"

project_id
integer | null

Project ID

Example:

1