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

Attempting any NSO REST API calls result in 404 not found.

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.

 

1 Accepted Solution

Accepted Solutions

tsiemers1
Spotlight
Spotlight

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.

View solution in original post

2 Replies 2

u.avsec
Spotlight
Spotlight

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.


tsiemers1
Spotlight
Spotlight

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.