VMware Tanzu Application Catalog Public API

VMware Tanzu Application Catalog Public API

Manage your VMware Tanzu Application Catalog

How to authenticate

We are going to describe the steps to obtain valid credentials to authenticate against the endpoints of this API.

Generate a CSP API Token

As a prerequisite, you need a CSP API Token with the Service Role "VMware Tanzu Application Catalog". You need only perform this once (and regenerate it before the token expires).

You can generate it in the VMware Cloud Console, in My Account -> API Tokens, by clicking on "GENERATE TOKEN" and selecting the Service Role "VMware Tanzu Application Catalog", choosing the right role.

That will generate an alphanumeric token that you should safely save/store. That token will be the "refresh token" used in next steps.

Obtain an access token

For obtaining an access token you need to send a POST request to CSP API using the API token from the previous step as refresh token:

  
    curl -s -X POST "https://console.tanzu.broadcom.com/csp/gateway/am/api/auth/api-tokens/authorize?refresh_token=CSP_TOKEN"
  

The response JSON will have a property named "access_token". Its value is what you'll need to send as the bearer token to authenticate. By default it expires after 30 min.

  
    {
      "id_token": null,
      "token_type": "bearer",
      "expires_in": 1799,
      "scope": "[...]",
      "access_token": "eyJhbGc[...]",
      "refresh_token": "[...]"
    }
  

Send the access token in the Authorization header

Simply send the access token value in the Authorization header when sending a request to one of the endpoints of the VMware Tanzu Application Catalog API:

  
    curl --location 'https://api.app-catalog.vmware.com/v1/_endpoint_' \
    --header 'Authorization: Bearer _access_token_'
  

Download the API specification

Download the API specification at https://api.app-catalog.vmware.com/v1/api.yml and you can import to your favorite API tool for running the API queries e.g. Postman.