RHOAS Kafka Instance Admin SDK TypeScript/JavaScript SDK Provides SDK for interacting with Kafka instances
NOTE: This SDK requires different authentication than management APIs
npm install @rhoas/kafka-instance-sdk --save
import { Configuration, DefaultApi } from "@rhoas/kafka-instance-sdk";
const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://api.openshift.com";
const apiConfig = new Configuration({
accessToken,
basePath,
});
const kafkaInstance = new DefaultApi(apiConfig)
kafkaInstance.getTopics().then((data) => {
console.log(data?.data)
}).catch((err) => {
console.error(err.message)
})
See ./examples for full example