Representational State Transfer (REST) is a is a software architectural style that describes a uniform interface for numerous software packages and hardware systems in IT environments. The most common protocol for these requests and responses is HTTP, which provides operations (HTTP methods) such as OPTIONS, GET, POST, PUT, PATCH and DELETE.
The OpenAPI Specification (OAS), previously known as the Swagger Specification, is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful web services.
Applications implemented based on OpenAPI interface files can automatically generate documentation of methods, parameters and models. This helps keep the documentation, client libraries, and source code in sync.
Examples of VMware products providing Swagger Specifications are vRealize Automation (vRA) and vRealize Operations (vROps).
To call REST operations from within vRealize Orchestrator (vRO), we can use the HTTP-REST plugin, which allows us to manage REST Web services by providing interaction between vRO and REST hosts. We can define REST services and their operations as inventory objects by running configuration workflows, and perform REST operations on the defined objects. The plug-in contains a set of standard workflows related to managing REST hosts and invoking REST operations.
Compared to a manually created REST Host, a Swagger REST Host comes with configured operations which reduces the risk of misconfiguration when manually adding every operation.
In this article, we’ll cover the creation of a vROps REST host from a Swagger endpoint inside the vRA embedded vRO.