Create a Route

post

/nodes/{srcNodeId}/route

Creates a route.

Request

Path Parameters
Supported Media Types
Request Body - application/json;charset=utf-8 ()
Root Schema : schema
Type: object
Payload schema to create a route between two nodes
Show Source
Nested Schema : routingAttrs
Match All
Show Source
Nested Schema : routingFunction
Match All
Show Source
  • Allowed Values: [ "DIRECTED", "MODULUS", "MULTICAST", "ROUND_ROBIN" ]
  • Routing function used for the channel
    Example: DIRECTED
Nested Schema : RouteUpdateRequestRoutingAttrs
Type: object
Schema defining routing attributes for a route update request
Show Source
Nested Schema : operand1
Type: array
Values against which operator acts on the routing field
Show Source
Nested Schema : operand2
Type: array
Values against which operator acts on the routing field, two operands are required when an operator is used which requires 3 variables, e.g. - IN_BETWEEN operator
Show Source
Nested Schema : operator
Match All
Show Source
  • Allowed Values: [ "EQUALS", "GREATER_THAN", "IN_BETWEEN", "LESS_THAN", "LIST_EQUALS", "LIST_NOT_EQUALS", "NOT_EQUALS", "NOT_SUBSET_OF", "SUBSET_OF" ]
  • Expression representing action to be performed on routing field
    Example: EQUALS
Back to Top

Response

Supported Media Types

201 Response

The requested route has been created.
Body ()
Root Schema : RouteResponse
Type: object
Response schema to get a route's information.
Show Source
Nested Schema : routingAttrs
Match All
Show Source
  • RoutingAttributes
    Schema defining routing attributes for a route.
  • Attributes against which routing fields are compared using various operations.
Nested Schema : routingFunction
Match All
Show Source
  • Allowed Values: [ "DIRECTED", "MODULUS", "MULTICAST", "ROUND_ROBIN" ]
  • Routing function used for the channel.
    Example: DIRECTED
Nested Schema : RoutingAttributes
Type: object
Schema defining routing attributes for a route.
Show Source
Nested Schema : operand1
Type: array
Values against which operator acts on the routing field.
Show Source
Nested Schema : operand2
Type: array
Values against which operator acts on the routing field, two operands are required when an operator is used which requires 3 variables. e.g. - IN_BETWEEN operator
Show Source
Nested Schema : operator
Match All
Show Source
  • Allowed Values: [ "EQUALS", "GREATER_THAN", "IN_BETWEEN", "LESS_THAN", "LIST_EQUALS", "LIST_NOT_EQUALS", "NOT_EQUALS", "NOT_SUBSET_OF", "SUBSET_OF" ]
  • Expression representing action to be performed on routing. field
    Example: EQUALS

400 Response

The request cannot be processed due to a client error.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

401 Response

The client does not have the correct privileges.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

403 Response

The request was not authorized.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

404 Response

The requested resource cannot be found.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

405 Response

This method is not allowed.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

409 Response

The request cannot be processed due to a conflict in the existing state of the resource.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

500 Response

The system has encountered an internal server error.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source

501 Response

The method is not supported.
Body ()
Root Schema : Error
Type: object
Used when an API encounters an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx).
Show Source
Back to Top

Examples

The following example shows how to create a route by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

The -d option specifies the file to attach as the request body.

curl -X POST 'http://host:port/nodes/31eoen-otm-lne9hugk/route' -d @sampleCreateRoute.json

Example of Request Body

The following is an example of the contents of the sampleCreateRoute.json file sent as the request body.

{
  "destinationNodeID": "31eoen-otm-lnejuqgh",
  "routingAttrs": {
    "operand1": [
      "string"
    ],
    "operand2": [
      "string"
    ],
    "operator": "EQUALS"
  },
  "routingField": "string",
  "routingFunction": "MULTICAST"
}

Example of Response Body

If successful, the response code 201 is displayed with the following response body.

{
  "destinationNodeID": "31eoen-otm-lne9iglo",
  "routingAttrs": {
    "operand1": [
      ""
    ],
    "operand2": [
      ""
    ]
  },
  "routingField": "",
  "routingFunction": "MULTICAST",
  "sourceNodeID": "31eoen-otm-lne9hugk"
}
Back to Top