Rebuild VM
POST
/api/v1/vm/rebuild/{id}
const url = 'https://console.cloudlogics.com/api/v1/vm/rebuild/8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"image":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://console.cloudlogics.com/api/v1/vm/rebuild/8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "image": "example" }'Rebuild a virtual machine from a new image
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
VM ID
Request Body
Section titled “Request Body”Rebuild request
Media typeapplication/json
object
image
string
Examplegenerated
{ "image": "example"}Responses
Section titled “Responses”Instance rebuilding
Media typeapplication/json
string
Examplegenerated
exampleBad request
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Invalid state transition
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Internal server error
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}