Execute REST request building block
This action can be utilized as the lowest level action with any form of REST communication, to be called by higher level actions or workflows. It encapsulate the REST communication with the vRO REST plugin into one spot, checks for errors always, and provides a simplified mechanism of working with REST calls within vRO. Callers of this REST action get to operate at a higher level of abstraction which greatly improves readability as the caller gets to just list out the REST communication details from an API standpoint, rather than mixing in the mechanism by which it's done at the vRO level (ie: vRO REST plugin).
The following is an example of another action which is constructed as a building block itself to encapsulate a specific REST operation with a particular system. The system is fictitious to illustrate the various elements of the call to the provided executeRestRequest action.
The example provided could be further optimized if multiple operations are performed to the same REST system. Rather than calling executeRestRequest directly, this createNewNetwork example action could call a new executeRestRequestForIPAMsystem which in turn would call the executeRestRequest, yet executeRestRequestForIPAMsystem would be responsible for defining the "endpointName" in one spot ("IPAM-SYSTEM") as well as always adding the same additional header of networkView.