I am trying to build a web application to automate the creation of some resource pools, folder and VMs on my vCenter. I have a datacenter and inside that a cluster of 3 hosts. This is how it looks like :
- vcs.domain
- datacenter
- cluster
- resource pool 1
- resource pool 2
- cluster
- datacenter
I want to create a third resource pool using the REST API, but i can't make it to work. I am struggling to find what the "parent" field is.
I don't understand what this "parent" field means. I am also struggling to create vm-folders and dvs-portgroups
What I already do :
- authenticate and get a token to talk
- GET requests work as expected
- POST request to /api/vcenter/resource-pool with several bodies for ex : {"name": "test", "parent": "cluster"} even with all non-required fields
I am getting this response :
{
"error_type": "NOT_FOUND",
"messages": [
{
"args": [],
"default_message": "Resource pool with identifier '{}' does not exist.",
"id": "com.vmware.api.vcenter.resourcepool.not_found"
}
]
}