Skip to content

alvin-reyes/opa-hub-api

Repository files navigation

OPA HUB REST API Client

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>ora.opa.hub</groupId>
    <artifactId>opa-hub-java-client</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "ora.opa.hub:opa-hub-java-client:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/opa-hub-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

public class AboutApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: opa_auth
        ApiKeyAuth opa_auth = (ApiKeyAuth) defaultClient.getAuthentication("opa_auth");
        opa_auth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //opa_auth.setApiKeyPrefix("Token");

        AboutApi apiInstance = new AboutApi();
        try {
            About result = apiInstance.getAbout();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AboutApi#getAbout");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://opa-1228-sc.qb.lan/opa_1228_sc/opa-hub/api/12.2.8

Class Method HTTP request Description
AboutApi getAbout GET /about Get an about
DeploymentsApi deleteDeployment DELETE /deployments/{deployment-name} Delete a deployment
DeploymentsApi getDeployment GET /deployments/{deployment-name} Get a deployment
DeploymentsApi getDeployments GET /deployments Get one or more deployments
DeploymentsApi insertDeployments POST /deployments Insert one or more deployments
DeploymentsApi updateDeployment PATCH /deployments/{deployment-name} Update a deployment
DeploymentsDeploymentLogsApi getDeploymentLogs GET /deployments/{deployment-name}/logs Get one or more deployment logs
DeploymentsDeploymentVersionsApi deleteDeploymentVersion DELETE /deployments/{deployment-name}/versions/{deployment-version-versionNo} Delete a deployment version
DeploymentsDeploymentVersionsApi getDeploymentVersion GET /deployments/{deployment-name}/versions/{deployment-version-versionNo} Get a deployment version
DeploymentsDeploymentVersionsApi getDeploymentVersions GET /deployments/{deployment-name}/versions Get one or more deployment versions
DeploymentsDeploymentVersionsApi getSnapshot GET /deployments/{deployment-name}/versions/{deployment-version-versionNo}/snapshot Get a snapshot
DeploymentsDeploymentVersionsApi insertDeploymentVersions POST /deployments/{deployment-name}/versions Insert one or more deployment versions
DeploymentsDeploymentVersionsApi updateDeploymentVersion PATCH /deployments/{deployment-name}/versions/{deployment-version-versionNo} Update a deployment version
UsersApi deleteUser DELETE /users/{user-name} Delete a user
UsersApi getUser GET /users/{user-name} Get a user
UsersApi getUsers GET /users Get one or more users
UsersApi insertOrReplaceUsers PUT /users Insert or replace one or more users
UsersApi insertUsers POST /users Insert one or more users
UsersApi updateUsers PATCH /users Update one or more users

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

opa_auth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

Alvin Reyes

About

Java API for Oracle Policy Modeling Tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages