Skip to main content
PATCH
/
cloud
/
v1
/
keypairs
/
{project_id}
/
{region_id}
/
{keypair_id}
/
share
Share keypair to view for all users in project
curl --request PATCH \
  --url https://api.gcore.com/cloud/v1/keypairs/{project_id}/{region_id}/{keypair_id}/share \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "shared_in_project": true
}'
{
  "created_at": "2023-11-07T05:31:56Z",
  "fingerprint": "86:75:ce:e7:e9:1e:f0:79:ec:6f:d8:92:9b:43:fc:4d",
  "id": "36a7a97a-0672-4911-8f2b-92cd4e5b0d91",
  "name": "alice",
  "private_key": "<private_key>",
  "project_id": 1,
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFHrnwGVBZs6q6vmTBzQFfzdRLQW8N6Rd0ogGe3h8tm83ZJLTTsF+1H4JcOvwI5ETkHMaFIWd2U15nHU5M7plE6UPRKfzy4rq6yI6cE4tojd3A9attMpbEEX7EbGKrbrb4AsjzxHKAVaREAb31ZplJkUlsiees25hTQXBcWQnOESlc9RCxZ/QQgNUUgqm7QGg7CNkL8Mpq9V4YaOhcFGWj0jXP1CL3g6Xe3xJo1CmUbkIOGUyAmrSfLEiy2O91iOUhbmYQyXksznNrT9O6uLkijf6syLZOdyAuUd/Z86eYXej4/YsvIA5eIFU4B6y9zOXEO2A81txPYMRAytYt7+e7 alice@alice",
  "shared_in_project": true,
  "state": "ACTIVE"
}

Authorizations

Authorization
string
header
required

Path Parameters

project_id
integer
required
Examples:
region_id
integer
required
Examples:
keypair_id
string
required
Examples:

Body

application/json
shared_in_project
boolean
required
Examples:

Response

200 - application/json
id
string
required
Examples:
name
string
required
Required string length: 1 - 255
Examples:
public_key
string
required
Examples:
shared_in_project
boolean
required
Examples:
state
enum<string>
required
Available options:
ACTIVE,
DELETING
created_at
string<date-time> | null
fingerprint
string | null
Examples:
private_key
string | null
Examples:
project_id
integer | null
Examples: