Skip to main content

 

Druva Documentation

Using Report APIs

inSync Private Cloud Editions: File:/tick.png Elite File:/tick.png Enterprise

inSync requires you to follow these steps to consume the Report APIs,

Step 1: Obtain authentication information

Step 2: Access Report APIs through script

Obtain authentication information

Overview

inSync uses HTTP Basic authentication for API requests. inSync Server administrator can create the authentication information from the inSync Master Management Console.

The authentication information consists of the following components:

  • Username: Email ID of the inSync Server administrator who creates the authentication token.
  • Password: Authentication token that is generated.

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

To obtain the authentication information:
  1. Log on to the inSync Master Management Console as an inSync Server administrator.
  2. On the inSync Master Management Console menu bar, click  > Settings. The Settings page appears.
  3. Click the Access Token tab. The Access token for inSync APIs page appears.
  4. If the token is valid, then click Copy Token. The token is copied to your clipboard.

    Note: The Copy Token button is available only when the authentication token is valid.

  5. If the token has expired, then click Create New Token and run the following steps:

    Note: You can create a new token even if the existing token is valid, if you feel that the token is compromised. For example, stolen.

    1. In the Expire on field, specify the expiry date of the authentication token.

      Note: By default, the token is valid for 30 days. The token's expiry date can be anywhere between 1 day to 30 days. 

    2. Click Done.
  6. Copy the token and retain it for requesting access to the API.

Access Report APIs through script

inSync uses basic authentication, which requires you to provide your username and password to authenticate each API request.

Run the following request query to access the desired Report API:

requests.get('https://<IP address or FQDN of inSync Server>/api/reports/v1/<API-name>', auth=('Username', 'Password'))

where,

Sample Header Request for APIs

  • Request: GET /api/reports/v1/<API-name> HTTP/1.1
  • Host: IP address or FQDN of your inSync Server.
  • Authorization: Basic authentication
  • Was this article helpful?