Countly API Changes
We tried to make the API compatible the same way, so there are not many changes except for one specific endpoint for accessing data at the collection level.
If you are using DBViewer API and access data per drill collection in an API call similar to this:
https://yourdomain/o/db?api_key=API_KEY&dbs=countly_drill&collection=drill_eventsf51b86c60e3985f4332ffe708677b82896718ffe&query={}
Then, you will need to change the collection name to drill_events and put the event you query as part of the query
Countly DB Viewer changes
When accessing data using the DB Viewer section of the dashboard, previously, there were separate collections per app per event, and you could view data for each event separately with the app's read permission.
Then, in the new version, all those events for all apps will be under a single collection, drill_events, and you will only see the events for the apps you have read access to.
If you want to see a specific app and specific event, you would need to add a filter to do that, for example for the app with id 60a94dce686d3eea363ac325
and event Login
, the query would look like this:
{"a":"60a94dce686d3eea363ac325", "e":"Login"}
Using BI Tools with Countly
It will be easier to use BI tools with Countly because you do not have to think about specific collection names, which are derived from the app ID and event key. Instead, you can query only one single countly_drill.drill_events collection and construct any queries that you need.
You can utilize the "a" property of the documents to query for specific app data and the "e" property of the documents to query for a specific event key.
MongoDB query for the app with id 60a94dce686d3eea363ac325
and event Login
would look like this:
{"a":"60a94dce686d3eea363ac325", "e":"Login"}
Accessing MongoDB Data Directly
If you connect directly to MongoDB to query or export data, check if the collections you are using start with drill_eventsSOMEHASH. If yes, you would need to modify the collection name to drill_events and apply the app and event you want to query as a MongoDB query.
MongoDB query for the app with id 60a94dce686d3eea363ac325
and event Login
would look like this:
{"a":"60a94dce686d3eea363ac325", "e":"Login"}
Using Countly-provided Scripts to Export Data
All internal scripts have been modified to use the new data scheme. So if you are using any of the Countly provided scripts, you can find the modified version in the respective directory in the new release here.