How to find start and end times for resource deployments using the VCF Automation API
search cancel

How to find start and end times for resource deployments using the VCF Automation API

book

Article ID: 445018

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • When you deploy resources or catalog items through VCF Automation, you might need to determine average provisioning times to populate performance metrics into an external service dashboard. You can calculate the exact elapsed provisioning time for any successful deployment by programmatically extracting tracking timestamps via the platform's infrastructure API.

Environment

  • VMware Cloud Foundation Automation (VCF Automation) 9.x

Cause

  • VCF Automation tracks infrastructure lifecycle events natively. The orchestrator records exact timestamps for both the initial request submission and the final execution state, embedding these parameters directly inside the tracking metadata schema of the deployment object.

Resolution

To successfully fetch these metric details, you must first generate an API authorization bearer token and then query the targeted deployment endpoint.

Step 1: Obtain a Bearer Token for API Authorization

A. Open the Developer Tools

  • Log into your VCF Automation UI via Google Chrome, Mozilla Firefox, or Microsoft Edge.

  • Press F12 (or right-click anywhere on the page and select Inspect) to open the Developer Tools pane.

  • Navigate to the Network tab.

B. Capture an API Traffic Request

  • Perform an action within the UI (such as clicking on a project, viewing a deployment, or refreshing the catalog) to trigger background network traffic.

  • In the Network tab's filter/search box, type api or forms to isolate API communication.

C. Copy the Bearer Token

  • Click on any captured API row item (for example, an execution or configuration fetch request).

  • Go to the Headers tab inside the request details sub-pane.

  • Scroll down to the Request Headers section.

Locate the Authorization header.

Step 2: Query the Deployment Endpoint

Once you have copied the token, configure Postman to query the deployment record.

  1. Open a second request tab in Postman.

  2. Set the HTTP method dropdown to GET.

  3. Enter the target deployment resource URL, replacing <deploymentId> with your specific deployment tracking ID:

    Plaintext
     
    https://<VCFA_FQDN>/deployment/api/deployments/<deploymentId>
    
  4. Navigate to the Authorization tab directly below the URL bar:

    • Set the Type dropdown to Bearer Token.

    • Paste the copied access token string into the Token field on the right side.

  5. Click Send.

Step 3: Extract and Calculate Deployment Duration

Review the JSON payload returned in the Postman response body pane to locate the following tracking timestamps:

  • createdAt: The exact date and time the resource provisioning task was initialized (Start Time).

  • lastUpdatedAt: The exact date and time the resource provisioning task achieved its final resolved state (End Time).

Subtract the createdAt timestamp value from the lastUpdatedAt timestamp value within your environment metric scripts to determine the total duration taken to finish the deployment workflow.