Device Reference Helper¶
Overview¶
Many BIG-IQ API requests refer to a particular BIG-IP using the deviceReference parameter. The value of deviceReference is a link object for the BIG-IP being targeted by the request. You should first call the Device Reference Helper API to get the correct value of deviceReference before trying to use it in another BIG-IQ API. The value of these links is expected to change from release to release. The helper API can query for the correct value of deviceReference if you specify either the hostname, address, or machineId of the target BIG-IP as well as specify the module associated with your request. By using the helper API, you will isolate clients from future version-specific changes to these links.
Requests¶
Examples¶
In the following example, the BIG-IQ API is going to use the deviceReference parameter to target a particular BIG-IP for a PUT request. First, call the Device Reference Helper to get the correct value of deviceReference as follows.
POST /cm/shared/device-reference-query
{
"address": "192.0.0.106",
"module": "access"
}
On success, the body of the response contains the link object which is the value of deviceReference.
{
"link": "https://localhost/mgmt/shared/resolver/device-groups/cm-access-allBigIpDevices/devices/2913a9ff-6fea-42a1-bd82-73d6dd5c9849"
}
You can then use this value in the PUT request as the follows.
PUT /cm/access/working-config/ltm/virtual/<id>
{
…
"name": "vip-02",
"deviceReference": {
"link": "https://localhost/mgmt/shared/resolver/device-groups/cm-access-allBigIpDevices/devices/2913a9ff-6fea-42a1-bd82-73d6dd5c9849"
},
…
}