openapi: 3.2.0 info: contact: {} description: API for Maas Service. title: Maas Service Rabbit API tags: - name: Rabbit paths: /api/v1/rabbit/instance: delete: description: Unregister Rabbit Instance operationId: UnregisterRabbitInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' '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 Rabbit Instance using Manager Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/controller.Instance' description: Instance required: true post: description: Register New Rabbit Instance operationId: RegisterNewRabbitInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' '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 Rabbit Instance using Manager Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' description: RabbitInstance required: true put: description: Update Rabbit Instance operationId: UpdateRabbitInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' '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 Rabbit Instance using Manager Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' description: RabbitInstance required: true /api/v1/rabbit/instance/default: put: description: Set Default Rabbit Instance operationId: SetDefaultRabbitInstance responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' '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 Rabbit Instance using Manager Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.RabbitInstance' description: RabbitInstance required: true /api/v1/rabbit/instances: get: description: Get All Rabbit Instances operationId: GetAllRabbitInstances responses: '200': description: OK content: application/json: schema: items: $ref: '#/components/schemas/model.RabbitInstance' type: array '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - manager summary: Get All Rabbit Instances using Manager Role tags: - Rabbit /api/v1/rabbit/vhost: delete: description: Delete VHost operationId: DeleteVHost parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '204': description: '' '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: Delete VHost using Agent Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.SearchForm' description: SearchForm required: true post: description: Get Or Create VHost operationId: GetOrCreateVHost parameters: - description: cloudbss311-platform-core-support-dev3 in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/model.VHostRegistrationResponse' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/model.VHostRegistrationResponse' '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 '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: - agent summary: Get Or Create VHost using Agent Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.VHostRegistrationReqDto' description: VHostRegistrationReqDto required: true /api/v1/rabbit/vhost/get-by-classifier: post: description: Set Default Rabbit Instance operationId: GetVHostAndConfigByClassifier parameters: - description: cloudbss311-platform-core-support-dev3 in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/controller.VhostAndConfigResult' '204': description: No Content content: application/json: schema: additionalProperties: type: string type: object '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: Get VHost And Config By Classifier using Agent Role tags: - Rabbit requestBody: content: application/json: schema: $ref: '#/components/schemas/model.Classifier' description: Classifier required: true /api/v2/rabbit/recovery/{namespace}: post: description: Recover Namespace operationId: RecoverNamespace parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string - description: namespace in: path name: namespace required: true schema: type: string responses: '200': description: '' '500': description: Internal Server Error content: application/json: schema: additionalProperties: type: string type: object security: - BasicAuth: - agent summary: Recover Namespace using Agent Role tags: - Rabbit /api/v2/rabbit/validations: get: description: Validate Rabbit Configs operationId: ValidateRabbitConfigs parameters: - description: X-Origin-Namespace in: header name: X-Origin-Namespace required: true schema: type: string responses: '200': description: OK content: application/json: schema: additionalProperties: items: $ref: '#/components/schemas/model.LazyBindingDto' type: array type: object '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: Validate Rabbit Configs using Agent Role tags: - Rabbit components: schemas: controller.VhostAndConfigResult: properties: entities: $ref: '#/components/schemas/model.RabbitEntities' vhost: $ref: '#/components/schemas/model.VHostRegistrationResponse' type: object model.VHostRegistrationReqDto: properties: classifier: $ref: '#/components/schemas/model.Classifier' instance: example: <[optional] rabbitmq instance for virtual host. if not specified default instance will be used> type: string required: - classifier type: object model.Classifier: properties: name: type: string namespace: type: string tenantId: type: string required: - name - namespace type: object model.LazyBindingDto: properties: entity: additionalProperties: true type: object exchangeVersion: example: v1 type: string queueVersion: example: v1 type: string vhost: example: maas.core-dev.test type: string type: object model.RabbitInstance: properties: amqpUrl: example: amqp://127.0.0.1:5672 type: string apiUrl: example: http://127.0.0.1:15672/api type: string default: example: true type: boolean id: example: fd02de58-da04-4842-a258-37ebe4e5ac1e type: string password: example: guest type: string user: example: guest type: string type: object model.SearchForm: properties: classifier: $ref: '#/components/schemas/model.Classifier' instance: type: string namespace: example: cloudbss311-platform-core-support-dev3 type: string user: type: string vhost: type: string type: object model.VHostRegistrationResponse: properties: apiUrl: example: http://127.0.0.1:15672/api type: string cnn: example: amqp://127.0.0.1:5672/namespace.test12 type: string password: example: plain:504a449065924332b062c4a84e830cbe type: string username: example: 9757343a78a04057a07ee4215f1b1355 type: string type: object controller.Instance: properties: id: example: maas-rabbitmq-code-dev type: string type: object model.RabbitEntities: properties: bindings: items: {} type: array exchanges: description: 'todo: rabbit entites should be refactored to specific type []map[string]interface{}' items: {} type: array queues: items: {} type: array type: object securitySchemes: BasicAuth: type: http scheme: basic