cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2940
Views
5
Helpful
1
Replies

RESTCONF API timeout

Loïc Roque
Cisco Employee
Cisco Employee

Hi all,

 

I am working with the NSO RESTCONF API, but when I try to read the configuration for a device, I get a timeout while it took less than 5sec using NETCONF.

 

My RESTCONF request is the following :

GET /restconf/data/devices/device={device-name} HTTP/1.1
Host: {server}:{port}
Accept: application/yang-data+json
Cache-Control: no-cache
Authorization: Basic YWRtaW46YWRtaW4=

 

Thanks,

 

Loïc

 

[SOLUTION from Roque Gagliano]

The /data resource in RESTCONF is a combination of both configuration and state information for the tree. So, what is happening is that NSO is querying all the state information for that device and thus taking a very long time and maybe timeout. If you want only configuration, you should run something like:

 

http://{{server}}:{{port}}/restconf/data/devices/device=pe0?content=config

 

1 Accepted Solution

Accepted Solutions

Jan Lindblad
Cisco Employee
Cisco Employee
Solved by Roque above.

View solution in original post

1 Reply 1

Jan Lindblad
Cisco Employee
Cisco Employee
Solved by Roque above.
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?