Kafka Management API
- API version: 1.16.0
Kafka Management API is a REST API to manage Kafka instances
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven/Gradle
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.
Add this dependency to your project's POM:
<dependency>
<groupId>com.redhat.cloud</groupId>
<artifactId>kafka-management-sdk</artifactId>
<version>1.16.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'kafka-management-sdk' jar has been published to maven central.
mavenLocal() // Needed if the 'kafka-management-sdk' jar has been published to the local maven repo.
}
dependencies {
implementation "com.redhat.cloud:kafka-management-sdk:1.16.0"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/kafka-management-sdk-1.16.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.openshift.cloud.api.kas.invoker.*;
import com.openshift.cloud.api.kas.invoker.auth.*;
import com.openshift.cloud.api.kas.models.*;
import com.openshift.cloud.api.kas.DefaultApi;
public class DefaultApiExample {
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");
DefaultApi apiInstance = new DefaultApi(defaultClient);
Boolean async = true; // Boolean | Perform the action in an asynchronous manner
KafkaRequestPayload kafkaRequestPayload = new KafkaRequestPayload(); // KafkaRequestPayload | Kafka data
try {
KafkaRequest result = apiInstance.createKafka(async, kafkaRequestPayload);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createKafka");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.openshift.com
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | createKafka | POST /api/kafkas_mgmt/v1/kafkas | |
DefaultApi | deleteKafkaById | DELETE /api/kafkas_mgmt/v1/kafkas/{id} | |
DefaultApi | federateMetrics | GET /api/kafkas_mgmt/v1/kafkas/{id}/metrics/federate | |
DefaultApi | getCloudProviderRegions | GET /api/kafkas_mgmt/v1/cloud_providers/{id}/regions | |
DefaultApi | getCloudProviders | GET /api/kafkas_mgmt/v1/cloud_providers | |
DefaultApi | getInstanceTypesByCloudProviderAndRegion | GET /api/kafkas_mgmt/v1/instance_types/{cloud_provider}/{cloud_region} | |
DefaultApi | getKafkaById | GET /api/kafkas_mgmt/v1/kafkas/{id} | |
DefaultApi | getKafkas | GET /api/kafkas_mgmt/v1/kafkas | |
DefaultApi | getMetricsByInstantQuery | GET /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query | |
DefaultApi | getMetricsByRangeQuery | GET /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range | |
DefaultApi | getVersionMetadata | GET /api/kafkas_mgmt/v1 | |
DefaultApi | promoteKafka | POST /api/kafkas_mgmt/v1/kafkas/{id}/promote | |
DefaultApi | updateKafkaById | PATCH /api/kafkas_mgmt/v1/kafkas/{id} | |
EnterpriseDataplaneClustersApi | deleteEnterpriseClusterById | DELETE /api/kafkas_mgmt/v1/clusters/{id} | |
EnterpriseDataplaneClustersApi | getEnterpriseClusterAddonParameters | GET /api/kafkas_mgmt/v1/clusters/{id}/addon_parameters | |
EnterpriseDataplaneClustersApi | getEnterpriseClusterById | GET /api/kafkas_mgmt/v1/clusters/{id} | |
EnterpriseDataplaneClustersApi | getEnterpriseOsdClusters | GET /api/kafkas_mgmt/v1/clusters | |
EnterpriseDataplaneClustersApi | registerEnterpriseOsdCluster | POST /api/kafkas_mgmt/v1/clusters | |
ErrorsApi | getErrorById | GET /api/kafkas_mgmt/v1/errors/{id} | |
ErrorsApi | getErrors | GET /api/kafkas_mgmt/v1/errors | |
SecurityApi | createServiceAccount | POST /api/kafkas_mgmt/v1/service_accounts | |
SecurityApi | deleteServiceAccountById | DELETE /api/kafkas_mgmt/v1/service_accounts/{id} | |
SecurityApi | getServiceAccountById | GET /api/kafkas_mgmt/v1/service_accounts/{id} | |
SecurityApi | getServiceAccounts | GET /api/kafkas_mgmt/v1/service_accounts | |
SecurityApi | getSsoProviders | GET /api/kafkas_mgmt/v1/sso_providers | |
SecurityApi | resetServiceAccountCreds | POST /api/kafkas_mgmt/v1/service_accounts/{id}/reset_credentials |
- CloudProvider
- CloudProviderList
- CloudProviderListAllOf
- CloudRegion
- CloudRegionList
- CloudRegionListAllOf
- EnterpriseCluster
- EnterpriseClusterAddonParameters
- EnterpriseClusterAllOf
- EnterpriseClusterAllOfCapacityInformation
- EnterpriseClusterFleetshardParameters
- EnterpriseClusterList
- EnterpriseClusterListAllOf
- EnterpriseClusterRegistrationResponse
- EnterpriseOsdClusterPayload
- Error
- ErrorList
- ErrorListAllOf
- FleetshardParameter
- InstantQuery
- KafkaPromoteRequest
- KafkaRequest
- KafkaRequestAllOf
- KafkaRequestList
- KafkaRequestListAllOf
- KafkaRequestPayload
- KafkaUpdateRequest
- MetricsInstantQueryList
- MetricsInstantQueryListAllOf
- MetricsRangeQueryList
- MetricsRangeQueryListAllOf
- ModelList
- ObjectReference
- RangeQuery
- RegionCapacityListItem
- ServiceAccount
- ServiceAccountAllOf
- ServiceAccountList
- ServiceAccountListAllOf
- ServiceAccountListItem
- ServiceAccountListItemAllOf
- ServiceAccountRequest
- SsoProvider
- SsoProviderAllOf
- SupportedKafkaBillingModel
- SupportedKafkaInstanceType
- SupportedKafkaInstanceTypesList
- SupportedKafkaInstanceTypesListAllOf
- SupportedKafkaSize
- SupportedKafkaSizeBytesValueItem
- Values
- VersionMetadata
- VersionMetadataAllOf
Authentication schemes defined for the API:
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.