Share this link

    Channels

    1653 0 Created on 2020-10-08 06:19:17; Last updated on 2022-07-01 13:01:13

    You can search and list channels for a given environment.

    Parameters

    • name: A string search on the channel name.
    • description:  A string search on the channel description. 
    • since: Returns messages created after the given timestamp (number of milliseconds since January 1, 1970, midnight UTC/GMT.) 
    • before: Returns messages created before the given timestamp. 
    • 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 following ones, it should be 25, then 50,   then 75,

    Examples

    • List the channels of environment 26112 in JSON format

    https://www.babelway.net/SelfService3/rest/v2/hub-12345/channels.json

    [
    	{
    		"id":66264,
    		"hub":26112,
    		"creationMoment":1308583384000,
    		"lastUpdateMoment":1346405222000,
    		"name":"Channel2",
    		"description":"Second test...",
    		"gatewayIn":{"id":66292,"name":"EmailBertrand2","type":"Gateway","subType":"GATEWAY_IN_SMTP_IN"},
    		"gatewayOut":{"id":64080,"name":"Email","type":"Gateway","subType":"GATEWAY_OUT_SMTP_OUT"},
    		"messageDefinitionIn":{"id":66268,"name":"SimpleCsv","type":"MessageDefinition","subType":"CSV"},
    		"messageDefinitionOut":{"id":66270,"name":"SimpleCsv","type":"MessageDefinition","subType":"CSV"},
    		"transformation":{"id":107807,"name":"k","type":"Transformation","subType":"VISUAL"},
    		"active":"false",
    		"deployed":"true",
    		"nextDeploymentAction":"desactivate"
    	},
    	{
    		"id":106823,
    		"hub":26112,"creationMoment":1337006265000,
    		"lastUpdateMoment":1342613179000,
    		"name":"dgfh",
    		"description":null,
    		"gatewayIn":null,
    		"gatewayOut":{"id":106825,"name":"dfg","type":"Gateway","subType":"GATEWAY_OUT_OFTP2_SERVER_OUT"},
    		"messageDefinitionIn":{"id":66268,"name":"SimpleCsv","type":"MessageDefinition","subType":"CSV"},
    		"messageDefinitionOut":{"id":66270,"name":"SimpleCsv","type":"MessageDefinition","subType":"CSV"},
    		"transformation":{"id":106919,"name":"sdf","type":"Transformation","subType":"VISUAL"},
    		"active":"false",
    		"deployed":"false",
    		"nextDeploymentAction":"noChange"
    	}
    ]			

    List deployed channels in environment 26112 in XML format

    https://www.babelway.net/SelfService3/rest/v2/hub-26112/channels.xml?deployed=tru

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <collection>
               <channel>
                      <id>66264</id>
                      <hub>26112</hub>
                      <creationMoment>1308583384000</creationMoment>
                      <lastUpdateMoment>1346405222000</lastUpdateMoment>
                      <name>Channel2</name>
                      <description>Second test...</description>
                      <gatewayIn>
                                  <id>66292</id>
                                  <name>EmailBertrand2</name>
                                  <type>Gateway</type>
                                  <subType>GATEWAY_IN_SMTP_IN</subType>
    </gatewayIn>
    <gatewayOut>
                     <id>64080</id>
                     <name>Email</name>
                     <type>Gateway</type>
                     <subType>GATEWAY_OUT_SMTP_OUT</subType>
    </gatewayOut>
    <messageDefinitionIn>
                    <id>66268</id>
                    <name>SimpleCsv</name>
                    <type>MessageDefinition</type>
                    <subType>CSV</subType>
    </messageDefinitionIn>
    <messageDefinitionOut>
                    <id>66270</id>
                   <name>SimpleCsv</name>
                   <type>MessageDefinition</type>
                   <subType>CSV</subType>
    </messageDefinitionOut>
    <transformation>
                    <id>107807</id>
                    <name>k</name>
                    <type>Transformation</type>
                    <subType>VISUAL</subType>
    </transformation>
    <active>false</active>
    <deployed>true</deployed>
      <nextDeploymentAction>desactivate</nextDeploymentAction>
       </channel>
    </collection>

    

    0 people found this helpful.

    Related Articles