VMware Cloud Community
msk05
Hot Shot
Hot Shot
Jump to solution

Unable to change the datacenter location via REST API

Tried with string 'London' but failed
Response :



I have also tried to submit the location ID instead of location name but still the request is failing.



Reply
0 Kudos
1 Solution

Accepted Solutions
msk05
Hot Shot
Hot Shot
Jump to solution

We need to specify ‘datacenter_location’ property as an entity reference as below

Example:
"datacenter_location": {
    "componentId": null,
    "classId": "Infrastructure.Compute.DataCenterLocations",
    "id": "London",
    "label": null

View solution in original post

Reply
0 Kudos
5 Replies
msk05
Hot Shot
Hot Shot
Jump to solution

Attaching the response and output.

Reply
0 Kudos
GrantOrchardVMw
Commander
Commander
Jump to solution

Which URI are you using?

Grant http://grantorchard.com
Reply
0 Kudos
msk05
Hot Shot
Hot Shot
Jump to solution

Hello Grant,

Called this API https://sddc-vra-01/catalog-service/api/consumer/entitledCatalogItemViews/69f101e2-1a1f-4c39-a41f-10...

and took the GET request template API and then called that API to get request template, changed the location in the template and submitted the request.

Reply
0 Kudos
msk05
Hot Shot
Hot Shot
Jump to solution

GrantOrchardVMware‌ It seems like a bug to me and it might need a PR to track it.

Reply
0 Kudos
msk05
Hot Shot
Hot Shot
Jump to solution

We need to specify ‘datacenter_location’ property as an entity reference as below

Example:
"datacenter_location": {
    "componentId": null,
    "classId": "Infrastructure.Compute.DataCenterLocations",
    "id": "London",
    "label": null

Reply
0 Kudos