Druva offers MSP REST APIs to use our products more efficiently by integrating them with third-party software applications and services that are used within your organization. REST APIs offered by Druva can be used to automate certain workflows and could also be used to get information from Druva products and feed into another tool or application to build reports, run analytics, and perform actionable functions from it.
The API integration process involves creating the API credentials from Managed Services Center (MSC) portal and using these credentials to authenticate the third-party applications. API credentials required for authentication can be managed from MSC portal.
As a MSP administrator, you can create and manage API credentials from the MSC portal.
Detailed information is available at the Developer’s Documentation Portal -https://developer.druva.com.
API Integration Workflow
The following steps are involved to authenticate third-party applications and services to access Druva MSP REST APIs:
- Generate Client ID and Secret Key from the MSC portal. For more information, see Create and Manage API Credentials.
- Druva supports OAuth 2.0 Client Credentials Grant Type.
- The Client ID and Secret Key have access to all the Scopes by default. Currently, Druva does not support any specific scopes.
- Authenticate the third-party application using the Client ID and Secret Key through OAuth 2.0 with Grant Type set to Client Credentials. For more information, see Authentication.
- A successful authentication generates an access token that is valid for 15 minutes.
- Every API call which is made to Druva MSP APIs requires a valid access token.
- Upon successful authentication, MSC portal provides the necessary information from applicable products, based on the nature of the API.
Security and authentication
Druva supports OAuth 2.0 protocol of authentication and authorizations. OAuth is an open protocol for token-based authentication and authorization on the internet. For more information on OAuth 2.0, see the OAuth website.
Create and Manage API Credentials
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 user name and password.
As a MSP administrator, you can create and manage API credentials from the MSP portal. As a MSP administrator, you can also provide these API credentials to the developers within your organization to integrate various applications, tools, services, scripts with Druva.
This article provides instructions to create and manage API credentials.
Only MSP administrators can create and manage API credentials.
Manage API Credentials
- Log in to the Managed Services Center (MSC) portal.
- On the main menu of the MSC portal, click the icon. The Settings page appears.
- On the Settings page, click API Credentials.
You see the following page when you access the API Credentials.
You can perform the following actions over the API Credentials page:
On the API Credentials page, perform the following steps to create new credentials:
- Click New Credentials. The New Credentials window appears.
- Provide a name for the credential.
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.
- Click Save. The Credential Details window appears.
- Click the icon to copy the auto-generated Client ID and Secret Key to the clipboard.
Client ID and Secret Key are equivalent to user name and password. One can access all the Druva MSP APIs and in turn, access your data stored within Druva products. Client ID and Secret Key must not be shared with unauthorized sources.
- Secret Key is required to authenticate third-party applications to generate the access token.
- You need to generate a new Secret Key for the associated credential if you do not copy the Secret Key as per step 4.
- API usage and activities can be tracked through audit trails. The audit trails display the API credential details, target APIs, and user details along with the time of usage.
- Refer API integration workflow, to learn more about the workflow.
In case the Secret Key is lost, stolen, or you failed to copy at the time of generating New Credential, you must generate a new Secret Key.
- If you generate a new Secret Key for the API credential which is currently in use, all the active tokens associated with the old Secret Key along with the old Secret Key will be revoked.
- Any subsequent call request for authentication using the old Secret Key will not authenticate and will receive an unauthorized exception as a response. Integrations using the old API credentials will start failing unless they are updated with the new Secret Key.
On the API Credentials page, perform the following steps to generate new Secret Key:
- Click on the credential name for which you intend to generate a new secret key.
- Click more options button and select Generate New Secret Key.
- On the confirmation window, click Continue to generate new Secret Key.
- Click icon to copy the auto-generated Client ID and Secret Key to the clipboard.
On the API Credentials page, perform the following steps to rename existing credentials:
- Click on the credential name which you intend to rename.
- Click the Edit button. The Edit Credentials window appears.
- Type a new name for the selected credential.
- Click Save.
Deleting the credential will result in immediate termination of all the active tokens made through that credential. All subsequent calls using this credential will receive an unauthorized exception as the response.
On the API Credentials page, perform the following steps to delete credentials:
- Click on the credential name which you intend to delete.
- Click more options button and select Delete Credential.
- On the confirmation window, click Delete to delete the credential.