Six Million Ways To…
  • About
vRA

vRA : API : Submit a request

by Axel October 22, 2019 No Comments

Several steps :

1 – Get the entitled catalog item id

https://{{fqdn}}/catalog-service/api/consumer/entitledCatalogItems?limit=500&$filter=name eq ‘NAME OF CATALOGITEM’

2 – Get the entitled catalog item request template

https://{{fqdn}}/catalog-service/api/consumer/entitledCatalogItems/9190b30d-9198-4508-aec7-e4f691e69c15/requests/template

{
“type”: “com.vmware.vcac.catalog.domain.request.CatalogItemProvisioningRequest”,
“catalogItemId”: “9190b30d-9198-4508-aec7-e4f691e69c15”,
“requestedFor”: “USER UPN”,
“businessGroupId”: “ea74cead-ccad-425a-84c1-9fe2ae52220c”,
“description”: null,
“reasons”: null,
“data”: {}
}

3 – Create the request

https://{{fqdn}}/catalog-service//api/consumer/entitledCatalogItems/9190b30d-9198-4508-aec7-e4f691e69c15/requests

add json formatted data as per request template

{
“type”: “com.vmware.vcac.catalog.domain.request.CatalogItemProvisioningRequest”,
“catalogItemId”: “9190b30d-9198-4508-aec7-e4f691e69c15”,
“requestedFor”: “USER UPN WHO WANTS TO DO THE REQUEST”,
“businessGroupId”: “ea74cead-ccad-425a-84c1-9fe2ae52220c”,
“description”: null,
“reasons”: null,
“data”: {}
}

Another example with an boolean input:

{
“type”: “com.vmware.vcac.catalog.domain.request.CatalogItemProvisioningRequest”,
“catalogItemId”: “13064d3a-ab47-4835-834c-94fde7dc652a”,
“requestedFor”: “USER UPN WHO WANTS TO DO THE REQUEST”,
“businessGroupId”: “ea74cead-ccad-425a-84c1-9fe2ae52220c”,
“description”: null,
“reasons”: null,
“data”: {
“booleanInput”: true
}
}

Returns a request object in JSON format => Get the id of the new request

4 – Check the request

https://{{fqdn}}/catalog-service/api/consumer/requests/9dcf0f51-c71c-4675-8b61-53d2404e4b0c

=> Check the status of the request in the JSON section

requestCompletion

Warning :

If you modify the workflow behind the XaaS, you will have to republish the catalog item and will have a new catalog item id. You will also have to get the new request template so you can format your json data properly.

APIRESTVRA

  • Previous vRO: Setting constants for workflows3 years ago

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Menu

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Recent Posts

  • vRA : API : Submit a request
  • vRO: Setting constants for workflows
  • VM : Quickly delete one or more VM
  • vRO: Using vRA REST API to get all vCAC VMs
  • vRO : Workflow to Get Restarted VMs by HA

Archives

  • October 2019
  • March 2019
  • March 2018
  • September 2017

Categories

  • CLI (2)
  • ESXi (1)
  • Orchestrator (4)
  • Scripts (3)
    • Powercli (3)
  • vRA (2)
  • vSphere (1)

Tags

API (1) CLI (1) HA (1) Nutanix (1) PowerCLI (1) Reminder (1) REST (1) REST API (1) vCenter (3) VRA (2) VRO (3) vSphere (4)
2023 Six Million Ways To…. Donna Theme powered by WordPress