getAnalytics api response

when I am using the
https://{{host}}/api/public/bot/{{BotID}}/getAnalytics
API with the following status body:
{
“type”: “successintent”,
“filters”: {
“from”: “2024-04-08T17:25:09.698Z”,
“to”: “2024-05-15T17:25:09.698Z”,
“channel”: [
“hangoutchat”
]
}
}
the response for this request I am receiving is past 24hr data, but I want data for the time period which I will mention in above request. I need a solution for this query.

Hello Akash,

Thank you for reaching out to Kore.ai Community.

Please try using the below Curl and let us know if you are receiving the expected response.

curl --location 'https://bots.kore.ai/api/public/bot/bot-id/getAnalytics' \
--header 'Content-Type: application/json' \
--header 'auth: <Your JWT Token>' \
--data-raw '{
    "type": "successtask",
    "filters": {
        "from": "2023-12-11",
        "to": "2023-12-27",
        "channel": [
            "rtm",
            "abcd@kore.com"
        ],
    
        "isAmbiguous": false,
        "isDeveloper": false,
        "trained": false,
        "userId": [
            "u-dbe9d3f6-3b86-543f-82ad-f24312af4570"
        ]
    },
    "limit": 50
}'

Note:
Please replace the Bot ID, JWT Token, Type, Channel, email id, user-id as per your requirement and test the use case.

Hope this helps.

Thank you,
Srujan Madderla
Kore.ai Community Team

Hello Srujan,
I have changed the request body as per my requirement as below:
{
“type”: “successintent”,
“filters”: {
“from”: “2024-05-05”,
“to”: “2024-05-16”,
“channel”: [
“hangoutchat”
]
},
“limit”: 50
}

I checked the timestamp in response body as it is containing past 24hr data