Cloud Services

ModernOps

APIs to expose RabbitMQ through Core
Published On May 16, 2024 - 1:22 PM

APIs to expose RabbitMQ through Core

Learn about the API that exposes the RabbitMQ message broker service through Core.
To access the Developer Console, follow these steps:
  1. Click the
    user profile icon
    in the upper-right side of the Kyndryl Modern Operations Applications portal.
  2. Select
    Developer Console
    .

REST API route where you will get RabbitMQ

This REST API gets the RabbitMQ URL certificates and users. You must have credentials and a certificate to interact with RabbitMQ.
METHOD: GET REQUEST-URL:
host_url
/authorization/mq/applications/:appname/namespace/:namespace/users
host_url
example:
  • When accessing the API through the gateway
    https://cb-qa-corex-api.gravitant.net/authorization/mq/applications/core/namespace/public/users
  • For Service to Service API call
    http://cb-core-authorization-service:4004/authorization/mq/applications/core/namespace/public/users
HEADERS: Content-Type : application/json
REQUEST-BODY: --
RESPONSE: 200
{ "url": "https://rabbitmq:envport", "appname":"core", "namespace":"core_private" "config_credentials" : { }, "read_credentials" : { }, "write_credentials": { }, "accessall_credentials": { "username":"<appname>_user", "password":"XXXXXX" }, "certificate":"" }

Parameters

Response Parameters
Description
url
RabbitMQ URL (URL is Devops-injected environment variable.)
appname
Application name Ex: core, aiops, ecam
namespace
RabbitMQ vhost; a
vhost
is a logical separation of RabbitMQ resources such as queues or exchange. A vhost can be a private or shared type. Naming convention here is _  Ex: core_private, core_shared
config_credentials
RabbitMQ user credentials. A
config
user can create and delete resources and alter the behavior of resources.
read_credentials
RabbitMQ user credentials. A
read
user can perform read operations and retrieve messages from a resource.
write_credentials
RabbitMQ user credentials. A
write
user can perform write operations and inject messages into a resource.
accessall_credentials
RabbitMQ user credentials. An
accessall
user can perform the operations of a
config, read, write
user on the resource.
certificate
Rabbitmq client certificate required for authentication. Use the certificate to perform actions on queues, vhost (until Rabbitmq username and password credentials are obtained as environment variables injected by DevOps). Tracking the dependency: Requires RabbitMQ admin username and password to perform user management actions - cb-core-authorization-service
Sample
appname
= core
Sample
namespace
= core_private, core_shared
Do you have two minutes for a quick survey?
Take Survey