History messages

Get history messages on the channel.
channel: history messages on which channel
start: start millis, excluded
end: end millis, included
limit: messages count response limits, default is 100 and max 1000

Get History messages

JavaScript

    goEasy.history({
        channel: 'my_channel', //required
        start: 1561347527648, //optional, start millis
        end: 1561347706447, //optional, end millis
        limit: 10 //optional, messages count response limits, default 100 and max 1000
    }, 
    function(response){
        console.log("Received history messages: "+ JSON.stringify(response));        
        /**        
        response example:
        {
            "code":200,
            "content":{
                "messages":[
                    {"time":1561347527649,"content":"my 001"}
                    {"time":1561347596077,"content":"my 002"}
                    {"time":1561347622613,"content":"my 003"}
                    {"time":1561347691826,"content":"my 004"}
                    {"time":1561347706447,"content":"my 005"}
                ]
            }
        }
        **/    
    });

Rest API

    Request:
        URL: http(s)://<REST HOST>/history?appkey={appkey}&channel={channel}&start={start}&end={end}&limit={limit}
        Method: GET
        Parameters:
            appkey      //required, your rest appkey
            channel     //required
            start       //optional, start time millis: 1561347527648
            end         //optional, end time millis: 1561347706447
            limit       //optional, messages count response limits, default 100 and max 1000

    Response JSON:
        //response example:           
        {
            "code":200,
            "content":{
                "messages":[
                    {"time":1561347527649,"content":"my 001"}
                    {"time":1561347596077,"content":"my 002"}
                    {"time":1561347622613,"content":"my 003"}
                    {"time":1561347691826,"content":"my 004"}
                    {"time":1561347706447,"content":"my 005"}
                ]
            }
        }

results matching ""

    No results matching ""