RESTCONF provides a programmatic interface for reading and writing network device configurations through NSO. Platform workflows interact with the NSO RESTCONF API using the restAction task.
NSO also supports JSON-RPC and NETCONF. See Cisco NSO developer documentation for Swagger API documentation and additional protocol references.
Method values are case-insensitive.
Use the restAction task in a workflow to make RESTCONF calls to NSO. The task handles authentication and connection routing through the configured NSO adapter.
The following examples show complete restAction variable inputs for each HTTP method. In each example, adapterId is set to "Local NSO" — substitute the name of your configured adapter instance.
Retrieve device information for C-IOS1:
Add a loopback interface configuration to C-IOS1:
Replace the IP address configuration on loopback interface 1 of C-IOS1:
Add a new device named C-IOS1 to NSO:
Delete the C-IOS1 device from NSO:
A common pattern is to chain restAction calls in a workflow to perform a full device onboarding sequence:
/restconf/data/tailf-ncs:devices/device=C-IOS1/ssh/fetch-host-keys/restconf/data/tailf-ncs:devices/device=C-IOS1/sync-fromEach step uses a separate restAction task in the workflow, chained sequentially.
To apply a service model using restAction with commit queue options, include the commit-queue tag in the POST body. Optional parameters such as no-out-of-sync-check and continue-on-error can be included for operational resilience during bulk deployments.
Refer to the Cisco NSO developer documentation for the YANG model paths specific to your service models.