do we have a way to integrate through api from my webapp with a date range make that change dynamically the insights that i have created on mixpanel?
Hi Emanuel F., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Yes, you can integrate your web app with Mixpanel via API to dynamically query Insights reports with a specified date range. Mixpanel provides a Query API (specifically, the /insights endpoint) that allows you to fetch data from your saved Insights reports. You can specify parameters such as the report (using the bookmark_id) and the project, and you can adjust the date range for each API call.This means your web app can programmatically change the date range and retrieve updated results from the same Insights report, making the integration dynamic and responsive to user input or other logic in your app. The API supports parameters for date ranges, so you can set these as needed in your requests. Here’s a summary of how it works: - Use the Query API’s /insights endpoint. - Pass the required parameters, including the report’s bookmark_id and the desired date range. - The API will return the report data for the specified date range, allowing your app to display or process it as needed.For more details on the API and its parameters, see the official documentation: Query API - Insights.Additionally, Mixpanel’s UI allows for dynamic date range selection, and these can be mirrored in your API calls to ensure consistency between your app and Mixpanel’s reports. The date range options are flexible, supporting presets, custom ranges, and even minute-level granularity if needed Reports Overview: Date Range.If you need to export the formatted results as seen in the web app, this is supported for Growth or Enterprise plans via the Query API. Free plan users can export via the UI only Exporting Reports.
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.
kapa.ai but i was checking and we only have that params on the insights query Query Params project_id integer required Required if using service account to authenticate request. workspace_id integer The id of the workspace if applicable. bookmark_id integer required The ID of your Insights report can be found from the url: https://mixpanel.com/project/<YOUR_PROJECT_ID>/view/<YOUR_WORKSPACE_ID>/app/boards#id=12345&editor-card-id=%22report-<YOUR_BOOKMARK_ID>%22
Let me check the knowledge base for you again. One moment! 📚
You are correct—according to the knowledge sources, the /insights endpoint of the Mixpanel Query API only accepts the following parameters: project_id, workspace_id, and bookmark_id. There is no documented support for passing a custom date range directly in the API request for the /insights endpoint. The date range used will be the one saved in the report at the time it was created or last edited in the Mixpanel UI.This means you cannot dynamically override the date range of a saved Insights report via the API; you can only retrieve the report as it is currently configured in Mixpanel. If you need dynamic date ranges, you would need to use other endpoints (such as segmentation or JQL) that allow specifying date ranges, or update the report in the Mixpanel UI before querying it via the API.Here is the relevant documentation excerpt: > The /insights endpoint parameters are: project_id (required), workspace_id (optional), and bookmark_id (required). There is no parameter for date range override in the API call itself. Query API - InsightsIf you need to run dynamic queries with custom date ranges, consider using the Segmentation or JQL endpoints, which do allow you to specify date ranges in the API request.
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.