Hi there,
Using version 1.1.
My use case is that I want to add a port forward via API. In order to do this I need to add a ‘PortForward’ instance.
I post the data as follows:
‘{ “name”: “addObject”, “objectName”: “InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANIPConnection.4.PortMapping” }’
This works fine. However the object returned by Genie doesn’t include the instance number:
{“name”:“addObject”,“objectName”:“InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANIPConnection.4.PortMapping”,“device”:“18F145-NF18ACV-180611503777”,“timestamp”:“2019-10-16T00:08:30.339Z”,“_id”:“5da65f7efc3b3a332e6d08f3”}
Here is the actual response from the CPE:
<cwmp:AddObjectResponse>
<InstanceNumber>5</InstanceNumber>
<Status>0</Status>
</cwmp:AddObjectResponse>
How can I get the instance number from Genie without having to then query again for the highest instance number (not guaranteed to be correct either)
Thanks,
David.