03-08-2022 07:42 AM
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.
03-23-2022 07:41 AM
Hello @csgeek,
Please check out these two discussions regarding slow and incomplete RESTConf responses:
RESTCONF vs REST API huge difference between response times
NSO RESTCONF API call returning incomplete response
Hope these help!
03-23-2022 10:01 AM - edited 03-23-2022 10:03 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide