IBM® Data Replication for
Availability provides an interactive API console
that enables you to view and try the product REST API calls before using them to automate or script
replication health checks or setup tasks.
About this task
The replication REST APIs give you the flexibility to develop your own applications to use the
replication feature, for example to tailor a specific type of user interface to your business
requirements. You can use the APIs to perform the following functions among others:
- Health
- Monitor the health of the replication environment
- Replication set
-
- Create, update, delete, list, start, stop, add or remove a table
- Start or stop replication for a table
- Add schema-level subscriptions to a set, remove them from a set, and start or stop schema-level
subscriptions
- Monitor a replication set, get historical metric data
- Source
- Enable for replication, check for requirements, check for SSL certificate, validate
connectivity, check or update credentials
- Target
- Initialize, check requirements, validate connectivity, trust certificate, update credentials,
monitor calls
Procedure
-
Launch the console in a web browser by modifying the following URL:
https://host_ip:9444/api/explorer
https://hostname:9444/api/explorer
Where host_iphostname is the IP addresshost
name of the server where IBM Data Replication for
Availability is installed.
-
Click one of the API categories to open it.
-
Click the
icon to enter a user ID and password that
is authorized to run commands on the replication source system and access the source database.
The Implementation Notes field describes the purpose of the API call. The
Response Messages field displays the return code from the call that you can
use in your application or script.
-
To view the usage information and responses from the API call, click Try it
out!
This image shows the button in the Health section:
The UI generates the following information:
- Curl command
- The API request is shown as a Curl command that you can copy into a command shell or
script.
Note: If you want to run the curl command outside of the API console, specify the following options:
- User authentication (-u or --user)
- If you do not have a CA-signed certificate installed in your environment, insecure option
(
-k or --insecure)
For additional help, run the
curl -- help command.
- Request URL
- The URL that is used when a web client makes a request to a server for a resource.
- Response Body
- The Java code that is returned from the API call and that you can incorporate into your
applications.
- Response Code
- The response code that is returned from the API call.
- Response Headers
- An HTTP header that can be used in an HTTP response and that does not relate to the content of
the message.
For APIs that require you to provide input parameters in a defined format, the console displays
sample parameter values such as dbHost, dbPort, or dbName. For example, the following images shows
example values for a source database connection:
