Introduction

Submitting a Day 2 Action without any knowledge of the request template is a 2-step approach:

GET
Step 1 - Request resource action template

This request is used to get the template for a specific resource action.

Request

curl --location --request GET 'https://{{va-fqdn}}/catalog-service/api/consumer/resources/{{resource-guid}}/actions/{{resource-action-guid}}/requests/customTemplate' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}'

Please Note:
The above mentioned endpoint ../customTemplate is an updated (Swisscom-specific) vRA endpoint that fixes various issues with the official ../template endpoint.

POST
Step 2 - Submit resource action

This is the main action used to trigger a day 2 action. Depending on the resource-action-guid, this api request triggers a different action and requires a different data object.

Request

curl --location --request POST 'https://{{va-fqdn}}/catalog-service/api/consumer/resources/{{resource-guid}}/actions/{{resource-action-guid}}/requests' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
  "data": {
    // Resource action specific - see below
  }
}'

Example Data (JSON)

{
  // Type is mandatory:
  "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
  "data": {
    // The following is different depending on the action:
    "DatabaseName": "testDatabase"
  }
}
This is an information message

Be aware:

Contrary to a resource request, a successful resource actions sends back a 201 response with an empty body. The requestId of the started request (in fact, the entire url to track the request) can be found in the response header's location attribute.

Step 1 is not necessary when the template is already known. The body of step 2 differs depending on the resource action.

The following Data Payload section describes the body parameters for each resource action in further detail.

The started request can in a next step be tracked via portal or API call as described here.

This is an information message

Further Information

You can find further information in the official vRealize Automation Catalog Service API (v7.5)open in new window documentation by VMware.

Last Updated: