10-09-2018 11:11 PM - edited 10-09-2018 11:25 PM
Hello Team,
NSO 4.6.2 with FMC registred, i am using restconf API to manage my FMC via NSO. I am able to read the objects, example in CLI:
#show devices device FMC01 | display xpath ..... /devices/device[name='FMC01']/cisco-fmc-meta:ciscofmc-id-store/object/networks[name='mgarcarz_object_network_1']/id 005056A5-7145-0ed3-0000-614180324637
And i am able to use restconf like this:
GET request for:http://{{host}}:8080/restconf/data/devices/device=FMC01/config/object/networks=mgarcarz_object_network_1
and getting 200 with body:
<networks xmlns="http://tail-f.com/ned/cisco-fmc" xmlns:cisco-fmc="http://tail-f.com/ned/cisco-fmc" xmlns:ncs="http://tail-f.com/ns/ncs"> <name>mgarcarz_object_network_1</name> <value>1.2.3.0/24</value> </networks>
Now i do struggle with POST and network object creation. When i am passing similar XML for POST i got the following error:
I have tried several combinations, but no luck. What should be the URI and body to create exactly same object which i have displayed above ?
Thanks,
Michal
P.S When i use json instead of xml for all operations i do have identical error.
Solved! Go to Solution.
10-10-2018 01:08 AM
Perhaps try the following as your URL:
POST --> http://{{host}}:8080/restconf/data/devices/device=FMC01/config/object
And your body/payload:
<networks> <name>mgarcarz_object_network_1</name> <value>1.2.3.0/24</value> </networks>
See if that works.
10-10-2018 01:08 AM
Perhaps try the following as your URL:
POST --> http://{{host}}:8080/restconf/data/devices/device=FMC01/config/object
And your body/payload:
<networks> <name>mgarcarz_object_network_1</name> <value>1.2.3.0/24</value> </networks>
See if that works.
10-10-2018 01:09 AM
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