Migrate to new API Gateway

Overview

Druva offers APIs to enable the integration of other applications with Druva products. Druva initially introduced APIs for a small set of features in Druva Endpoints and Data Governance that enabled applications to consume data from Endpoints and Data Governance Legal Hold, Reports, and Events.

Druva has recently released a large set of APIs for its products - Endpoints and Data Governance and Hybrid Workloads. These APIs expose extensive product functionalities that could be leveraged for automating and reporting workflows either via third-party integrations or via stand-alone REST API calls.

The new APIs are offered over the new API Gateway that is designed to offer you more secure access to data with Druva and interact with it using APIs. This article lists the changes and instructions to migrate from the​ earlier version of APIs to the latest version.

To whom does this article apply to?

This article applies to Druva customers who are currently using the following APIs:

API versionsAPI Endpoint
Endpoints and Data Governance Reports APIs v1, v2, and v3https://insyncapi-cloud.druva.com/api/reports
Endpoints and Data Governance Legal Hold APIs v1 and v2https://insyncapi-cloud.druva.com/api/legalhold
Endpoints and Data Governance Events API v1https://insyncapi-cloud.druva.com/api/events

What has changed with new APIs?

With the introduction of new APIs, Druva has made the following updates to enable customers or applications integrate with APIs in a secure and seamless manner.

  • Authentication is common across products and has a new URL -https://apis.druva.com/token. All the requests to Druva APIs are authenticated using OAuth 2.0 access token.
  • New common URL to access APIs for all Druva products - https://apis.druva.com. Product-specific APIs are classified as follows:
  • Under each product, the APIs have been identified and grouped based on specific use-cases such as ‘User Management’, ‘Profile Management’, ‘Storage Management’, ‘Legal Hold’, ‘Event Management’, and so on.

For the entire list of available product-wise APIs, see the API Reference tab.

What should I do to use new APIs?

If you have configured applications to consume data using the earlier version of Druva APIs, you need to update their configuration for the following -

  • Update URL to access APIs
  • Update credentials to use the OAuth 2.0 Access token for authentication. To know more about Access token, see FAQs.
  • Update your older API scripts to hit the new API endpoints. Since the response parameters vary considerably in the new API endpoints, in most cases, you might have to perform multiple API calls and merge those results if you are looking for exactly the same responses that you were getting with your older APIs. Kindly refer this section here for detailed mapping of response parameters in old and new APIs and steps to get required response parameters.

Are there any sample scripts to help with migration to the new API Gateway?

Yes. Druva provides sample scripts using which you can migrate to the new API Gateway. For more information, see Sample scripts.

Whom do I contact for more information?

For any queries or concerns about API migration, kindly submit a case with Druva Support.

Mapping of response parameters in old vs new APIs

This section maps the response parameters in old vs new APIs. It also lists the steps that the customers need to follow in-order to get the equivalent information from the new API endpoints under the Druva API gateway.

📘

Note

  • There is no change in the response parameters or schema for the following APIs:
    • Legal Hold APIs
    • Event API
  • Few response parameters that are returned in old Reporting APIs are not available in the new APIs.
  • Additionally, the following old APIs are currently not available with the new API Gateway:
    • First Backup Details API
    • Share Details API
    • Restore Details API

We are continuously working on enhancing the new APIs to add information based on the feedback and use-cases.

Mapping
Old API Name - User List API (https://insyncapi-cloud.druva.com/api/reports/v3/users)
New API Name - List all users (https://apis.druva.com/insync/usermanagement/v1/users)

Old response parametersNew response parameters
user_nameuserName
email_idemailID
added_onaddedOn
user_statusstatus
allocated_quotaquota
user_iduserID
Not availableprofileID
Not availablestorageID
storage_usageTo get the storage usage of a user,
1. Call the List all users API and record the userID parameter value of the user.
2. Call the List all devices API and use the userID parameter to get the list of all the devices associated with a user. Record the deviceID for every device.
3. For every device, call the Get Device Information API and use the deviceID to fetch the record of the totalBackupData.
4. Perform sum of all the totalBackupData for all the devices of the user.
profileTo get the profile name associated with a user,
1. Call the List all users API and record the profileID parameter value.
2. Call the Get Profile Information API and use the profileID value to get the profile name.
storageTo get the storage name associated with a user,
1. Call the List all users API and record the storageID parameter value.
2. Call the Get Storage Information API and use the storageID to get the storage name.

Old API Name - Device List API (https://insyncapi-cloud.druva.com/api/reports/v3/devices)
New API Name - List all devices (https://apis.druva.com/insync/endpoints/v1/devices)

Old response parametersNew response parameters
device_namedeviceName
device_statusdeviceStatus
client_versionclientVersion
OS_platformplatformOS
last_upgrade_onlastUpgradedON
device_OSdeviceOS
Upgrade_stateupgradeState
added_onaddedON
total_backup_datatotalBackupData
serial_numberserialNumber
uuiduuid
user_iduserID
device_iddeviceID
system_settings_backed_upTo get the System Settings Backed Up value for a device,
1. Call the List all Devices API and record the deviceID value of each device.
2. For each device, call the List endpoint backups API using deviceID as a query parameter. It returns the systemSettingsBackedUp field which specifies whether the system settings were backed up as part of the backup.
email_idTo get the email address of the user associated with a device,
1. Call the List all Devices API and record the userID of the user.
2. Call the Get user information API using the userID as a query parameter to get the email address of the user.
first_backup_statusCurrently not available
first_backup_sizeCurrently not available

Old API Name - Last Backup Details API (https://insyncapi-cloud.druva.com/api/reports/v3/lastbackupdetails)
New API Name - List Endpoint Backups (https://apis.druva.com/insync/endpoints/v1/devices)

Old response parametersNew response parameters
last_backup_statusbackupStatus
bytes_transferredbytesTransferred
files_missedfilesMissed
files_backed_upfilesBackedup
system_settings_backed_upsystemSettingsBackup
backup_start_timestartTime
backup_end_timeendTime
device_iddeviceID
email_idTo get the email address of the user,
1. Call the List Endpoint Backups API and record the deviceID of the user.
2. Call the Get Device Information API using the deviceID as a query parameter. Record the userID parameter of the user.
3. Call the Get user information API using the userID as a query parameter to get the email address of the user.
device_nameTo get the device name,
1. Call the List Endpoint Backups API and record the deviceID of the user.
2. Call the Get Device Information API using the deviceID as a query parameter to get the deviceName in response.
backup_datasnapshotSize
OS_platformTo get the OS platform details,
1. Call the List Endpoint Backups API and record the deviceID of the user.
2. Call the Get Device Information API using the deviceID as a query parameter to get the platformOS in response.
serial_numberTo get the serial number of the device,
1. Call the List Endpoint Backups API and record the deviceID.
2. Call the Get Device Information API using the deviceID as a query parameter to get the serialNumber in response.
uuidTo get the uuid of the device,
1. Call the List Endpoint Backups API and record the deviceID.
2. Call the Get Device Information API using the deviceID as a query parameter to get the uuid in response.
last_connectedTo get the last connected time of the device,
1. Call the List Endpoint Backups API and record the deviceID.
2. Call the Get Device Information API using the deviceID as a query parameter to get the lastConnected time in response.
user_idTo get the userId of the user,
1. Call the List Endpoint Backups API and record the deviceID.
2. Call the Get Device Information API using the deviceID as a query parameter to get the userID in response.

Old API Name - Cloud Storage Details API (https://insyncapi-cloud.druva.com/api/reports/v3/storages)
New API Name - Get Storage Information (https://apis.druva.com/insync/storagemanagement/v1/storages/)

Old response parametersNew response parameters
storage_nameStorage Name
total_size_of_backed_up_filestotal_size_of_backed_up_files
storage_usageStorage Usage
no_of_usersCurrently not available

Old API Name - CloudCache Details API (https://insyncapi-cloud.druva.com/api/reports/v3/cloudcachedetails)
New API Name - Get CloudCache Server Information (https://apis.druva.com/insync/storagemanagement/v1/cloudcaches)

Old response parametersNew response parameters
cloudcache_namecloudCacheName
total_cache_sizetotalCacheSize
cache_usagecacheUsage
no_of_usersCurrently not available
no_of_users_for_restoreCurrently not available

Old API Name - Inactive Devices API (https://insyncapi-cloud.druva.com/api/reports/v3/inactivedevicesdetails)
New API Name - N.A. - Currently, the information can be aggregated by combining multiple API calls.

Old response parametersNew response parameters
last_backup_dateTo get the last backup date for a device,
1. Call the ‘List all devices’ API and record the deviceID.
2. Call the ‘List Endpoint Backups’ API and do the following:
Set ‘lastSuccessful’ request parameter value to True*
* Enter the deviceID value recorded in Step 1 in the deviceID parameter.

In the API response, ‘endTime’ response parameter denotes the last time that the device was backed up.
email_idTo get the email address of a user with the associated device,
1. Call the List all devices API and record the deviceID and userID response parameter values.
2. Call the Get user information API using the userID as a query parameter to get the email address of the user.
auto_delete_onCurrently not available
profile_nameTo get the name of the profile associated with a user,
1. Call the List all devices API and record the deviceID and userID response parameter values.
2. Call the Get user information API using the userID as a query parameter to get the profileID associated with the user.
3. Call the Get Profile Information API using the profileID as a query parameter to get the profileName.
user_statusTo get the status of the user account of the associated device,
1. Call the List all devices API and record the deviceID and userID response parameter values.
2. Call the Get user information API using the userID as a query parameter to get the 'status' of the user.
uuidTo get the uuid of a device, call the Get Device Information API using the deviceID query parameter.
last_connectedTo get the information about when the device last connected, call the Get Device Information API using the deviceID query parameter.
device_statusTo get the device status, call the Get Device Information API using the deviceID query parameter.
device_nameTo get the device name, call the Get Device Information API using the deviceID query parameter.
serial_numberTo get the serial number of a device, call the Get Device Information API using the deviceID query parameter.
user_nameTo get the user name of a user with the associated device,
1. Call the List all devices API and record the deviceID and userID response parameter values.
2. Call the Get user information API using the userID as a query parameter to get the 'name' of the user.
user_idTo get user id of a user, call the List all users API.
device_idTo get device id of a device, call the List all devices API.