Hey @iryna_chorna
I see two other ways of doing this via API if that’s what your primary use case is.
Let me know if I have interpreted your use case correctly. Hope this helps.
@Saish Redkar , thank you! I was able to get the events number with segmentation API endpoint.
But I’ve run into an issue:
the number of events (e.g. “series” field) is not updated when repeating API call after firing the event in the application. Is the response cached somehow? The number is updated in Amplitude UI almost immeditaly wherease API call returns old number of events. Here are more detailed steps:
- Execute request
https://amplitude.com/api/2/events/segmentation?e={ "event_type": "my_event_name"}&start=20220629&end=20220629&m=totals
Response is as follows:
-
{
"data": {
"series": "
264
]
],
"seriesCollapsed": l
{
"setId": "",
"value": 264
}
]
],
"seriesLabels": s
0
],
"xValues": x
"2022-06-29"
]
},
"timeComputed": 1656512876764,
"wasCached": true,
"cacheFreshness": "FRESH",
"novaRuntime": 101,
"novaRequestDuration": 184,
"novaCost": 0,
"throttleTime": 0,
"minSampleRate": 1.0,
"transformationIds": t],
"backend": "novaV2",
"realtimeDataMissing": false,
"timedOutRealtimeData": false,
"missedCacheAndNotComputed": false,
"partialMergedAndNewUserInformation": false,
"prunedResult": false,
"hitChunkGroupByLimit": false,
"subcluster": 6,
"millisSinceComputed": 554841,
"queryIds": u
"lD3O7HB2Oy"
]
}
- Go to the app, fire event (open a page)
- Repeat the request from step1. Here I expect “series” to have value 265, but it’s still 264
What could be a reason for that? Thank you in advance
This could be happening due to caching.