openapi: 3.0.0 info: description: Api Documentation version: 0.1.0 title: Api Documentation termsOfService: urn:tos contact: {} license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0 tags: - name: /api/clusters servers: - url: /localhost paths: /api/clusters: get: tags: - /api/clusters summary: getClusters operationId: getClusters responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Cluster' /api/clusters/{clusterName}/brokers: get: tags: - /api/clusters summary: getBrokers operationId: getBrokers parameters: - name: clusterName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Broker' /api/clusters/{clusterName}/metrics/broker: get: tags: - /api/clusters summary: getBrokersMetrics operationId: getBrokersMetrics parameters: - name: clusterName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: $ref: '#/components/schemas/BrokersMetrics' /api/clusters/{clusterName}/topics: get: tags: - /api/clusters summary: getTopics operationId: getTopics parameters: - name: clusterName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Topic' post: tags: - /api/clusters summary: createTopic operationId: createTopic parameters: - name: clusterName in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TopicFormData' responses: 201: description: Created content: application/json: schema: $ref: '#/components/schemas/Topic' /api/clusters/{clusterName}/topics/{topicName}: get: tags: - /api/clusters summary: getTopicDetails operationId: getTopicDetails parameters: - name: clusterName in: path required: true schema: type: string - name: topicName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: $ref: '#/components/schemas/TopicDetails' patch: tags: - /api/clusters summary: updateTopic operationId: updateTopic parameters: - name: clusterName in: path required: true schema: type: string - name: topicName in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TopicFormData' responses: 200: description: Updated content: application/json: schema: $ref: '#/components/schemas/Topic' /api/clusters/{clusterName}/topics/{topicName}/config: get: tags: - /api/clusters summary: getTopicConfigs operationId: getTopicConfigs parameters: - name: clusterName in: path required: true schema: type: string - name: topicName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/TopicConfig' /api/clusters/{clusterName}/topics/{topicName}/messages: get: tags: - /api/clusters summary: getTopicMessages operationId: getTopicMessages parameters: - name: clusterName in: path required: true schema: type: string - name: topicName in: path required: true schema: type: string - name: partition in: query schema: type: integer - name: offset in: query schema: type: integer format: int64 - name: timestamp in: query schema: type: string format: date-time responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/TopicMessage' /api/clusters/{clusterName}/consumer-groups/{id}: get: tags: - /api/clusters summary: get Consumer Group By Id operationId: getConsumerGroup parameters: - name: clusterName in: path required: true schema: type: string - name: id in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: $ref: '#/components/schemas/ConsumerGroupDetails' /api/clusters/{clusterName}/consumerGroups: get: tags: - /api/clusters summary: get all ConsumerGroups operationId: getConsumerGroups parameters: - name: clusterName in: path required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/ConsumerGroup' components: schemas: Cluster: type: object properties: name: type: string defaultCluster: type: boolean status: $ref: '#/components/schemas/ServerStatus' brokerCount: type: integer onlinePartitionCount: type: integer topicCount: type: integer bytesInPerSec: type: integer bytesOutPerSec: type: integer required: - id - name - status ServerStatus: type: string enum: - online - offline BrokersMetrics: type: object properties: zooKeeperStatus: type: integer activeControllers: type: integer uncleanLeaderElectionCount: type: integer underReplicatedPartitionCount: type: integer offlinePartitionCount: type: integer inSyncReplicasCount: type: integer outOfSyncReplicasCount: type: integer segmentZise: type: integer Topic: type: object properties: name: type: string internal: type: boolean partitions: type: array items: $ref: '#/components/schemas/Partition' Partition: type: object properties: partition: type: integer leader: type: integer replicas: type: array items: $ref: '#/components/schemas/Replica' Replica: type: object properties: broker: type: integer leader: type: boolean inSync: type: boolean TopicDetails: type: object properties: partitionCount: type: integer replicationFactor: type: integer replicas: type: integer inSyncReplicas: type: integer bytesInPerSec: type: integer segmentSize: type: integer segmentCount: type: integer underReplicatedPartitions: type: integer TopicConfig: type: object properties: name: type: string value: type: string defaultValue: type: string TopicFormData: type: object properties: name: type: string partitions: type: integer replicationFactor: type: integer configs: type: object additionalProperties: type: string Broker: type: object properties: id: type: string ConsumerGroup: type: object properties: clusterId: type: string consumerGroupId: type: string numConsumers: type: integer numTopics: type: integer TopicMessage: type: object properties: partition: type: integer offset: type: integer format: int64 timestamp: type: string format: date-time timestampType: type: string enum: - NO_TIMESTAMP_TYPE - CREATE_TIME - LOG_APPEND_TIME key: type: string headers: type: object additionalProperties: type: string content: type: string required: - partition - offset - timestamp TopicPartitionDto: type: object properties: topic: type: string partition: type: integer required: - topic - partition ConsumerTopicPartitionDetail: type: object properties: consumerId: type: string topic: type: string partition: type: integer currentOffset: type: long endOffset: type: long messagesBehind: type: long ConsumerGroupDetails: type: object properties: consumerGroupId: type: string consumers: type: array items: $ref: '#/components/schemas/ConsumerTopicPartitionDetail'