Introduction
Submitting a Day 2 Action without any knowledge of the request template is a 2-step approach:
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.
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"
}
}
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.