Skip to main content

How can we help you?

Druva Documentation

How to access DCP APIs using the Postman application

Overview

This article helps you to consume Druva Reporting APIs using the Postman application. You can achieve specific use cases apart from the existing reports available on the Druva Cloud Platform Console (DCP). For example, you can trigger APIs to fetch information in reports in addition to the details that Phoenix provides. You can access APIs using the following two steps:

  1. Create API Credentials
  2. Access the DCP APIs through the Postman application

Note: Postman application is being used for demonstration purposes only. You can use any other application or scripting language to execute the API calls.

This article describes how to use the DCP APIs to run the reports.

Step 1: Create API Credentials

Review the following points:

  • Third-party applications and tools can access Druva REST APIs only if the third-party applications and tools are successfully authenticated using API credentials. The API credential is a combination of the Client ID and Secret Key and is equivalent to that of a username and password.
  • As a Druva Cloud Administrator, you can create and manage API credentials from the Druva Cloud Platform Console. As a Druva Cloud administrator, you can also provide these API credentials to the developers within your organization to integrate various applications, tools, services, scripts with Druva products. 
  • inSync stores the authentication information in the database that is encrypted with the ekey of your organization. Whenever you request to access the API, you must specify the username and the password.

Procedure

Perform the following steps to obtain the API Credentials (Client ID and Secret Key)

  1. Click the Druva logo Druva_Icon.png > Druva Cloud Settings.
  2. On the Settings page, click API Credentials.
    The API Credentials page appears.
  3. Click New Credentials.
    The New Credentials window appears.
  4. Provide a name for the credential.

    Note: For ease of recognizing the credential name, it is recommended to name the credential so that it matches the name of the application or tool that you intend to integrate with Druva products.

  5. Click Save and you will get your new credentials, the Client ID and the Secret Key.

Ensure that you keep the Client ID and the Secret Key safe and saved at another location as a backup.

Step 2: Access the DCP APIs through the Postman application

DCP uses basic authentication, which requires you to provide your Client ID and Secret Key (created in Step 1) to authenticate each API request.

You need to fetch report data and store it in a local database. You can consume this stored data by integrating with third-party Business Intelligence (BI) tools, and generate reports and get data insights.  We are going to use the Postman app, as an example, for simplicity.

Note: You can any other application as per your requirement.

Procedure

  1. Download and install the Postman application from the following link:
    https://www.postman.com/downloads/
  2. Launch the Postman application.
  3. Now, based on your use case, you can select the GET query. For example,
  4. Let’s go with the listing device mappings details, to fetch details, use the command in the above format as GET Query in Postman application:
  5. Click on the Authorization tab and select Type as OAuth 2.0, and click Get New Access Token.
  6. Click Get New Access Token. The GET NEW ACCESS TOKEN window appears.
  7. Enter the following details:
    • Token Name: Specify a name to the token.
    • Access Token URL: Specify the  https://apis.druva.com/token URL.
    • Client ID: Enter the Client ID generated in Step 1.
    • Client Secret: Enter the Secret Key generated in Step 1.
  8. Click Request Token.  A new window to use the token appears as shown in the following screenshot:
  9. Click Use Token.
  10. You can now view the token generated in the Get list.
  11. Click Send. The expected output or status is 200 OK.
  12. As per the previous screenshot, you found 9 mappings in this instance. The output is in the JSON format. You can also view the output in the XML, HTML, and Text formats.
  13. After you verify the output using the Postman application, you can use an internal tool to work with a JSON file or convert it into a CSV format using online tools.