O'Reilly logo

Automating Junos Administration by Stacy Smith, Jonathan Looney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. The RESTful API Service

Chapter 2 introduced the structured data models Junos software uses to represent both its configuration and operational output. Chapter 2 also explored the Junoscript and NETCONF methods for making remote procedure calls (RPCs) to modify the configuration or retrieve operational output. While it is important to understand the underlying mechanism the Junos software uses to handle RPCs, access to the Junoscript and NETCONF interfaces is much more efficient when it is mediated by a frontend mechanism that abstracts the lower-level Junoscript or NETCONF interaction. This chapter explores one such mechanism, the Junos RESTful API service. The Junos RESTful API service enables RPCs to be invoked and structured data responses to be returned without directly entering Junoscript or NETCONF syntax.

Beginning with release 14.2R1, the Junos software provides an application programming interface (API) based on the Representational State Transfer (REST) software architecture style. REST is not a protocol, but a set of architectural constraints for building scalable web services. Web services that provide APIs based on the REST architecture style are referred to as RESTful APIs.

Details of the REST architecture1 and RESTful web services could be, and in fact are, the topic of entire books. In this section, we’re going to primarily focus on using the Junos RESTful API rather than describing the REST architecture. RESTful APIs typically utilize the Web’s Hypertext ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required