Table of Contents |
---|
...
This tutorial continues on from Get Started with the Abiquo API!
Modify an entity through the API
Because the VM entity is a special case, we are going to look at two types of modifications: configuring a VM and changing the state of a VM.
...
Now we will add a network interface card (NIC) with an IP address in a private network to the first VM we created. In this case, we will assume that the VM is not deployed.
- Open the browser console at the Network tab and record actions
- Edit the VM, go to Network → Private → select network → drag and drop an IP, and save Save the VM
- Examine the PUT request and look for the link to the NIC and expand it. It will probably be at the end of the links section.
...
Include Page | ||||
---|---|---|---|---|
|
Delete an entity through the API
To delete an entity, simply perform a DELETE request to the API link. But remember that there may be restrictions on what you can delete. For example, you cannot delete a virtual datacenter that contains virtual appliances. If we delete the VM using the following query, it will be removed from the platform (and if it exists on the hypervisor, it will be destroyed). The NIC we added will be detached and released back into the virtual datacenter.
...