Get Chart Data
Returns the data behind a single chart, as an array of rows. Each call runs the chart’s analytics query and returns the result.
- The data matches what the chart shows in the MoEngage dashboard. It uses the chart’s saved settings, such as its date range, segment, filters, and breakdowns. You can’t change these settings through the API, because the endpoint accepts no date-range or segment parameters.
- By default, the response is served from a server-side cache. To recompute the chart with the latest data, set the
cachequery parameter tofalse. - The fields in each row depend on the chart’s analysis type: Behavior, Funnels, Retention, User, or Session and Source. To learn more about these analysis types, see MoEngage Analytics.
Authorizations
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format username:password.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your Data API Key, which you can find in the MoEngage dashboard at Settings > Account > APIs.
For more information, see Authentication.
Headers
Your MoEngage workspace ID (also known as the App ID), which identifies the workspace the request applies to. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
"ABCD1234EFGH56789"
The team ID, required only when MoEngage Teams is enabled for your workspace. Scopes the request to the specified team.
Path Parameters
The unique identifier of the dashboard. You can retrieve dashboard IDs from the List Dashboards response.
"6a10ae88f3a1896d59d5bf8f"
The unique identifier of the chart on the dashboard. You can retrieve chart IDs from the Get Dashboard Charts response.
"6a10af49f3a1896d59d5bfbd"
Query Parameters
Controls whether the chart data is served from the server-side cache. Set to false to bypass the cache and recompute the chart. Defaults to true.
Response
This response is returned when the request is processed successfully.
A unique identifier for this response. Include it when reporting issues to MoEngage Support to help trace the request.
"b3f1c0d2-2a4e-4f9b-9c1a-6d2e8f0a1b23"
The type of resource returned in the data field.
"chart_data"
The resolved chart data, as an array of metric rows.