10-09-2018 05:44 AM
Hello Team,
NSO 6.4.2 with FMC working fine. I use restconf API to get whole device config:
Now i need to:
- get list of ACP policies
- get a list of rules in each policy
Looking at CLI (show device results, scrolled down):
We can see all those objects are referenced via ID (like via direct FMC API). Now - how can i use those NSO restconf API ?
How can i request via restconf "Balanced Security and Connectivity" policy and it's details using id ?
I have tried:
http://{{host}}:8080/restconf/data/devices/device=FMC01/config/name/$id
http://{{host}}:8080/restconf/data/devices/device=FMC01/config/name
http://{{host}}:8080/restconf/data/devices/device=FMC01/config/$id
and always failing. What is the construct / approach to do that ?
Thanks,
Michal
Solved! Go to Solution.
10-09-2018 08:12 AM
To understand how to encode keys etc in RESTCONF, have a look at
examples.ncs/getting-started/developing-with-ncs/13-restconf
To understand the structure and names of whatever data is on the device, have a look at the YANG model in the NED. Or run the show commands you had there, and pipe the output through | display xpath | display prefixes . That will give you the paths to use.
10-09-2018 08:12 AM
To understand how to encode keys etc in RESTCONF, have a look at
examples.ncs/getting-started/developing-with-ncs/13-restconf
To understand the structure and names of whatever data is on the device, have a look at the YANG model in the NED. Or run the show commands you had there, and pipe the output through | display xpath | display prefixes . That will give you the paths to use.
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