Skip to main content

Dashboards - Read Widget

Endpoint

/o/dashboards/widget

Overview

Returns one widget (as a single-item array) for a specific dashboard/widget pair, including widget data (dashData) resolved by widget processors.

Authentication

Countly API supports three authentication methods:

  1. API key query parameter: api_key=YOUR_API_KEY
  2. Auth token query parameter: auth_token=YOUR_AUTH_TOKEN
  3. Auth token header: countly-token: YOUR_AUTH_TOKEN

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 loaders.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Configuration Impact

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

Response

Success Response

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

Response Fields

FieldTypeDescription
[]ArrayRoot array containing the matched widget entry.
[]._idStringWidget ID.
[].widget_typeStringWidget type.
[].appsArrayApp IDs configured for widget.
[].dashDataObjectComputed widget data container.
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/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Widget readValid dashboard/widget pair and access grantedReads widget metadata, maps widget, loads app summaries, fetches widget data.Raw single-item widget array
Access deniedUser fails dashboard view checkStops before widget data load.Raw object with error and dashboard_access_denied

Impact on Other Data

  • Read-only endpoint; no writes.

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 that must include widget_id.
countly.widgetsWidget metadata and data processing inputReads widget document by _id.
countly.appsApp summary enrichmentReads app documents linked in widget apps.

Examples

Read one widget

/o/dashboards/widget?
dashboard_id=65e1f3d2a4f41a5f6f6d7701&
widget_id=65e1f5f8a4f41a5f6f6d7703&
period=7days

Last Updated

2026-02-17