Quantcast
Channel: VMware Communities : All Content - VMware vCenter™
Viewing all articles
Browse latest Browse all 24426

vCO 5.5.2 and vCAC 6.1 plugin REST API Error

$
0
0

Hello,

 

I'm getting an error when trying to make calls from vCO 5.5.2 to the vCAC 6.1 REST API requesting catalog items.  This same code works fine with the vCAC 6.0.1 plugin.

 

Error:

 

Data serialization error. (Workflow:Test vCAC Rest / Scriptable task (item1)#24)

 

Code:

var item = {"@type": "CatalogItemRequest",

"catalogItemRef": {"id": "3e6c3f13-6ea0-4da5-8bac-d8cb27e64f24"},

"organization": {"tenantRef": "vcacadmin",

"subtenantRef": "e931debb-6200-40e5-89a7-01d35d0cc306"},

"requestedFor": "vcacadmin@sddc.lab",

"state": "SUBMITTED",

"requestNumber": 0,

"requestData": {"entries": [

{"key": "provider-blueprintId", "value": {"type": "string", "value" : "catalogItem.id"}},

{"key": "provider-provisioningGroupId", "value": {"type": "string", "value": "e931debb-6200-40e5-89a7-01d35d0cc306"}},

{"key": "requestedFor", "value": {"type": "string", "value": "vcacadmin@sddc.lab"}},

{"key": "provider-VirtualMachine.CPU.Count", "value": {"type": "integer", "value": 1}},

{"key": "provider-VirtualMachine.Memory.Size", "value": {"type": "integer", "value": 1024}},

{"key": "provider-VirtualMachine.LeaseDays", "value": {"type": "integer", "value": 0}},

{"key": "provider-__Notes", "value": {"type": "string", "value": "Test"}},

{"key": "provider-VirtualMachine.Disk0.Size", "value": {"type": "string", "value": "40"}}, 

{"key": "provider-VirtualMachine.Disk1.Size", "value": {"type": "string", "value": "8"}}]}}

var catalogRest = vcac.createRestClient(vCACCAFEServicesEnum.CATALOG_SERVICE);

var response = catalogRest.post("consumer/requests",item);


Viewing all articles
Browse latest Browse all 24426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>