cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
669
Views
5
Helpful
1
Replies
Michal Garcarz
Cisco Employee

NSO with FMC and restconf API: how to get id ?

Hello Team,

 

NSO 6.4.2 with FMC working fine. I use restconf API to get whole device config:

Screen Shot 2018-10-09 at 14.39.38.png

 

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):

Screen Shot 2018-10-09 at 14.41.08.png

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jan Lindblad
Cisco Employee

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.

View solution in original post

1 REPLY 1
Jan Lindblad
Cisco Employee

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.

View solution in original post