Start a Conversation

Unsolved

1 Rookie

 • 

4 Posts

575

August 5th, 2023 00:00

Getting Started with PPDM REST API using Postman Collections

Getting Started with PPDM REST API using Postman Collections

Introduction

In today's rapidly evolving landscape of data management, the integration of automation has emerged as a pivotal element in optimising processes and elevating operational efficiency. Dell's PowerProtect Data Manager (PPDM) offers a robust and versatile REST API that empowers solution architects and developers to harness the full potential of automation for a wide range of use cases. This comprehensive guide delves into the realm of Dell PPDM automation using Postman collections -- a powerful tool for simplifying API exploration, testing, and integration. Through this article, you will gain insights into the intricacies of Dell PPDM automation and learn how to leverage Postman to develop custom portals and dashboards.

If you're a proficient backup administrator or an experienced developer seeking to implement automation through PPDM's REST API, this article is customised to furnish you with essential insights on accomplishing your goals, including guidance on which API calls to execute, the resulting output, and key aspects to focus on for a particular use case you are interested in.

Prerequisites:

Before embarking on your journey to Dell PPDM automation using Postman, ensure that you have the following prerequisites in place:

  1. Functional Dell PowerProtect Data Manager (PPDM) Instance: Ensure that you have a fully operational PPDM instance accessible via a designated URL.

  2. Postman Application: Download and install the Postman application—a versatile and industry-standard API testing and automation tool, offered at no cost.

 

Step-by-Step Guide:

1. Obtain PPDM API Access Credentials:

To initiate interactions with the PPDM API, the first step necessitates the acquisition of API access credentials, namely a username and password, from your PPDM instance. These credentials will serve as the authentication mechanism for your API requests.

2. Import the Postman Collection and Environment:

Begin by downloading the pre-constructed Postman collection from GitHub repository. Import the collection into Postman by selecting the "Import" button and subsequently importing both the collection and environment files.

3. Configure Environment Variables:

Effectively configuring environment variables tailored to your specific PPDM environment is imperative. Variables encompassing PPDM server IP addresses, user credentials, passwords, vCenter details, and any other pertinent parameters should be updated. Review the list of variables and ensure each is appropriately amended to reflect your environment.

4. Navigate through the Collection:

Within the imported Postman collection, an array of API endpoints awaits your exploration. Organised into distinct folders, each folder corresponds to a unique resource type. These folders house an assortment of endpoints pertinent to the given resource type. Importantly, these API calls are pre-configured with requisite parameters, headers, authorization, filters, and request bodies.

5. Execute Requests:

Equipped with correctly configured environment variables and headers, you are poised to execute individual API requests from the collection. Your journey begins with the login request, a pivotal step in securing an authentication token. Subsequent requests hinge on the presence of this authentication token, thus reinforcing its significance. Gradually, you will advance to more intricate operations, such as initiating backups or orchestrating restores.

 

An Example of an API Call:

1. Authenticate with PPDM, Obtain an Authentication Token, and Retrieve Asset Listings:
  • Within the collection, expand the "Login and Get a Token" section. Execute the included POST request, wherein the provided variables fuel the API call to PPDM. The ensuing screenshot offers visual guidance.

 

DellRaghava_2-1691213137997.png

 

  • This API call facilitates token retrieval, subsequently updating the "authToken" variable. The precise mechanics are discernible within the "Tests" tab of the request. The subsequent endeavor entails accessing the asset list. The ensuing screenshot encapsulates the details of this API request

 

DellRaghava_3-1691213431699.png

  • The JSON output resulting from the "Get All Assets" request is both informative and versatile. In the exemplified case, the output encompasses 269 elements, each presented as a dictionary replete with comprehensive asset details. These details serve as a foundation for diverse applications, ranging from database storage to subsequent processing and action execution. The element "rj_sqlsrv" shows and explains all the different properties you can use and how they can be useful

 

DellRaghava_0-1691215843471.png

Use Cases:

Several use cases are available, including self-service functions such as backup, restore, and client registration, retrieving alerts from PPDM to transmit them for external ticketing, capturing backup activity statistics in a database for comprehensive reporting and dashboards, along with numerous other potential applications.

This collection encompasses 11 distinct use cases, meticulously crafted to showcase the full range of API capabilities. Developers can leverage these predefined calls to expedite the development of automation scripts

 

DellRaghava_1-1691216222308.png

 

Now, we will delve into the intricacies of use case 7: the process of restoring a VM backup to create a new virtual machine. This particular illustration involves a sequence of 10 API calls. These calls collectively retrieve essential asset details, backup copies, vCenter information, and other pertinent details, culminating in the final call (#10). For visual reference, refer to the following screenshot

 

DellRaghava_2-1691216761139.png

 

 

{
    "description": "Restore VM to New",
    "copyId": "{{copy-id}}",
    "restoreType": "TO_ALTERNATE",
    "restoredCopiesDetails": {
      "targetVmInfo": {
        "inventorySourceId": "{{vcenter-id}}",
        "vmName": "New-vm-RESTAPI-restored",
        "dataCenterMoref": "{{datacenterMoref}}",
        "clusterMoref": "{{clusterMoref}}",
        "hostMoref": "{{hostMoref}}",
        "dataStoreMoref": "{{dataStoreMoref}}",
        "vmPowerOn": false,
        "vmReconnectNic": false
      }
    }
  }

 

 

 

In summary, the information presented emphasises how the API-driven approach discussed here offers flexibility and robustness. The diverse use cases, spanning from self-service functions to governance and compliance reports, showcase the wide range of applications facilitated by this postman collection. The thoughtfully designed set of 11 unique use cases serves as evidence of the API's capabilities, equipping developers with a comprehensive set of tools for creating automation scripts. By closely examining the detailed process of a specific use case, we've gained insight into the organised structure of API calls and their capacity to coordinate intricate tasks. This methodology not only streamlines operations but also empowers data protection teams to enhance efficiency and foster innovation in their technological pursuits.

14 Posts

February 28th, 2024 21:24

Awesome introduction! I am looking for a way to bulk edit protection rules. Any suggestions please ? Thanks.

Top