Skip to content

Latest commit

 

History

History
216 lines (164 loc) · 10.3 KB

File metadata and controls

216 lines (164 loc) · 10.3 KB

connector-management-sdk

Connector Management API

  • API version: 0.1.0

Connector Management API is a REST API to manage connectors.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

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

mvn clean install

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

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.redhat.cloud</groupId>
  <artifactId>connector-management-sdk</artifactId>
  <version>0.1.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'connector-management-sdk' jar has been published to maven central.
    mavenLocal()       // Needed if the 'connector-management-sdk' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.redhat.cloud:connector-management-sdk:0.1.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/connector-management-sdk-0.1.0.jar
  • target/lib/*.jar

Getting Started

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

import com.openshift.cloud.api.connector.invoker.*;
import com.openshift.cloud.api.connector.invoker.auth.*;
import com.openshift.cloud.api.connector.models.*;
import com.openshift.cloud.api.connector.ConnectorClustersApi;

public class ConnectorClustersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.openshift.com");
        
        // Configure HTTP bearer authorization: Bearer
        HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
        Bearer.setBearerToken("BEARER TOKEN");

        ConnectorClustersApi apiInstance = new ConnectorClustersApi(defaultClient);
        Boolean async = true; // Boolean | Perform the action in an asynchronous manner
        ConnectorClusterRequest connectorClusterRequest = new ConnectorClusterRequest(); // ConnectorClusterRequest | Connector cluster data
        try {
            ConnectorCluster result = apiInstance.createConnectorCluster(async, connectorClusterRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ConnectorClustersApi#createConnectorCluster");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.openshift.com

Class Method HTTP request Description
ConnectorClustersApi createConnectorCluster POST /api/connector_mgmt/v1/kafka_connector_clusters Create a new connector cluster
ConnectorClustersApi deleteConnectorCluster DELETE /api/connector_mgmt/v1/kafka_connector_clusters/{connector_cluster_id} Delete a connector cluster
ConnectorClustersApi getConnectorCluster GET /api/connector_mgmt/v1/kafka_connector_clusters/{connector_cluster_id} Get a connector cluster
ConnectorClustersApi getConnectorClusterAddonParameters GET /api/connector_mgmt/v1/kafka_connector_clusters/{connector_cluster_id}/addon_parameters Get a connector cluster's addon parameters
ConnectorClustersApi getConnectorClusterNamespaces GET /api/connector_mgmt/v1/kafka_connector_clusters/{connector_cluster_id}/namespaces Get a connector cluster's namespaces
ConnectorClustersApi listConnectorClusters GET /api/connector_mgmt/v1/kafka_connector_clusters Returns a list of connector clusters
ConnectorClustersApi updateConnectorClusterById PUT /api/connector_mgmt/v1/kafka_connector_clusters/{connector_cluster_id} udpate a connector cluster
ConnectorNamespacesApi createEvaluationNamespace POST /api/connector_mgmt/v1/kafka_connector_namespaces/eval Create a new short lived evaluation connector namespace
ConnectorNamespacesApi getConnectorNamespace GET /api/connector_mgmt/v1/kafka_connector_namespaces/{connector_namespace_id} Get a connector namespace
ConnectorNamespacesApi listConnectorNamespaces GET /api/connector_mgmt/v1/kafka_connector_namespaces Returns a list of connector namespaces
ConnectorServiceApi getVersionMetadata GET /api/connector_mgmt/v1 Returns the version metadata
ConnectorTypesApi getConnectorTypeByID GET /api/connector_mgmt/v1/kafka_connector_types/{connector_type_id} Get a connector type by id
ConnectorTypesApi getConnectorTypeLabels GET /api/connector_mgmt/v1/kafka_connector_types/labels Returns a list of connector type labels
ConnectorTypesApi getConnectorTypes GET /api/connector_mgmt/v1/kafka_connector_types Returns a list of connector types
ConnectorsApi createConnector POST /api/connector_mgmt/v1/kafka_connectors Create a new connector
ConnectorsApi deleteConnector DELETE /api/connector_mgmt/v1/kafka_connectors/{id} Delete a connector
ConnectorsApi getConnector GET /api/connector_mgmt/v1/kafka_connectors/{id} Get a connector
ConnectorsApi listConnectors GET /api/connector_mgmt/v1/kafka_connectors Returns a list of connector types
ConnectorsApi patchConnector PATCH /api/connector_mgmt/v1/kafka_connectors/{id} Patch a connector

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Bearer

  • Type: HTTP basic authentication

Recommendation

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

Author

[email protected]