Skip to main content

Attach Callback to Virtual Machine

https://infrahub-api.nexgencloud.com/v1/core/virtual-machines/{id}/attach-callback

Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, click here.


Path parameters


id integer   Required

The ID of the virtual machine to which the callback is being attached.


Request body parameters


url string   Required

The callback URL to be attached to the virtual machine.


Attributes


status boolean

Indicates the status of the virtual machine callback attachment request. A status of true indicates success.


message string

A message describing the status of the callback attachment.


url string

The URL of the callback attached to the virtual machine.

Example request
curl -X POST "https://infrahub-api.nexgencloud.com/v1/core/core/virtual-machines/{id}/attach-callback" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"\
-H "content-type: application/json" \
-d '{
"url": "string"
}'
Response
{
"status": true,
"message": "string",
"url": "string"
}

Returns


A successful response returns the status of true, a message confirming the successful status, and the URL successfully attached to the virtual machine. Any other response indicates an error has occurred.


Back to top