I am trying to navigate to and obtain a devices IP address in a macro, but I am unable to get a result using the following code:
function init(){
xapi.status.get('Network IPv4 Address').then((value) => {
systemInfo.ipv4 = value;
});
}
The result of which is:
'Unhandled promise rejection' { code: 0, message: 'not object coercible' }
I can access the Status/Network part of the API but am unable to move further to get the details that I need.
The Status/Network area of the API:
<Status product="Cisco Codec" version="ce9.9.0.46f7ea38fda" apiVersion="4">
<Network item="1" maxOccurrence="n">
<IPv4>
<Address>xx.xx.xx.xx</Address>
</IPv4>
</Network>
</Status>
The attributes in the Network tag may be what is preventing navigation past that point, as they are not included in the path.
Additionally other parts of the API can be accessed in this way (e.g: Status/SystemUnit/Software/Version). Is there any way to access and collect the IP?