07-28-2016 08:36 AM - edited 03-01-2019 04:30 AM
Hi
The attached image shows the documentation for POST /network-device/location.
The documentation says that it "Associates the given location to the given device".
The actual argument is a NetworkDeviceNIO, not a given location or device.
I can't actually see a "location" field in the NetworkDeviceNIO. The closest is a "snmpLocation".
So, how is this API supposed to be used please?
Many thanks
Nathan
07-28-2016 08:48 AM
I agree this is confusing. However, there is a "location" element in the NetworkDeviceNIO model. So, let's say your location UUID is "d2b063ad-ea9b-43cd-8536-e68aa9d31c66". Create a JSON body for the /network-device/location resource:
{
"id":"1153fb76-06dd-4c61-9aa6-739e3d4ab80f",
"location":"d2b063ad-ea9b-43cd-8536-e68aa9d31c66"
}
Here, id is the device's UUID and location is the location UUID obtained from GET /location.
07-28-2016 08:58 AM
Thank you Joe. I was just being blind, there is a “location” attribute, I just didn’t see it. It is between “type” and “id”.
In my, limited. defence, some of the field names are in bold, and some in grey, so they don’t stand out. As I squint harder, I think that the convention is that the required fields are in bold, and those that are optional are in grey.
Regards
Nathan
07-28-2016 09:00 AM
Yeah, the bold/grey is why I say it's a bit confusing. For the location API, one would expect all I should be able to enter in the model is device ID and location ID.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:
This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community