A popular choice for implementing human-to-machine management interfaces is a WebUI. When migrating existing or writing new WebUI content for ConfD, the application developer has two choices for integrating: JSON-RPC API or RESTCONF. Both of these APIs are programmable and web-oriented. They utilize the HTTP(S) protocol as their transport layer and XML or JSON for data representation.
A general aspect of JSON-RPC vs RESTCONF selection is that JSON-RPC is better suited for more complex or heavy “single page” applications used by a human operator compared to the CRUD-like (Create, Read, Update, Delete) architecture of RESTCONF.
ConfD’s JSON-RPC API has, in comparison to RESTCONF:
- Tighter method/parameters coupling
- Datastore control – candidate/startup/running
- More in-depth session control with a wider range of methods… sessions, transactions, schema, datastores, rollbacks
JSON-RPC API sounds like a powerful tool for developing a WebUI. So, how do you go about learning to work with it? That is where the ConfD example set comes into play. In addition to the excellent JSON-RPC API documentation in the ConfD User Guide, ConfD 7.4 introduced a freshly updated WebUI example that demonstrates the use of the JSON-RPC API.
In order to make it easier to understand the organization and functionality of the new WebUI example, we have written a new application note as an extended guide to the example. The application note discusses the basics of working with the JSON-RPC API, how the example is organized, what the major pieces of the example’s architecture are, and the basics of the example’s functional flow. This application note is an excellent supplement to the example’s README file and the JSON-RPC API documentation in the ConfD User Guide.