Create or update a message hub

Purpose

Creates or updates a message hub. A message hub is an organizational object which groups endpoints, connection policies, and messaging policies that are associated with a specific goal.

URI

Use the Eclipse Amlen REST API POST method with the following Eclipse Amlen configuration URI:

http://<admin-endpoint-IP:Port>/ima/v1/configuration/

Object configuration data

Provide MessageHub object configuration data in the payload of the POST method by using the following schema. Content-type is set to application/json:


{    
   "MessageHub": {
     "<NameOfMessageHub>": {
       "Description": "string"
     }
   }
}
Where:
NameOfMessageHub
Required.
Specifies the name of the message hub.
The name must not have leading or trailing spaces and cannot contain control characters, commas, double quotation marks, backslashes, or equal signs. The first character must not be a number or any of the following special characters:

! # $ % & ' ( ) * + - . / : ; < > ? @

After the message hub is created, you cannot change this name.
Description
Optional.
Specifies a description for the message hub.
If you do not want a description, omit "Description":"description".

Usage NotesĀ®

  • Capitalization and double quotation marks must be used as shown.

Related REST Administration APIs

Example

Creates a message hub called MyHub by using cURL:

curl -X POST \
   -H 'Content-Type: application/json'  \
   -d  '{  
            "MessageHub":  { 
              "MyHub":  {
                 "Description": "Message Hub to service demo clients."
               }
           }   
       }    
    '  \
http://127.0.0.1:9089/ima/v1/configuration/
An example response to the POST method:

{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}