Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Returns the complete transcript of a currently active chat.

Status
colourGreen
titleHTTP GET
/livechat/getChatHistory/:chatId

Path Variables:

Name

Mandatory

Type

Description

chatId

Status
colourRed
titleYES

Status
titleSTRING

Unique Chat identifier

Response:

Example:

http://<host>:<port>/livechat/getChatHistory/CHAT_97656d2c-28b4-41fc-af38-111066cefcaf

...

Type:
Status
titleJSONP

Name

Type

Description

result

Status
titleBOOLEAN

If true, the service response was performed correctly

messages

Status
titleARRAY

An Array that contains all the messages objects

error

Status
titleNULL
/
Status
titleSTRING

Contains the error description if an error has occurred in the request

Example:

Request

http://<hostname>:<port>/livechat/getChatHistory/CHAT_97656d2c-28b4-41fc-af38-111066cefcaf

...

Response

Code Block
languagejson
{ 
   "result":true,
   "messages":[ 
      { 
         "room":"CHAT_97656d2c-28b4-41fc-af38-111066cefcaf",
         "data":{ 
            "id":"30e4e957-cddd-43ee-9d38-ae4acc6c7617",
            "messageType":"TEXT",
            "content":{ 
               "text":"Salve",
               "user":{ 
                  "id":"USER_gverde1@acd.enghouse.com",
                  "nickname":"Gabriele Verde",
                  "isAgent":true,
                  "beginTime":1568883355257,
                  "endTime":"",
                  "isOnline":true,
                  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36",
                  "firstUri":"http://localhost:3003/AD/AD.html",
                  "firstTitle":"AgentDesktop - Enghouse Interactive",
                  "channel":"web",
                  "firstIP":"::ffff:127.0.0.1"
               }
            },
            "ts":1568883380589
         }
      },
      { 
         "room":"CHAT_97656d2c-28b4-41fc-af38-111066cefcaf",
         "data":{ 
            "id":"91c4070d-2140-43f0-a107-3d43593420a9",
            "messageType":"TEXT",
            "content":{ 
               "text":"salve",
               "user":{ 
                  "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e",
                  "nickname":"Customer",
                  "isAgent":false,
                  "beginTime":1568883353620,
                  "endTime":"",
                  "isOnline":true,
                  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36",
                  "firstUri":"http://localhost:3001/domain/test.html",
                  "firstTitle":"LiveChat - Test Page",
                  "channel":"web",
                  "firstIP":"::1"
               }
            },
            "ts":1568883386307
         }
      },
      { 
         "room":"CHAT_97656d2c-28b4-41fc-af38-111066cefcaf",
         "data":{ 
            "id":"57694a8b-53f6-4b90-b1fb-ce112a4015e1",
            "messageType":"TEXT",
            "content":{ 
               "text":"ho bisogno di informazioni",
               "user":{ 
                  "id":"USER_c8e1eb84-60d3-4d69-b10b-96364845023e",
                  "nickname":"Customer",
                  "isAgent":false,
                  "beginTime":1568883353620,
                  "endTime":"",
                  "isOnline":true,
                  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36",
                  "firstUri":"http://localhost:3001/domain/test.html",
                  "firstTitle":"LiveChat - Test Page",
                  "channel":"web",
                  "firstIP":"::1"
               }
            },
            "ts":1568883398127
         }
      }
   ],
   "error":null
}

...