openapi: 3.2.0 info: contact: {} description: API for Maas Service. title: Maas Service Kafka API tags: - name: Kafka paths: /api/v1/kafka/instance: delete: description: Unregister Kafka Instance operationId: UnregisterKafkaInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Unregister Kafka Instance using Manager Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/controller.Instance' description: Instance required: true post: description: Register New Kafka Instance operationId: RegisterNewKafkaInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Register New Kafka Instance using Manager Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' description: KafkaInstance required: true put: description: Update New Kafka Instance operationId: UpdateKafkaInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Update New Kafka Instance using Manager Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' description: KafkaInstance required: true /api/v1/kafka/instance/default: put: description: Set Default Kafka Instance operationId: SetDefaultKafkaInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Set Default Kafka Instance using Manager Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.KafkaInstance' description: KafkaInstance required: true /api/v1/kafka/instances: get: description: Get All Kafka Instances operationId: GetAllKafkaInstances responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.KafkaInstance' type: array '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Get All Kafka Instances using Manager Role tags: - Kafka /api/v1/kafka/topic: delete: description: Delete Topic operationId: DeleteTopic parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.TopicDeletionResp' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '405': description: Method Not Allowed content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Delete Topic using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.TopicSearchRequest' description: TopicSearchRequest required: true post: description: Get Or Create Topic operationId: GetOrCreateTopicV1 parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '410': description: Gone content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Get Or Create Topic using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' description: Request Body required: true /api/v1/kafka/topic/get-by-classifier: post: description: Get Topic By Classifier operationId: GetTopicByClassifierV1 parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '403': description: Forbidden content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Get Topic By Classifier using Agent Role tags: - Kafka requestBody: content: application/json: schema: additionalProperties: true type: object description: Request body required: true /api/v1/kafka/topic/search: post: description: Search Topics operationId: SearchTopicsV1 parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.TopicRegistrationRespDto' type: array '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Search Topics using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.TopicSearchRequest' description: TopicSearchRequest required: true /api/v2/kafka/discrepancy-report/{namespace}: get: operationId: GetReport parameters: - description: namespace in: path name: namespace required: true schema: type: string - description: status in: query name: status required: true schema: type: string responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.DiscrepancyReportItem' type: array '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object summary: Get Report tags: - Kafka /api/v2/kafka/recover-topic: post: description: Sync Topic To Kafka operationId: SyncTopicToKafka responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.KafkaTopicSyncReport' type: array '403': description: Forbidden content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Sync Topic To Kafka using Agent Role tags: - Kafka /api/v2/kafka/recovery/{namespace}: post: description: Sync All Topics To Kafka operationId: SyncAllTopicsToKafka responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.KafkaTopicSyncReport' type: array '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Sync All Topics To Kafka using Agent Role tags: - Kafka /api/v2/kafka/topic: post: description: Get Or Create Topic operationId: GetOrCreateTopicV2 parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string - description: onTopicExists in: query name: onTopicExists required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '410': description: Gone content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Get Or Create Topic using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.TopicTemplate' description: Request Body required: true /api/v2/kafka/topic/get-by-classifier: post: description: Get Topic By Classifier operationId: GetTopicByClassifierV2 parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.TopicRegistrationRespDto' type: array '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '409': description: Conflict content: application/json: schema: additionalProperties: type: string type: object '410': description: Gone content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Get Topic By Classifier using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.Classifier' description: Classifier required: true /api/v2/kafka/topic/search: post: description: Search Topics operationId: SearchTopicsV2 responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.TopicRegistrationRespDto' type: array '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Search Topics using Agent Role tags: - Kafka requestBody: content: application/json: schema: $ref: '#/components/schemas/model.TopicSearchRequest' description: TopicSearchRequest required: true /api/v2/kafka/topic/watch-create: post: description: Watch Topics Create operationId: WatchTopicsCreate parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string - description: timeout in: query name: timeout schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.TopicRegistrationRespDto' '400': description: Bad Request content: application/json: schema: additionalProperties: type: string type: object '404': description: Not Found content: application/json: schema: additionalProperties: type: string type: object '405': description: Method Not Allowed content: application/json: schema: additionalProperties: type: string type: object '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Watch Topics Create using Agent Role tags: - Kafka components: schemas: model.TopicRegistrationRespDto: properties: actualSettings: $ref: '#/components/schemas/model.TopicSettings' addresses: additionalProperties: items: type: string type: array type: object caCert: example: ' ' type: string classifier: $ref: '#/components/schemas/model.Classifier' credential: additionalProperties: items: $ref: '#/components/schemas/model.KafkaCredentials' type: array type: object externallyManaged: type: boolean instance: example: localkafka type: string name: example: local.sampleTopic2.430d243ba9c74f25bf05f492a52804fd type: string namespace: example: local type: string requestedSettings: $ref: '#/components/schemas/model.TopicSettings' template: example: '2' type: string versioned: example: false type: boolean type: object model.TopicDeletionResp: properties: deletedSuccessfully: items: $ref: '#/components/schemas/model.TopicRegistrationRespDto' type: array failedToDelete: items: $ref: '#/components/schemas/model.TopicDeletionError' type: array type: object model.TopicTemplate: properties: configs: additionalProperties: type: string type: object minNumPartitions: example: 1 type: integer name: example: topic Name type: string namespace: example: local type: string numPartitions: example: 1 type: integer replicaAssignment: additionalProperties: items: type: integer type: array type: object replicationFactor: example: 1 type: integer versioned: example: true type: boolean type: object model.Classifier: properties: name: type: string namespace: type: string tenantId: type: string required: - name - namespace type: object model.TopicDeletionError: properties: message: example: type: string topic: $ref: '#/components/schemas/model.TopicRegistrationRespDto' type: object model.TopicSearchRequest: properties: classifier: $ref: '#/components/schemas/model.Classifier' instance: example: type: string leaveRealTopicIntact: type: boolean namespace: example: type: string template: type: integer topic: example: type: string versioned: type: boolean type: object model.KafkaCredentials: properties: clientCert: type: string clientKey: type: string password: type: string type: type: string username: type: string type: object model.DiscrepancyReportItem: properties: classifier: $ref: '#/components/schemas/model.Classifier' name: example: maas.test.81.my-awesome-test-topic type: string status: example: ok type: string type: object model.TopicSettings: properties: configs: additionalProperties: type: string type: object minNumPartitions: example: 1 type: integer numPartitions: example: 1 type: integer replicaAssignment: additionalProperties: items: type: integer type: array type: object replicationFactor: example: 1 type: integer versioned: example: true type: boolean type: object model.KafkaInstance: properties: addresses: additionalProperties: items: type: string type: array type: object caCert: example: MIIDPjCCAiYCCQCNmVmmEXs5XjANBgkqhkiG9w0BAQsFADBVMQswCQYDVQQGEwJYWDEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZhdWx0IENvbXBhbnkgTHRkMREwDwYDVQQDDAhsb2NhbGs4czAeFw0yMDA4MTgxMjUzMDFaFw0yMDExMjUxMjUzMDFaMG0xEDAOBgNVBAYTB1Vua25vd24xEDAOBgNVBAgTB1Vua25vd24xEDAOBgNVBAcTB1Vua25vd24xEDAOBgNVBAoTB1Vua25vd24xEDAOBgNVBAsTB1Vua25vd24xETAPBgNVBAMTCGxvY2FsazhzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjcTaRTo7E7UI9jO9gtRAi5au57elqRX2YMj/OOGcwQdzP6JfMFZsKFNUoIoF8bJ51JXhbDxVgB+GHvEMmQ0jqGnMjSTsdxEQUCRTnINMAIAYLBKm5FGi5pJodZRzhNKoWhloRO9/2p2AYB+T39MxXFch3fwMdghVKbSqOCo0nsqCZwyB5CcZgLi69qifZPQAIFPUPDHG5Z6oGUjE/p+45RnOcAdCOgO0QllxO+fioCMPizRqIiim88UuZU7EjhaIwSTjOIohcPQStNU6vAp0ZGIgr8BhAZHiL8JRDto37ayo7ltDYtLg4Ojo3e9ue8Dwo5PSs+N6Od8Z//Xq6V8zwQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCDsV/jDojj4t977V5BMSTDeELEvNX8VMMtqAGpB1jtVNVXRLfG2SAcv6ZdOUbyuBagF8D0dsV5VvcqPw8YHNpHMKCTSdcida28rV2C31M+XRvvh90eoPtXfE60wo4Ky4UbKiJERiBIXMFLrg8PZ51PukT4fD0DioNpIxzRFb4VkypYv4srADX5shSvJN9Zxdj2EywR+S1k2F4TIDdOnWY9xGMftJz1fc58dMFMwGi7Evr+pR/w7yWDcvRgdgAYUpGaehmnYhzuw4XKWmVX1D6aVFRhonHaxN0rUemPZYSqjHp+lWOiUsYqatxB5MGQqj1/QV3XTAWglFbk1BB2stQg type: string credentials: additionalProperties: items: $ref: '#/components/schemas/model.KafkaCredentials' type: array type: object default: example: true type: boolean id: example: cpq-kafka-maas-test type: string maasProtocol: example: SASL_PLAINTEXT type: string type: object controller.Instance: properties: id: example: maas-rabbitmq-code-dev type: string type: object model.KafkaTopicSyncReport: properties: classifier: $ref: '#/components/schemas/model.Classifier' errMsg: example: can not get topic info type: string name: example: maas.local.test-topic-0 type: string status: example: added type: string type: object securitySchemes: BasicAuth: type: http scheme: basic