chelnak
10/1/2015 - 10:15 PM

vCACCAFERestClient http://www.helloitscraig.co.uk/2015/10/how-to-use-vcaccaferestclient-in-the-vrealize-orchestrator-plug-in-for-vrealize-au

var endpoint = "com.vmware.vcac.core.cafe.reservation.api";
var restClient = vCACCAFEHost.createRestClient(endpoint);

System.log(restClient.getUrl());

var resourceUrl = "reservations";
var response = restClient.get(resourceUrl);

//return type is vCACCAFEServiceResponse
var body = response.getBodyAsJson();

//Reservaiton data is stored in the content array
var reservations = body['content'];

//loop through each reservation and print the name
for (var i = 0; i < reservations.length; i++) {

	System.log(reservations[i].name);

	}