04-29-2015 09:47 AM - edited 03-01-2019 04:25 AM
Hello,
I am trying out the API of APIC-EM and I encounter problems in updating interface fields like : IP/mask, speed/duplex, description, mode.
Here is an example:
The POST body is:
"ipv4Address": "10.10.30.1",
"ipv4Mask": "30",
"id": "edbc9c9c-eef9-4f57-a6bd-4f07c902b557"
}
]
https://10.10.10.107:443/api/v0/interface
{ "response": { "taskId": "917c54d5-0bd6-4b53-a04e-56822837ebed", "url": "/api/v0/task/917c54d5-0bd6-4b53-a04e-56822837ebed" }, "version": "0.0" }
Task is ok:
https://10.10.10.107:443/api/v0/task/917c54d5-0bd6-4b53-a04e-56822837ebed
{ "response": { "id": "917c54d5-0bd6-4b53-a04e-56822837ebed", "rootId": "917c54d5-0bd6-4b53-a04e-56822837ebed", "serviceType": "Inventory service", "progress": "Interface updated successfully #edbc9c9c-eef9-4f57-a6bd-4f07c902b557 ", "startTime": 1430148662699, "endTime": 1430148662725 }, "version": "0.0" }
With GET we see the updated info, also in the GUI
"version": "0.0",
"response": {
"ipv4Address": "10.10.30.1",
"macAddress": "FC:5B:39:D4:4C:01",
"vendor": "Cisco",
"ipv4Mask": "30",
"duplex": true,
"serialNo": "FGL183710LP",
"pid": "ISR4451-X/K9",
"lastUpdated": "2015-04-27 15:30:12.629034+00",
"status": "up",
"numUpdates": 534,
"interfaceType": "Physical",
"deviceId": "5a89d2c4-9613-4a2e-900a-4122a900788a",
"portName": "GigabitEthernet0/0/1",
"portType": "ISR4451-X-4x1GE",
"ospfSupport": true,
"connectorType": "RJ-45",
"id": "edbc9c9c-eef9-4f57-a6bd-4f07c902b557",
"speed": 1000000,
"avgUpdateFrequency": 181
}
BUT in reality, the configuration on the network element is not updated:
ISR4451X-B#sh run int gi 0/0/1
Building configuration...
Current configuration : 194 bytes
!
interface GigabitEthernet0/0/1
description P2P link to 3560-X
ip address 10.10.30.65 255.255.255.252
speed 1000
no negotiation auto
service-policy input PM
service-policy output PM
end
ISR4451X-B#sh ip int gi 0/0/1
GigabitEthernet0/0/1 is up, line protocol is up
Internet address is 10.10.30.65/30
Broadcast address is 255.255.255.255
Is there a specific issue or I am not doing it in the right way?
I have also tried to delete and post a new interface but still does not work.
Thank you,
Cristian Ruta
Solved! Go to Solution.
05-11-2015 03:03 PM
The /interface API is NOT for changing device state
05-11-2015 03:03 PM
The /interface API is NOT for changing device state
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide