API Explorer
API Explorer
Getting Started
Recovery and Reuse Management
Authentication and Authorization
Application Data Management
Asset Management
Compliance
Asset Metadata
Secrets Manager
Cloud Disaster Recovery
Copy Management
Appliance Management
Telemetry Setting
Credentials Management
Storage Management
Discovery
Monitoring
File Level Restore
User Security Management
Inventory Source Management
Licenses Management
Location Management
Log Management
Virtual Machine Data Management
Protection Policies
Remote Service
Search Clusters
Server Disaster Recovery
Upgrade
Whitelist Management

Authentication and making your first call

In this tutorial, you will learn how to do authentication using the PowerProtect Data Manager username and password. Then you will use the authenticated token to make your first call to get basic statistics on integrated storage systems.

Log in to PowerProtect Data Manager

With the UI username and password, you can use the login API to get the access token.

curl --request POST \
  --url https://<your-ppdm-server>:8443/api/v2/login \
  --header 'content-type: application/json' \
  --data '{"username":"<your-user-name>","password":"<your-password>"}'

Sample response:

{
    "access_token": "<access-token>",
    "token_type": "Bearer",
    "expires_in": 28800,
    "jti": "fe9d7333-758c-421c-90f4-fa96caa4ee7d",
    "scope": "aaa",
    "refresh_token": "<refresh-token>"
}

The access token is used in subsequent calls as Bearer token. By default, the token expires after 8 hours. Refresh the token when needed.

Refresh token

To refresh a token, use the token API. The grant_type must be refresh_token, and the scope must be aaa:

curl --request POST \
  --url https://<your-ppdm-server>:8443/api/v2/token \
  --header 'authorization: Bearer <access-token>' \
  --header 'content-type: application/json' \
  --data '{"refresh_token":"<refresh-token>","grant_type":"refresh_token","scope":"aaa"}'

Sample response:

{
    "access_token": "<access-token>",
    "token_type": "Bearer",
    "expires_in": 28800,
    "jti": "9478f8f3-bbeb-4df6-a83f-cb1ee9223a58",
    "scope": "aaa"
}

Get basic storage statistics

Now that you have the access token, you can access all APIs that the authenticated user has privilege to use. The following example uses the storage systems API to fetch basic statistics about integrated storage systems. Set the bearer token in the Authorization header:

curl --request GET \
  --url https://<your-ppdm-server>:8443/api/v2/storage-systems \
  --header 'authorization: Bearer <access-token>'

The response returns a list of storage systems, enabling you to select specific data for further processing.

Log out

To log out of the current session, call the log out API:

curl --request POST \
  --url https://<your-ppdm-server>:8443/api/v2/logout \
  --header 'authorization: Bearer <access-token>'