Skip to main content

List Key Pairs

GET https://infrahub-api.nexgencloud.com/v1/core/keypairs

Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, click here.


Query string parameters


search string or integer  optional

Search for the name or ID of the key pair to retrieve it.


page integer  optional

The page number to retrieve key pairs from.


pageSize integer  optional

Specify the number of key pairs to return on per page.


Attributes


status boolean

Indicates the success or failure of the operation. true, indicates success, while false indicates error.


message string

A message confirming the status of the request to retrieve the list of SSH key pairs.


keypairs array of objects

An array of keypairs objects, containing details on your existing SSH key pairs.

For descriptions of the fields within the keypairs object returned in response to your request, please refer to the documentation here.


Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/keypairs" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"status": true,
"message": "string",
"Keypairs": [
{
"id": 0,
"name": "string",
"environment": "string",
"public_key": "string",
"fingerprint": "string",
"created_at": "1970-01-01T00:00:00.000Z"
}
]
}

Returns


Returns a list of your SSH key pairs as keypairs objects.



Back to top