Share this link

    Messages

    1336 1 Created on 2020-10-07 11:37:25; Last updated on 2022-07-01 13:01:13

    Search and list messages.

    Parameters

    Parameters can be added to filter the query.

    • key: A message key. 
    • channel: A string search in the channel name. 
    • 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 (number of milliseconds since January 1, 1970, midnight UTC/GMT.) 
    • gatewayIn: A string search in the gateway in name. 
    • gatewayOut: A string search in the gateway out name. 
    • maxInSize: The maximum size of the incoming message (in bytes). 
    • minInSize: The minimum size of the incoming message (in bytes). 
    • errorDescription: A string search within the error description. 
    • ref: The message reference.
    • status: The status of the message. The accepted values are IN_PROGRESS, PAUSED, IN_DELIVERY, SUCCESS, ERROR, ERROR_CLOSED. 
    • type: The type of ticket. The accepted values are REGULAR and TEST. 
    • 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

    Get regular messages that ended up in success in JSON format in environment 12345https://www.babelway.net/SelfService3/rest/v2/hub-12345/messages.json?status=DONE&type=REGULAR

    [
    	{
    		"message":6442207,
    		"hub":26112,
    		"creationMoment":1330072230000,
    		"key":"5914d53b-cb39-4221-ad0d-42a2af8d487c",
    		"test":"false",
    		"testCase":0,
    		"status":"DONE",
    		"channel":{"id":66264,"name":"Channel2","type":"Channel","subType":"CHANNEL"},
    		"gatewayIn":{"id":66292,"name":"EmailBertrand2","type":"Gateway","subType":"GATEWAY_IN_SMTP_IN"},
    		"gatewayOut":{"id":64080,"name":"Email","type":"Gateway","subType":"GATEWAY_OUT_SMTP_OUT"},
    		"reference":"brol.csv",
    		"longTerm":"false",
    		"acknowledgmentMoment":null,
    		"acknowledgmentReference":null,
    		"errorDescription":null,
    		"receiveMoment":1330072230000,
    		"gatewayInMoment":1330072230000,
    		"gatewayOutMoment":1330072231000,
    		"gatewayInMessageStatus":"Received from 74.125.82.177 using Smtp In server",
    		"gatewayInMessageKey":"<4F474AA3.2070203@babelway.com>",
    		"gatewayOutMessageKey":null
    	},
    	{
    		"message":6481099,
    		"hub":26112,
    		"creationMoment":1330336124000,
    		"key":"4c196771-5a93-4d67-b7ac-6c45f9268886",
    		"test":"false",
    		"testCase":0,
    		"status":"DONE",
    		"channel":{"id":66264,"name":"Channel2","type":"Channel","subType":"CHANNEL"},
    		"gatewayIn":{"id":66292,"name":"EmailBertrand2",
    		"type":"Gateway","subType":"GATEWAY_IN_SMTP_IN"},
    		"gatewayOut":{"id":64080,"name":"Email","type":"Gateway","subType":"GATEWAY_OUT_SMTP_OUT"},
    		"reference":"brol.csv",
    		"longTerm":"false",
    		"acknowledgmentMoment":null,
    		"acknowledgmentReference":null,
    		"errorDescription":null,
    		"receiveMoment":1330336124000,
    		"gatewayInMoment":1330336124000,
    		"gatewayOutMoment":1330336126000,
    		"gatewayInMessageStatus":"Received from 209.85.214.49 using Smtp In server",
    		"gatewayInMessageKey":"<4F4B517A.6090307@babelway.com>",
    		"gatewayOutMessageKey":null
    	}
    ]			
    			

    1 people found this helpful.

    Related Articles