What are the vRealize Automation APIs and how do I use them

As a VMware vRealize® Automation™ user or customer, you can perform vRealize Automation Cloud Assembly, vRealize Automation Service Broker, and vRealize Automation Code Stream functions programmatically by using REST API service calls.

API Services

vRealize Automation includes the following APIs. API documentation is available with the product or from the VMware API Explorer at https://code.vmware.com/apis/vrealize-automation. To access all Swagger documents from a single landing page, go to https://<vRA-HOSTNAME>/automation-ui/api-docs where vRA-HOSTNAME is the hostname of your vRealize Automation appliance.

Table 1. vRealize Automation
Main Service Service Name and Description
Cloud Assembly
Infrastructure as a Service (IaaS)
Perform infrastructure setup tasks, including validation, and provisioning of resources in an iterative manner.
ABX
Create or manage actions and their versions. Execute actions and flows.
Approval
Enforce policies that control required approvals for a deployment or Day 2 action before the request is provisioned.
CMX
When using Kubernetes with vRealize Automation Cloud, deploy and manage Kubernetes clusters and namespaces.
Blueprint
Create, validate, and provision blueprints.
Migration Assessment
Determine readiness for migration from vRealize Automation 7.5 or later.
Relocation
Define policies and plans to bring existing VMs from any cloud under management.
Content Gateway
Connect to your infrastructure as code content in external content sources, such as Source Code Management providers and VMware Marketplace.
Deployment
Access deployment objects and platforms or blueprints that have been deployed into the system.
Service Broker
Catalog
Access vRealize Automation Service Broker catalog items and catalog sources, including content sharing and the request of catalog items.
Policies
Interact with policies created in vRealize Automation Service Broker.
Custom Forms
Define dynamic form rendering and customization behavior in vRealize Automation Service Broker and vRealize Automation Cloud Assembly.
Code Stream
Code Stream
Create and run pipelines for continuous delivery of your applications to production.
User Profile
Customization
Configure branding information.
Identity
Identity
Authenticate and manage the authorization of vRealize Automation users. If you have a user role, the Identity service allows you to obtain the authorization required to manage services.

API versioning

Incremental changes to the API can affect your API clients. To ensure backward compatibility and protect your clients from the impact of an incremental change, you can use vRealize Automation API versioning.

API versioning allows you to lock the API at a given point in time and control when you upgrade to a new API version. In the following example, the additional apiVersion query parameter locks the call to the API version that was in effect on January 30, 2020.
GET https://appliance.domain.com/catalog/api/sources?apiVersion=2020-01-30

It is not necessary to lock your APIs to the date provided in the example. You can enter any date you choose. Or if you choose to consume the API without versioning, leave the apiVersion value unspecified and the latest API version is used by default. However, backward compatibility is not preserved. So if the API changes, you might encounter an unexpected change in the API response.

As a best practice, lock your API to a date that most recently provided a response with expected results. Then if you want to opt-in to an API update that is announced with a new release, you can specify the new version date.

For vRealize Automation 8.3, the corresponding apiVersion value is 2021-02-04.

How Developers Use the vRealize Automation APIs

To make API service calls, you use a browser application or an HTTP client application to send requests and review responses. The following open-source applications are commonly used:

To learn how to use the API, you can start by performing the steps outlined in the following use cases:

The use cases include curl commands in request examples. To use the commands, ensure that the jq command-line JSON processor is installed with curl. The jq parser ensures that responses are formatted for optimum readability.