Quick Start

Oracle Database Appliance REST APIs provide a set of APIs to perform management and monitoring functions from a Java application running on any system in your data center. These APIs provide the flexibility to plug Oracle Database Appliance management functions into any custom monitoring and management application. Oracle Database Appliance REST APIs are serviced by the DCS Agent running on every Oracle Database Appliance system. The APIs are authenticated using the same basic authentication mechanism, similar to the authentication used by BUI and odacli. To set up the DCS Agent, see the Oracle Database Appliance Deployment and User's Guide for your hardware model.

Using REST APIs through Oracle Database Appliance Java SDK

  1. Create a project in an IDE (for example, NetBeans or Eclipse) using the src directory from the unzipped oda-java-sdk-19.11.0.0.0.zip, available at /opt/oracle/dcs/odajavasdk.
  2. The samples directory contains Java files that demonstrate database lifecycle management (LCM) operations such as create, delete, update, and list. You can also get the job details based on the job ID.
  3. Add the src/main/java/samples and src/main/resources as the source folders of the created project.
  4. Add oda-java-sdk-client-19.11.0.0.0.jar from the lib directory to the build path.
  5. Attach oda-java-sdk-client-19.11.0.0.0-javadoc.jar from the docs directory to the required library added above. Check the IDE settings on how to add docs directory to the build path jars.
  6. Copy the cwallet.sso file from /opt/oracle/dcs/conf/dcspublickey_wallet/cwallet.sso on the Oracle Database Appliance machine to the host where you plan to run your application.
  7. Edit the Java files with the information given in the commented sections. Update IP address or hostname, port, username, that is oda-admin, password, wallet path and alias in utils/DCSAgentUtil.java. Alias can be found in /opt/oracle/dcs/conf/dcs-agent.json. Set wallet path to the location of cwallet.sso on the local host.
  8. Run a build of the application, without errors. Run any sample file to see the functionality it provides. For example, run ListDatabases.java to get the list of databases running on your Oracle Database Appliance system.
  9. You can view the output on the console and in the oda-java-sdk.log file generated in the logs folder in the project folder.