- 23 May 2023
-
DarkLight
-
PDF
NSO RESTCONF API
- Updated on 23 May 2023
-
DarkLight
-
PDF
This section provides configuration detail on how to make RESTCONF calls to NSO via IAP. Key highlights of NSO support for RESTCONF are listed along with several use case examples of the RestAction | NSO Manager
task.
NSO RESTCONF API
RESTCONF provides a programmatic way of writing configurations to network devices. This feature is NSO-supported.
- NSO 5.x and beyond supports RESTCONF.
- NSO 5.3 is the last release to support both RESTCONF and REST.
- NSO 5.4 is the first release that supports only RESTCONF.
- NSO also supports JSON-RPC and NETCONF.
See Cisco NSO for additional resources and Swagger API documentation.
HTTP Methods
The primary HTTP methods for RESTCONF are listed below.
Method | CRUD Operation |
---|---|
GET |
Read |
PATCH |
Update |
PUT |
Create or Replace |
POST |
Create or Operations (reload, default) |
DELETE |
Deletes targeted resource |
⚠ Note: Capitalization is not required when setting a method.
RestAction NSO Manager Task
The restAction
task is used to handle REST calls to NSO but can also be used to make restAction
calls.
Incoming and outgoing variables for the task are presented in the table below.
Incoming Variable | Type | Description | Example |
---|---|---|---|
adapterId |
String | Required. The NSO adapter to be used. This will satisfy the location and AAA requirements of the restConf call. |
Local NSO |
params |
Object | Required. Parameters such as path , contentType and method to complete the call. |
path - /restconf/data/tail-ncs:devices/ contentType - application/yang-data+json accept - application/yang-data+json method – GET, PATCH, PUT, POST, DELETE |
body |
Object | Required. The device payload to send to NSO. | C-IOS1 C-IOS2 |
Outgoing Variable | Type | Description |
---|---|---|
result |
Object | An array of results. |
Figure 1: RestAction Task Dialog
Figure 2: RestAction Task Variables