cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
391
Views
10
Helpful
2
Replies

RESTConf call taking very long and cuts response

csgeek
Level 1
Level 1

I'm trying to get some basic meta data about all devices that drives my app logic.  When I try to run the following request:

curl -H "Content-Type: application/yang-data+json" -H "Accepts: application/yang-data+json" -u "user:secret" --connect-timeout 3600 "https://nso-east.es.net/restconf/data/tailf-ncs:devices?depth=2&fields=device(name);device(platform(model));device(platform(name));device(module);device(module);device(live-status(tailf-ned-alu-sr-stats:chassis(serial-number)))"

 

The request seems to take a very long time and even with an extended timeout it still gets truncated and doesn't return the full data.

Is there a way to optimize this call? I saw posts about setting content=config but that doesn't give me all the data I need.  Is there a page that shows all the options for the content type? 

 

Any help is appreciated. 

2 Replies 2

Alexander Stevenson
Cisco Employee
Cisco Employee

Hello @csgeek,

 

Please check out these two discussions regarding slow and incomplete RESTConf responses:

RESTCONF vs REST API huge difference between response times

https://community.cisco.com/t5/nso-developer-hub-discussions/restconf-vs-rest-api-huge-difference-between-response-times/td-p/4016980

 

NSO RESTCONF API call returning incomplete response

https://community.cisco.com/t5/nso-developer-hub-discussions/nso-restconf-api-call-returning-incomplete-response/td-p/4426618

 

Hope these help!

perander
Cisco Employee
Cisco Employee

Hi!

Is the response just cut and the connection closed or is there
missing content?

How many devices are in the list?

What version of NSO are you using?

EDIT: Have you tried the RESTCONF Query API? It might have better performance.