Skip to main content

Dashboards - Read Widget Data

Endpoint

/o/dashboard/data

Overview

Returns one dashboard widget object populated with widget data (dashData). Unlike /o/dashboards/widget, this endpoint loads full app objects and dispatches widget-type-specific data processors.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions

No separate feature permission flag is checked. Access is controlled by dashboard-level view rules.

Request Parameters

ParameterTypeRequiredDescription
dashboard_idStringYesDashboard ID (24-char ObjectId string).
widget_idStringYesWidget ID (24-char ObjectId string).
periodStringNoOptional period used by widget data processors.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples

Read data for one widget

/o/dashboard/data?
dashboard_id=65e1f3d2a4f41a5f6f6d7701&
widget_id=65e1f5f8a4f41a5f6f6d7703&
period=30days

Response

Success Response

{
"_id": "65e1f5f8a4f41a5f6f6d7703",
"widget_type": "analytics",
"feature": "core",
"apps": ["6991c75b024cb89cdc04efd2"],
"metrics": ["t"],
"dashData": {
"isValid": true,
"data": {
"6991c75b024cb89cdc04efd2": {
"t": 2145
}
}
}
}

Response Fields

FieldTypeDescription
_idStringWidget ID.
widget_typeStringWidget type.
appsArrayApp IDs configured for the widget.
dashData.isValidBooleanIndicates whether widget data fetch succeeded.
dashData.dataObjectWidget data map keyed by app ID or widget-specific structure.
errorBooleanPresent in access-denied branch.
dashboard_access_deniedBooleantrue when user cannot view dashboard.

Error Responses

  • 401
{
"result": "Invalid parameter: dashboard_id"
}
  • 401
{
"result": "Invalid parameter: widget_id"
}
  • 404
{
"result": "Such dashboard and widget combination does not exist."
}
  • 200 (no access)
{
"error": true,
"dashboard_access_denied": true
}

Behavior

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Widget data readValid dashboard/widget pair and access grantedLoads widget metadata and full app documents, dispatches /dashboard/data, returns enriched widget.Raw widget object
Access deniedUser fails dashboard view checkStops before data processing.Raw object with error and dashboard_access_denied

Impact on Other Data

  • Read-only endpoint; no writes.
  • Data processors may read multiple feature collections depending on widget type.

Operational Considerations

  • Widget data computation can trigger heavy reads depending on widget type and configured apps.
  • The response shape under dashData.data varies by widget type.
Implementation details

Configuration Impact

SettingDefaultAffectsUser-visible impact
dashboards.sharing_statustrueSharing modelControls whether broad sharing is possible. That affects whether non-owner users can access dashboard data reads.

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and dashboard-share access checksReads current member record and group/share context for view validation.
countly.dashboardsDashboard-widget relation validationReads dashboard containing target widget.
countly.widgetsWidget metadataReads selected widget document.
countly.appsApp metadata for widget processingReads full app documents for widget data dispatch context.