eventUpdated: 8/8/2024
[GET] /metrics/
Note: This API is deprecated and no longer supported. While it is still active, we strongly recommend using the List Sessions API available in the Botmaker v2.0 documentation to extract the same session data.
Estimated reading time: 1 minute
Objective:
This service is used to return session-related metrics within a specified time range.
Parameters:
- dateISOFrom: ISO date format. Used as the starting point to return records.
- dateISOTo: ISO date format. Used as the endpoint to return records.
Curl Example:
curl -X GET --header 'Accept: application/json' --header 'dateISOFrom: 2020-01-01T00:00:00.000Z' --header 'dateISOTo: 2020-01-01T23:59:00.000Z' --header 'access-token: <ACCESS TOKEN>' 'https://go.botmaker.com/api/v1.0/metrics'
Response Structure:
- totalMsgByOp [number]: Total number of messages per operator | 35.
- totalSessions [number]: Total number of sessions | 10.
- totalUsers [number]: Total number of users | 7.
- byChannels [array]: List of channels.
- totalSessionsHandleByBots [number]: Total number of sessions handled by the bot | 2.
- totalSessionsHandleByOperators [number]: Total number of sessions handled by operators | 10.
- totalMsgByBot [number]: Total number of messages by bot | 7.
- totalMsgByUser [number]: Total number of messages by user | 9.
- totalTopics [number]: Total number of topics | 3.
Example JSON:
{"totalMsgByOp":0,"totalSessions":0,"totalUsers":0,"byChannels":,"totalSessionsHandleByBots":0,"totalSessionsHandleByOperators":0,"totalMsgByBot":0,"totalMsgByUser":0,"totalTopics":0}
Written By: Botmaker Team
Updated: 07/08/2024