cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
755
Views
0
Helpful
2
Replies

REST API returns partial config?

Sean Chandler
Cisco Employee
Cisco Employee

A call like the following does not drill down into the entire config of the device:

curl -u nsouser:nsouser http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>

I have to do something like this in order to get more detail:

curl -s -u nsouser:nsouser -H "Accept: application/vnd.yang.collection+json" http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>/vnic

Is there a way to return the entire config as opposed to just the top level and forcing me to fetch each collection?

1 Accepted Solution

Accepted Solutions

frjansso
Cisco Employee
Cisco Employee

Yes, add ?deep to the URL, e.g. curl -u nsouser:nsouser http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>?deep

You may have to escape the ?, i.e. curl -u nsouser:nsouser http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>\?deep

View solution in original post

2 Replies 2

frjansso
Cisco Employee
Cisco Employee

Yes, add ?deep to the URL, e.g. curl -u nsouser:nsouser http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>?deep

You may have to escape the ?, i.e. curl -u nsouser:nsouser http://127.0.0.1:8080/api/config/devices/device/ucsm011/config/org/service-profile/<service-profile>\?deep

Awesome thanks!  Knew there must be a way.

Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?