Arouay
Contributor
Contributor

VM Provisioning REST API

Hi Team,

 

Please I get an issue when trying to create a vm using REST api, here is my request/response:

 

Request:

----------

curl -kv -H "Content-Type:application/json" -H "Authorization: Bearer $token" https://$vRA/catalog-service/api/consumer/entitledCatalogItems/c562a66a-c896-489e-be8c-c4e3520ee943/... -d '{
"type": "com.vmware.vcac.catalog.domain.request.CatalogItemProvisioningRequest",
"catalogItemId": "c562a66a-c896-489e-be8c-c4e3520ee943",
"requestedFor": "APIUser-DOM-112@vsphere.local",
"businessGroupId": "d534df1e-67e0-42fd-bd2c-9c27cffb26ea",
"description": null,
"reasons": null,
"data": {
"AZ": "Salle 4",
"backupLabelsSelected": null,
"backupPlanned": null,
"cactusGroupName": null,
"cactusGroupNames": null,
"cactusType": "Classique",
"clientEntity": null,
"cloudInitData": null,
"codeBasicat": "UWU",
"commentaire": null,
"cos": "Standard",
"cpu": 2,
"diskData": 40,
"customRole": "as00",
"customRoleValue": null,
"domainType": null,
"instanceType": "b1",
"lease": null,
"leaseUnlimited": null,
"module_applicatif": "PALL",
"networkPlacement": "GIN",
"usage": "Développement",
"operationReady": null,
"predefinedRole": "as00",
"ram": 8,
"region": "Normandie",
"role": "as00",
"searchBasicat": null,
"searchSecurityGroupName": null,
"securityGroupName": "SGIC-DOM-112",
"serverType": null,
"supportEntity": null,
"typeServerFullName": null,
"typeServeur": null,
"useCloudInit": null,
"vmSuffix": "dv",
"vmType": null
}
}'

----------

Response:

-----------

General error occurred while attempting to execute workflow with id 'd6d9187e-9fdd-4dcc-a1e6-03daa2266d6b', for WorkflowRunState 'f2077e6a-f0d7-4418-b812-588828f2ed93'. Error '400 '. Cause 'Cannot execute workflowId 'd6d9187e-9fdd-4dcc-a1e6-03daa2266d6b' for Workflow run request 'f2077e6a-f0d7-4418-b812-588828f2ed93'. Error details: 2 error(s) found: [ { Utilisation - This field is required. } { Taille du disque de données (Go) - This field must be equal to or lower than -1.0 } ]'. Check the logs for more details.

-----------

 

The diskData and usage parameters are already set so what is the issue here ?

I'm using VRA 7.5

 

Please help.

 

Regards.

0 Kudos
0 Replies