User GuideReference ManualIntegration Scenarios
 

7.4. Channels

You can search and list channels for a given account environment.

URL Endpoint

http://www.babelway.net/SelfService/rest/v1/hub-{hubId}/channels.{format}

where

  • format : either 'json' or 'xml'

  • hubId : the ID of your account environment. It can be found on your account page.

HTTP Method

GET

Requires authentification

yes ( About authentication )

Parameters can be added to filter the query

name

A string search on the channel name

descr

a string search on the channel description

since

Returns messages created after the given timestamp. Timestamp should be formatted as a UNIX Epoch time (number of seconds since the first of January 1970)

before

Returns messages created before the given timestamp. Timestamp should be formatted as a UNIX Epoch time (number of seconds since the first of January 1970)

deployed

'true' or 'false' : returns channels that are deployed or not (i.e. in production). If not set, the API returns all channels regardless of their deployed state.

start

An integer to set the first result. By default, the value is at 0. The API returns 25 results per query. To get the 25 next one, it should be 25, then 50, then 75, ...

Examples

  • List the channels of environment 12345 in JSON format

    https://www.babelway.net/SelfService/rest/v1/hub-12345/channels.json

    [
       {
          "channel":{
             "active":false,
             "createdOn":1300956076928,
             "deletedOn":0,
             "deployed":false,
             "gatewayIn":{
                "id":123456,
                "name":"web in",
                "subType":"GATEWAY_IN_WEB_IN",
                "type":"GATEWAY_IN"
             },
             "id":32697,
             "lastUpdatedOn":1301414634929,
             "name":"my channel",
             "nextDeploymentLabel":"No Change"
          }
       },
       {
          "channel":{
             "active":false,
             "createdOn":1296203383344,
             "deletedOn":0,
             "deployed":false,
             "gatewayIn":{
                "id":65932,
                "name":"Soap In",
                "subType":"GATEWAY_IN_HTTP_IN",
                "type":"GATEWAY_IN"
             },
             "id":25674,
             "lastUpdatedOn":1301414606163,
             "name":"another channel of mine",
             "nextDeploymentLabel":"No Change"
          }
       }
    ]
    			
  • List deployed channels in environment 12345 in XML format

    https://www.babelway.net/SelfService/rest/v1/hub-12345/channels.xml?deployed=true

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <collection>
    	<channel>
    		<active>true</active>
    		<createdOn>1292234577391</createdOn>
    		<deletedOn>0</deletedOn>
    		<deployed>true</deployed>
    		<gatewayIn>
    			<id>32459</id>
    			<name>internal in</name>
    			<subType>GATEWAY_IN_INTERNAL_IN</subType>
    			<type>GATEWAY_IN</type>
    		</gatewayIn>
    		<id>54782</id>
    		<lastUpdatedOn>1296667044481</lastUpdatedOn>
    		<name>The name of my channel<name>
    		<nextDeploymentLabel>No Change</nextDeploymentLabel>
    	</channel>
    </collection>