09-24-2022 12:46 PM
I recently installed NSO 5.7.1.
I've created a simple template service and tested it via ncs_cli successfully on a device.
I'm trying to integrate this now into a simple vRealize Orchestrator workflow using the REST API.
But any attempt to access NSO via REST results in a 404 not found.
I've even loaded the rest-api-explorer @ https://gitlab.com/nso-developer/rest-api-explorer
To make sure I was using the current URI.
Everything comes back with 404.
Is there anything in ncs.conf or general settings that would disallow access to HTTP://x.x.x.x:8080/api ?
The standard webgui is working fine.
Solved! Go to Solution.
09-26-2022 06:58 AM
The legacy rest api was removed in 5.3, you can use the restconf API now instead. /restconf
https://developer.cisco.com/docs/nso/guides/#!nso-5-7-northbound-apis-the-restconf-api
- rest-api: The legacy REST API is deprecated since NSO 5.1 (released in
April 2019) and is scheduled to be removed in NSO 5.3 (tentative release
date June 2020).
Users of the legacy REST API should use the RESTCONF API instead. The
RESTCONF API is a standardized REST interface as defined in RFC 8040 and
provides a number of improvements over the proprietary and legacy REST
interface including the support for auto-generating Swagger/OpenAPI
documents from YANG. Please see the NSO Book Northbound APIs: Migrating
from REST to the RESTCONF API. We understand that this may require some
adjustments to external systems that are integrated with NSO, please
reach out to ask-nso-plm@cisco.com if you have any questions or concerns
on this topic.
09-25-2022 11:18 PM - edited 09-25-2022 11:21 PM
Hey.
Start whacking at it with curl:
curl -k -X GET https://localhost:443/restconf/data -H 'Accept: application/yang-data+json' -u admin:admin -v
First directly in the VM as shown above (it is ssl version, you can also do the 'http' to see what happens), then from outside the VM with a proper IP. If localhost get works but get from outside doesn't, then it might be some firewall/iptables rules that need adjusting.
Otherwise in ncs.conf, there are two sections to look at:
webui that has tcp and ssl section (with corresponding ports) and restconf section. Remember to ncs --reload after editing.
09-26-2022 06:58 AM
The legacy rest api was removed in 5.3, you can use the restconf API now instead. /restconf
https://developer.cisco.com/docs/nso/guides/#!nso-5-7-northbound-apis-the-restconf-api
- rest-api: The legacy REST API is deprecated since NSO 5.1 (released in
April 2019) and is scheduled to be removed in NSO 5.3 (tentative release
date June 2020).
Users of the legacy REST API should use the RESTCONF API instead. The
RESTCONF API is a standardized REST interface as defined in RFC 8040 and
provides a number of improvements over the proprietary and legacy REST
interface including the support for auto-generating Swagger/OpenAPI
documents from YANG. Please see the NSO Book Northbound APIs: Migrating
from REST to the RESTCONF API. We understand that this may require some
adjustments to external systems that are integrated with NSO, please
reach out to ask-nso-plm@cisco.com if you have any questions or concerns
on this topic.
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