VMware Data Services Manager is a data-as-a-service toolkit for on-demand provisioning and automated management of PostgreSQL and MySQL databases on vSphere environment. The OpenAPI-compliant VMware Data Services Manager REST API enables you to automate provisioning, management, and monitoring of the data services running in your installation.
All interactions between the VMware Data Services Manager console and your deployment occur through the API. You can also perform those actions directly using the VMware Data Services Manager REST API.
VMware Data Services Manager restricts access to the API endpoints based on the role of the user authenticating with the service (Provider Administrator, Organization Administrator, or Organization User).
This information is intended for a user that expects to utilize the VMware Data Services Manager REST API to automate tasks in their VMware Data Services Manager installation. Familiarity with the following concepts and tools is suggested to get the most out of this guide:
You can access the VMware Data Services Manager REST API documentation from VMware code or directly from the console.
To access the API docs from your VMware Data Services Manager installation:
Log in to the VMware Data Services Manager console.
Enter the following URL in a new browser tab:
https://<provider-ip-address>/swagger-ui.html
The Swagger-integrated, VMware Data Services Manager interactive API console opens.
The VMware Data Services Manager REST API includes the following categories of endpoints:
API Definition Name | Description |
---|---|
Appliance | APIs for operations on the Provider VM (certificates, health, logs, root password update). |
Authentication | API for authenticating with VMware Data Services Manager. |
Monitoring | APIs for fetching environment and database metrics. |
Provider | APIs for fetching and managing: system settings, VM plans, organizations, users, environments, database templates, log bundle generation; APIs for managing databases. |
Update Manager | APIs to manage Provider software updates. |
If you are logged in to VMware Data Services Manager, you can invoke the API directly from the API reference documentation.
VMware Data Services Manager 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 VMware Data Services Manager 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, VMware Data Services Manager:
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.
Accept
header to
application/vnd.vmware.dms-v1+json
along with the
Authorization
header as the bearer token of the logged in user and the
X-Org-ID
header as the organization ID. For example, use the following command:
{
curl -X 'GET'
'https:// [provider-ui-ip] / [API]'
-H 'accept: application/vnd.vmware.dms-v1+json'
-H 'Authorization: '
-H 'X-Org-ID: '
}