Take care to build the hypervisor address as follows (last '/' is mandatory):
http://#{ip}:#{port}/
Hypervisor types are:
- VMX_04
- XENSERVER
- XEN_3
- HYPERV_301
- KVM
- VBOX
curl --verbose -H "Content-type:application/xml" -H "Accept:application/xml" "http://localhost:8888/vsm/api/physicalmachines" -u root:temporal -X POST -d @monitor.xml
Request DTO
<physicalmachine>
<id></id>
<address>#{HypervisorURL}</address>
<type>#{HypervisorType}</type>
</physicalmachine>
Response DTO
<physicalmachine>
<id>#{id}</id>
<address>#{HypervisorURL}</address>
<type>#{HypervisorType}</type>
</physicalmachine>
curl --verbose "http://localhost:8888/vsm/api/physicalmachines/1" -X DELETE
Request URI
http://localhost:8888/vsm/api/physicalmachines/#{id}
curl --verbose -H "Content-type:application/xml" -H "Accept:application/xml" "http://localhost:8888/vsm/api/subscriptions" -X POST -d @subscribe.xml
Request DTO
<virtualmachine>
<id></id>
<name>#{name}</name>
<lastKnownState>UNKNOWN</lastKnownState>
<physicalMachine>
<id>#{id}</id>
<address>#{HypervisorURL}</address>
<type>#{HypervisorType}</type>
</physicalMachine>
</virtualmachine>
Response DTO
<virtualmachine>
<id>#{id_vm}</id>
<name>#{name}</name>
<lastKnownState>#{state}</lastKnownState>
<physicalMachine>
<id>#{id}</id>
<address>#{HypervisorURL}</address>
<type>#{HypervisorType}</type>
</physicalMachine>
</virtualmachine>
curl --verbose "http://localhost:8888/vsm/api/subscriptions/1" -X DELETE
Request URI
http://localhost:8888/vsm/api/subscriptions/#{vm_id}
curl --verbose -H "Accept:application/xml" "http://localhost:8888/vsm/api/physicalmachines/1/virtualmachine/ABQ_1b0e7092-1fea-43fe-bb07-41b20f0bd567" -X DELETE
Request URI
http://localhost:8888/vsm/api/physicalmachines/#{id}/virtualmachines/#{name}
curl --verbose -H "Accept:application/xml" "http://localhost:8888/vsm/api/physicalmachines/1/virtualmachine/ABQ_1b0e7092-1fea-43fe-bb07-41b20f0bd567" -X GET
Request URI
http://localhost:8888/vsm/api/physicalmachines/#{id}/virtualmachines/#{name}
curl --verbose -H "Accept:application/xml" "http://localhost:8888/vsm/api/subscriptions" -X GET
curl --verbose -H "Accept:application/xml" "http://localhost:8888/vsm/api/subscriptions?virtualmachine=ABQ_1b0e7092-1fea-43fe-bb07-41b20f0bd567" -X GET
Request URI
http://localhost:8888/vsm/api/subscriptions?virtualmachine=#{name}