Experimenting w/ IOS-XE 16.5.1 on a CSR & have attempted to query the RESTCONF API. Having a hard time getting the information is needed. Being able to identify the correct URI to extract targeted data has been time-consuming because it's based on URI combinations to get the data needed. Not able to make sense of how to map the YANG models directly to a functional URI. Looking for guidance on how to take a specific YANG model & then be able to access the desired information within.
A concrete example:
Have configured MPLS tunnels between 2 CSR's & am attempting to query the Cisco-IOS-XE-mpls.yang model.
The closest URI that which provides meaningful info is as follows:
But doesn't contain a lot of the information was needed. Hence want to make sure that you are accessing the YANG data model that you want (Cisco-IOS-XE-mpls.yang).
Following are the issues :
1) Which datastore: operational/data/config/running . (some YANG models have "-oper" on the end of them, but otherwise its clueless.)
2) Once you know the data store, how do you know how to access the specific module that you want. Is there a concrete process for doing this. In Cisco documentation (and other tutorials) we see the same example of querying ieee-interfaces, but nothing w/ more detail.
3) is there a way to show API structure (like a list of keys, etc) through querying the API.
4) is there a way to output an entire yang data model (even if parts of it are empty)
Everyone may have the same feeling since there is no RESTCONF API reference menu.
use pyang and yang-explorer for help to figure out what to use.
DevNet learning labs may help too such as RESTCONF related LLs