REST vs. RPC APIs

In the post I want to breakdown REST API & RPC API and provide a brief comparison.


Let's start with REST. Restful APIs leverage HTTP/S to define the operations on the resources. An example would contain:

  • A URI that defines resources

  • Set of protocols - GET POST PUT DELETE etc.

  • Representations of the resource defined by the media type

In regard to REST, in order for a web API to be "RESTful" it must adhere to the following:

  • Client/Server architecture

  • Statelessness

  • Cacheability

  • Layered System

  • Uniform Interface

  • Code on demand

Restful APIs leverage HTTP to define the operations on the resources. An example would contain:

  • A URI that defines resources

  • Set of protocols - GET POST PUT DELETE etc.

  • Representations of the resource defined by the media type

To see examples of HTTP status codes & methods see: HTTP Methods & Status Codes Tidbit


RPC APIs are great for actions (procedures or commands). REST APIs are great for modeling your domain (resources or entities), making CRUD (create, read, update, delete) available for all of your data. REST will use HTTP methods such as GET, POST, PUT, DELETE, OPTIONS and, hopefully, PATCH to provide semantic meaning for the intention of the action being taken.


Quick comparison on HTTP request methods and how they correlate with CRUD:

  • POST = CREATE

  • GET = READ

  • PUT = UPDATE

  • DELETE = DELETE

RPC APIs are a call based remote procedure. From a high level, a client sends a call to the server, with some parameters, once the call/job is complete it awaits response with results. These types of APIs can be executed asynchronously. Two major RCP API based protocols include the following:

  • SOAP (simple object access protocol) = interface for describing functionalities offered via the web services.

  • SOAP framework is as follows:

  • Envelope: identifies the XML document as a SOAP message

  • Header: contains SOAP header

  • Body: body of message with remote call and parameters

  • Fault: provides info about errors

  • Network Configuration Protocol (NETCONF): network device configuration management protocol that provide mechanisms to install, manipulate, and delete configurations

NETCONF consists of 4 layers:

  1. Content layer = actual config

  2. Operations layer = defines set of base protocol to retrieve/edit configuration data. <get-config><edit-config><lock>

  3. Message layer = mechanism for encoding remote procedure calls

  4. Secure transport layer = ensures secure transfer between client/server

  5. gRPC: http/2 built by google; uses protocol buffers

NETConf's main purpose is to:

  • Transport config payloads to a device

  • Retrieve config data

  • Support notifications

NETConf primary features include:

  • Defines framework for session mgmt

  • RPC messages to put and get config data

  • Transaction-based comms

  • Net device activation

  • Datastores of config data

For examples & more on APIs see the <api> tag, Cheers!


0 comments

Recent Posts

See All

HTTP Methods & Status Codes Tidbit

In this tidbit I want to touch on different types of HTTP Methods & the types of HTTP status codes you may encounter when consuming APIs in regard to automation. HTTP Methods: GET = get user info PATC

Enabling ISE 3.0 ERS APIs

I want to walkthrough enabling the External RESTful Services (ERS) APIs in Cisco ISE 3.0 so that we can consume ISE APIs in later posts to do a variety of things to include endpoint creation/manipulat