API User Guide

Dbvisit API Endpoints will help you to integrate Dbvisit Standby with your existing monitoring scripts or with deployment procedures.

There are separate API endpoints for each database platform and for each action (i.e. you don’t pass database platform as request parameter). All API endpoints can be accessed on controlcenter URL:

https://<controlcenter host>:4433/api/v2

Example 1 with curl:

First we need to generate correct username and password string for authorization header:

$ echo -n "admin:admin" | base64 YWRtaW46YWRtaW4==

Next, we can use this string when calling the API endpoint to list configurations (there are no request data required):

$ curl -sk --request POST 'https://czlin0232:4433/api/v2/list' \ -H 'Authorization: Basic YWRtaW46YWRtaW4='

another example with curl to create DDC configuration. This time we need to pass data to request (make sure to use valid license key):

if parameter isn’t specified, Dbvisit will take default value. For example ARCHSOURCE for this APIDDC will be /u01/app/oracle/dbvisit_arch/SLASH

Example 2 with python script:

Example how to run send logs command with python script. Because endpoint /send-logs/oracle accepts configuration ID, we have to first find it. We will re-use our admin/admin Authorization string from the Example 1:

responseSendJson will contain the task id:

The API call for send logs doesn’t wait for task to be completed, it will finish immediately. You will need to check the submitted task in a loop and wait for it to finish. You can use the endpoint /task/show for this purpose

Only then you will be able to call another API endpoint for this configuration - until the task is completed, the configuration will be busy and you will receive only: