Learn about and experiment with the DPA API

The DPA API is documented in the Swagger interface. Use this interactive interface to explore the available API endpoints and try out API calls.

You can also see examples of Python and PowerShell scripts that call the DPA API.

Access the DPA API documentation and get authorization to make API calls

You can access the URL and review the DPA API documentation without being authorized to make API calls. However, an access token is required to make API calls. Complete the following steps to access the API documentation and authenticate with an access token.

  1. Create a new refresh token and copy it to the clipboard, or copy an existing refresh token that your organization has stored in a secure location.
  2. On the DPA menu, click Options.

  3. Under Support > Utilities, click Management API Documentation.

    The Swagger interface opens.

  4. Use the refresh token to obtain an access token:
    1. Click Access Token to expand it.

    2. Click Post to expand that section.
    3. Click the Try it out button.
    4. Paste the refresh token value you copied in step 1 into the refresh_token box.

    5. Click Execute.

    6. Copy the access token from the Response body.

  5. Authenticate with the access token:

    1. In the upper-right corner, click Authorize.

    2. In the Available authorizations dialog, type bearer followed by a space, and then paste the access token.

    3. Click Authorize.

      If the authorization is successful, the following dialog is displayed.

    4. Click Close.

      You can now use the Swagger interface to learn about and execute the available API commands.

View the DPA API documentation

The Management API spec provides detailed information about each API endpoint. Endpoints are grouped by function.

  1. Click any group to display the endpoints within it.

  2. Click the endpoint to display its parameters and responses.

    Complex parameters and responses include an Example Value | Model section. The example value is shown by default.

  3. Click Model to display additional information, including the valid values for enumerations.

Make an API call from the Swagger interface

The following example shows how to make a call to get the current license allocation for a monitored database instance.

When you make an API call through the Swagger interface, the call affects your DPA server in the same way as it would if it were issued through a command or script.

  1. If you do not know the database ID, complete the following steps to get it:
    1. Click Database Monitor to display the endpoints.
    2. Click GET/databases/monitor-information to expand it.

    3. Click Try it out, and then click Execute.
    4. Scroll through the Response body, find the database name, and make a note of the associated ID.

  2. Click License Allocation to display the endpoints.
  3. Click the GET/databases/{databaseId}/licenses endpoint to expand it.

  4. Click Try it out.

    The interface displays a field for the parameter value and an Execute button.

  5. Enter the database ID and click Execute.

    The Response body section shows the response from the DPA server, and the Curl section shows the Curl command (including the access token) that could be run to make this API call.