IHub Queue Channels

Following are the IHub Queue channels:

Create IHub queue listenerCreate IHub queue listener

URL : http://<host-name>:<port>/api/smartops/ihub/channel
Request Method: POST
Headers:
Request Body:

{
  "channelName": "string",
  "destinations": [ // Optional- If given the outbound messages will     
be routed to these destinations
    {
      "apiAuthType": "BASIC",
    "apiHeaders": {},
      "apiPassword": "string",
      "apiRequestMethod": "GET",
      "apiUrl": "string",
      "apiUsername": "string",
    "destinationType": "QUEUE",
      "jsonMappings": {
        "jsonSpecs": [
          {
            "mappings": {},
            "operation": "string"
        }
        ]
      },
      "queueExchangeName": "string",
      "queueHost": "string",
      "queueName": "string",
      "queuePassword": "string",
      "queuePort": 0,
      "queueRoutingKey": "string",
      "queueUsername": "string",
      "queueVhost": "string"
    }
],
  "jsonMappings": {
    "jsonSpecs": [
      {
        "mappings": {},
        "operation": "string"
      }
    ]
  },
  "projectId": 0,
"sourcePredicates": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}



SOURCE PREDICATES
This mapping defines the logic to identify the source of the incoming json. iHub expects that there will be unique field/fields in incoming json which will try to identify the source of the incoming input. These fields and the expected value for these fields should be configured in source predicate array while defining the channel.
For example, if there is an entry “source”:”prognosis” from the incoming input json of prognosis system source predicate should be given like the below.

"sourcePredicates": [
            {
                "key": "source",
                "value": "solarwinds"
            }
        ]


As an another example if a combination of field values decides the source it can be given as multiple mappings.

"sourcePredicates": [
            {
                "key": "source",
                "value": "solarwinds"
            },
           {
                "key": "category",
                "value": "DB"
           }
        ]


View all queue listenersView all queue listeners

The added channels for an organization can be viewed using Channel GET API. The details are given below.
URL : http://<host-name>:<port>/api/smartops/ihub/channel/all
Request Method: GET
Headers:
Organization-key

Update a queue listenerUpdate a queue listener

The installation engineer can update the channel details using update API. The API details are given below.
URL :- http://<host-name>:<port>/api/smartops/ihub/channel
Request Method: PUT
Headers:-
Organization-key
Request Body:

{
  "active": true,
  "channelId": "string",
  "channelName": "string",
  "destinations": [
    {
      "apiAuthType": "BASIC",
  "apiHeaders": {},
      "apiPassword": "string",
      "apiRequestMethod": "GET",
      "apiUrl": "string",
      "apiUsername": "string",
    "destinationType": "QUEUE",
      "jsonMappings": {
        "jsonSpecs": [
          {
            "mappings": {},
            "operation": "string"
        }
        ]
      },
      "queueExchangeName": "string",
      "queueHost": "string",
      "queueName": "string",
      "queuePassword": "string",
      "queuePort": 0,
      "queueRoutingKey": "string",
      "queueUsername": "string",
      "queueVhost": "string"
    }
],
  "jsonMappings": {
    "jsonSpecs": [
      {
        "mappings": {},
        "operation": "string"
      }
    ]
  },
  "orgId": "string",
"projectId": 0,
  "sourcePredicates": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}


Delete a Queue ListenerDelete a Queue Listener

A channel can be deleted using channel delete API. The details are given below.
URL : http://<host-name>:<port> /api/smartops/ihub/channel
Request Method: DELETE
Headers:
Organization-key
Request Body:

{
  "active": true,
  "channelId": "string",
  "channelName": "string",
  "destinations": [
    {
      "apiAuthType": "BASIC",
    "apiHeaders": {},
      "apiPassword": "string",
      "apiRequestMethod": "GET",
      "apiUrl": "string",
      "apiUsername": "string",
    "destinationType": "QUEUE",
      "jsonMappings": {
        "jsonSpecs": [
          {
            "mappings": {},
            "operation": "string"
        }
        ]
      },
      "queueExchangeName": "string",
      "queueHost": "string",
      "queueName": "string",
      "queuePassword": "string",
      "queuePort": 0,
      "queueRoutingKey": "string",
      "queueUsername": "string",
      "queueVhost": "string"
    }
],
  "jsonMappings": {
    "jsonSpecs": [
      {
        "mappings": {},
        "operation": "string"
      }
    ]
  },
  "orgId": "string",
"projectId": 0,
  "sourcePredicates": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}



 

Related Topics:

Feedback

Copyright © 2021 UST Global. All Rights Reserved.