[POST] /metrics/download-page
Objective:
Use this service to download the session page and all related inferred information. Each call to this service returns a maximum of 1000 records and a token (with a lifespan of one day). It is recommended to use the list-session from version 2. https://api.botmaker.com/v2.0/#/operations/list-sessions
Parameters:
- pageToken: Page token, obtained from metrics/download.
CURL Example:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'access-token: <ACCESS-TOKEN>' 'https://go.botmaker.com/api/v1.0/metrics/download-page?pageToken=2fb2085a-e5d8-4000-88d7-6380bb475db7'
Estructura de la respuesta
- fromDate [timestamp] Date when the first session in the list was generated | 2021-01-01T00:00:00.001Z.
- pageRows [number] Number of page columns | 21.
- sessions [array] List of sessions.
- variables [array] List of variables.
- varKey:varValue [type] Variables active in the session | “botmakerenvironment😀EVELOPMENT”.
- sessionDate [timestamp] Date when the session was generated | “2021-01-20T13:56:59.184Z”
- botMessages [number] Bot messages | 23.
- userHasTalked [boolean] Checks if the user has spoken | “true”
- topics [array] List of topics
- topicKey [string] Topics interacted with during the session “Identity”.
- sessionId [string] Session ID | “YPU6L8F1SA7Y8SHSVH17_2021-01-20T13:56:59.184Z”.
- platformContactId [string] Platform ID | “SBBZ2F73DL-5572714M6YG3Y5V2S0DO1L3QZMD”.
- userCreationTime [timestamp] Date when the user was first created | “2021-01-01T00:00:00.001Z”.
- sessionMessages [array] List of session messages
- creationTime [timestamp] Timestamp when the message was created | “2021-01-20T15:03:30.535Z”.
- messageId [string] Unique message ID | “83T21XKVJGQ1EZ1L1NCH”.
- messageType [string] Message type | “Text”.
- message [string] Message content | “test”.
- msgFrom [string] Origin of the message | “user”.
- imagesUrls [string] URL in Botmaker storage where the image was stored | “null”.
- audiosUrls [string] URL in Botmaker storage where the audio was stored | “null”.
- videosUrls [string] URL in Botmaker storage where the video was stored | “null”.
- filesUrls [string] URL in Botmaker storage where the file was stored | “null”.
- ruleName [string] Name of the executed intention | “Compras a domicilio”.
- operator [string] Name of the operator who interacted | “Nicolás V.”
- queue [string] Name of the service queue interacted with | “Test_Botmaker”.
- customerId [string] Unique customer ID | “YPU6L8F1SA7Y8SHSVH17”.
- userMessages [number] Number of user messages | 23.
- operatorMessages [number] Number of agent messages | 2.
- sessionMessagesQty [number] Number of session messages | 46.
- sessionStartingCause [string] Cause of session start | “Organic”.
- channelId [string] Channel ID | “testbot-webchat-null-SBBZ2F73DL”.
- conversation [string] URL of the conversation | “https://go.botmaker.com/#/chats/YPU6L8F1SA7Y8SHSVH17”.
- events [array] List of events
- eventName [string] Event name | “put-var”.
- eventCreationTime [timestamp] Event creation timestamp | “2021-01-20T14:49:09.701Z”.
- info [array] [
- name [string] Name | “key”.
- value [string] Value | “test@botmaker.io-1498255647287”.
- toDate [timestamp] Time when the last session in the list was generated | 2021-01-01T00:00:00.001Z.
- hasMore [boolean] Checks if there are more sessions | true.
- totalRows [number] Total number of columns | 200.
JSON Example:
{"pageRows":21,"sessions":[{"variables":["botmakerenvironment😀EVELOPMENT","webchathostdomain:go.botmaker.com","webchathosthref:https://go.botmaker.com/#/home","webid:SBBZ2F73DL","webchatcountry:AR","webchathostpagetitle:botmaker","webchathostreferrer:https://go.botmaker.com/","ipaddress:170.51.100.220","lastrulebuilder:testbot:FIRST_MESSAGE","nombre:test","webchathosturi:https://go.botmaker.com/#/home","webchathosturl:https://go.botmaker.com/#/home"],"sessionDate":"2021-01-20T13:56:59.184Z","botMessages":23,"userHasTalked":"true","topics":["Identidad"],"sessionId":"YPU6L8F1SA7Y8SHSVH17_2021-01-20T13:56:59.184Z","platformContactId":"SBBZ2F73DL-5572714M6YG3Y5V2S0DO1L3QZMD","sessionMessages":[{"creationTime":"2021-01-20T15:03:30.535Z","messageType":"Text","message":"test","msgFrom":"user","imagesUrls":null,"audiosUrls":null,"videosUrls":null,"filesUrls":null,"ruleName":null,"operator":null,"queue":null}],"customerId":"YPU6L8F1SA7Y8SHSVH17","userMessages":23,"operatorMessages":0,"sessionMessagesQty":46,"sessionStartingCause":"Organic","channelId":"testbot-webchat-null-SBBZ2F73DL","conversation":"https://go.botmaker.com/#/chats/YPU6L8F1SA7Y8SHSVH17","events":[{"eventName":"put-var","eventCreationTime":"2021-01-20T14:49:09.701Z","info":[{"name":"key","value":"test@botmaker.io-1498255647287"}]}]}],"hasMore":false,"totalRows":21}