How can I use QUERY API in power BI to pull the insight report data only to Power BI as a table or JSON file? kapa.ai
To use the Mixpanel Query API in Power BI to pull Insights report data, you can follow these steps: 1. Use the Insights Query API endpoint:
You'll need to make a GET request to the /insights
endpoint of the Mixpanel Query API. 2. Required parameters:
- project_id
: Your Mixpanel project ID
- bookmark_id
: The ID of your Insights report3. Authentication:
Ensure you have the necessary authentication credentials to access the API.4. In Power BI:
- Use the "Web" data source to connect to the API endpoint.
- Construct the URL with your project_id and bookmark_id.
- Handle the authentication as required by Mixpanel.
- The data will be returned in JSON format, which Power BI can parse.Here's an example of what the API response structure looks like: LBKS{ "computed_at": "string", "date_range": { "from_date": "string", "to_date": "string" }, "headers": ["string"], "series": { "Event Name": { "2020-08-17T00:00:00-07:00": 7832, "2020-08-24T00:00:00-07:00": 6234 } } }LBKS
You can then transform this JSON data into a table format in Power BI as needed.For more detailed information on using the Insights Query API, refer to the Mixpanel Developer Documentation.Note that the Query API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries, so be mindful of these limitations when setting up your Power BI refresh schedule.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.