Showing results for 
Search instead for 
Did you mean: 

Getting containers from capabilities IOS-XE with RESTCONF

Hey all,


Long time lurker first time poster here.


I'm doing my DevNet Associate training and have come up against a brick wall when trying to determine how to generate the full URIs to GET/POST (more GET at this point! ha) on IOS-XE when using RESTCONF. I have queried the YANG capabilities using /restconf/data/netconf-state/capabilites and have returned a large list. When trying to query any of them I get an error - 'uri keypath not found'. I know from my training material that there is a URI for /restconf/data/ietf-interfaces:interfaces which returns data. However, without knowing that ietf-interfaces has a container of :interfaces, how would I generate a URI, for example for ietf-ipv4-unicast-routing or /Cisco-IOS-XE-acl? 


I know of YANG Catalog and I have been able to locate both of those capabilities, but am wondering how do/would you or I determine the full URI? I.e. would you go to YANG catalog and find the module and locate the capabilities - or is there a way to determine it via a query?


Really apreciate the assit here.



3 Replies 3

VIP Alumni
VIP Alumni


Dont think you get containers from capabilities with restconf .. could be wrong .. but I have not seen any doc.

Use pyang or yang explorer to load/explore the yang model from yang catalogue on github to see the containers.

check out the uri construction section in these presentations -



Thanks. Both of those PDFs are really useful! I think you're right, there probably isn't an easy way to see what containers exist to query. For now I'm sticking to using YANG-Explorer. Cheers for the reply.


The DEVNET-1081 PDF is no longer available. Does anyone know where we can find it?


Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: