Skip to main content

Update Key Pair

PUT https://infrahub-api.nexgencloud.com/v1/core/keypair/{id}

Updates the name of a specified key pair. Include the key pair ID in the request path and the new name of the key pair in the request body.


Path parameters


id integer   Required

Specify the id of the key pair to be modified.


Body parameters


name string   Required

The new name for the key pair.
A string with a maximum length of 50 characters.


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 update the specified key pair.


keypair object

Returns the keypair objects, containing details on the updated key pair.

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


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

Returns


The response includes the status of the request and the keypair object, which contains detailed information about the key pair. For more details on the attributes of the keypair object, click here.


Back to top