This site will be decommissioned on December 31st 2024. After that date content will be available at techdocs.broadcom.com.

Data Management for VMware Tanzu is a data-as-a-service toolkit for on-demand provisioning and automated management of PostgreSQL and MySQL databases on vSphere infrastructure. The OpenAPI-compliant Data Management for VMware Tanzu REST API enables you to automate provisioning, management, and monitoring of the data services running in your DMS installation.

All interactions between the Data Management for VMware Tanzu console and your DMS deployment occur through the API. You can also perform those actions directly using the Data Management for VMware Tanzu REST API.

DMS restricts access to the API endpoints based on the role of the user authenticating with the service (Provider Administrator, Organization Administrator, or Organization User).

Audience

This information is intended for a user that expects to utilize the Data Management for VMware Tanzu REST API to automate tasks in their Data Management for VMware Tanzu installation. Familiarity with the following concepts and tools is suggested to get the most out of this guide:

  • Concepts related to RESTful APIs.
  • Swagger open-source tools.

Accessing the API Reference Documentation

You can access the Data Management for VMware Tanzu REST API documentation from VMware code or directly from the console.

To access the API docs from your Data Management for VMware Tanzu installation:

  1. Log in to the Data Management for VMware Tanzu console.

  2. Enter the following URL in a new browser tab:

    https://<provider-ip-address>/swagger-ui.html
    

The Swagger-integrated, Data Management for VMware Tanzu interactive API console opens.

About the REST API Definitions

The Data Management for VMware Tanzu REST API includes the following categories of endpoints:

API Definition Name Description
Appliance APIs for operations on the Provider VM (high availability, certificates, health, logs, root password update).
Authentication API for authenticating with Data Management for VMware Tanzu.
Monitoring APIs for fetching infrastructure and database metrics.
Provider APIs for fetching and managing: system settings, instance plans, organizations, users, environments, templates, log bundle generation;
APIs for managing Service Instances.
Update Manager APIs to manage Provider software updates.

Invoking the API

If you are logged in to Data Management for VMware Tanzu, you can invoke the API directly from the API reference documentation.

DMS uses a JSON Web Token (JWT) and an organization identifier as keys for securing access to the API endpoints. You initially obtain these components by authenticating to the /provider/session endpoint with your Data Management for VMware Tanzu credentials.

Request:

POST https://<provider-ip-addr>/provider/session

Request body:

{
  "email": "your_login_username",
  "password": "your_login_password"
}

If you successfully authenticate with the API, Data Management for VMware Tanzu:

  • Returns the Bearer token in the authorization response header. Sample response header:

      access-control-allow-origin: *  
      access-control-expose-headers: X-Requested-With,Content-Type,Authorization,Origin,Accept,Access-Control-Request-Method,Access-Control-Request-Headers,Access-Control-Expose-Headers,Content-Disposition,X-Org-ID  
      authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJsaXNhQGNhbXBhaWducy5jb20iLCJzY29wZXMiOlsiOWJlNmYwZmUtMTNhZS00YWEwLTkwYTItM2ViODZiODZmZTM4Ok9SR19BRE1JTiJdLCJpYXQiOjE2MjQ1NzE0NDEsImV4cCI6MTYyNDU4OTQ0MX0.OR2TRuCSLYb_IF4gQ6RFSHqG-cH0m1xR19NjhnsgzHE  
      cache-control: no-cache,no-store,max-age=0,must-revalidate  
      connection: keep-alive 
      ...
      
  • Returns the orgId in the response body. Sample response body:

      {
        "firstName": "lisa",
        "lastName": "localuser",
        "contactNumber": null,
        "email": "[email protected]",
        "orgMemberships": [
          {
            "orgId": "9be6f0fe-13ae-4aa0-90a2-3eb86b86fe38",
            "companyName": "campaigns",
            "email": "[email protected]",
            "roles": [
              "ORG_ADMIN"
            ]
          }
        ]
      }
      

When you Authorize in the Swagger interactive API console, you provide the response Bearer token in the bearer-key value, and the response orgId in the orgHeader (apiKey) value. Swagger then adds each of these keys to a separate authentication header, and includes these headers in every API call that you make.

check-circle-line exclamation-circle-line close-line
Scroll to top icon