Skip to main content
All CollectionsKnowledge BaseDruva Cloud PlatformHow To - Druva Cloud Platform
How to access DCP APIs using the Postman application
How to access DCP APIs using the Postman application
Updated over a week ago

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:


๐Ÿ“ 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,

    • To fetch the device mapping list, use the following link:
      โ€‹https://apis.druva.com/insync/endpoints/v1/devicemappings

    • To fetch the device information, use the following link:
      โ€‹https://apis.druva.com/insync/endpoints/v1/devices/deviceID

    • Refer to the following article for all APIs:

      โ€‹https://developer.druva.com/reference
  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 following url

      https://apis.druva.com/token
    • 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.

See also

Did this answer your question?