Hi Paul,
I never got any reply . I made a rest call using this in vco.
Probably you already know just pasting some little code... the below is what I did
//var inParamtersValues = "query?type=organization&format=records&fields=metadata@SYSTEM:first&filter=metadata@SYSTEM:first==STRING:world";
var request = restHost.createRequest("GET", inParamtersValues+"&page="+page, null);
setLog("Request URL: " + request.fullUrl);
for each ( req in inParamtersValues){
System.log("Request: " + req);
}
request.setHeader("Accept" ,"application/*+xml;version=5.1");
request.setHeader("x-vcloud-authorization" , authHeader);
setLog("Request: " + request);
response = request.execute();
need to parse the response.
var doc = new XML(response.contentAsString);
default xml namespace = doc.namespace();
var recs = doc..AdminVMRecord;
setLog("rec----------" + doc..AdminVMRecord);
if(isEmptyObj(recs)) {
setLog(" No search found for this request...");
throw new customError("No search found for this request...");
}
else{
for (i in recs){
setLog("---------------------------------");
setLog(recs[i].@href);
setLog(recs[i].@name);
setLog(recs[i].@vdc);
setLog(recs[i].@containerName);
setLog(recs[i].@container);
//vm
var vmReference = new VclReference() ;
vmReference.href = recs[i].@href;
var vm = vcdHost.getEntityByReference(VclFinderType.VM,vmReference);
........
Thanks,
Gayatri