Dashboards

Dashboard Widget Objects

Dashboard widget objects are database documents that define data visualizations. Each widget has a unique _id used to export data via REST API.

Widget Types

TypeDescription
barChartVertical or horizontal bar charts
pieChartPie or doughnut charts
lineLine graph visualizations
pivotNumbersMulti-value numeric displays with breakdowns
pivotTableTabular pivot data

Getting the Dashboard Widget Id

Chart and Pivot widgets will have a "Copy widget id" located top right of the widget within the vertical 3 dot dropdown.
Copy this widget id of the dashboard and use this id value in your path param.

API Endpoints

Export Widget Data (CSV)

Exports widget data as CSV files. Supported for all widget types.

Endpoint: GET /api/v2/dashboard-widgets/{widgetId}/export

Query Parameters:

  • widgetId (required): Widget _id from the database
  • type (optional): default or detailed (default: default)
  • format (optional): csv (default: csv)
  • api_key (required): User API key

Response:

{
  "fileUrl": "https://example.com/downloads/widget-export.csv",
  "metadata": {
    "widgetType": "barChart",
    "exportType": "detailed",
    "format": "csv"
  }
}

Example:

curl -X GET \
  "https://app.hive.com/api/v2/dashboard-widgets/abc123xyz/export?type=detailed" \
  -H "api_key: your_api_key"

Get Widget Data (JSON)

Returns widget data as JSON for programmatic access. Only supported for barChart, pieChart, and line types.

Not available for pivotTable or pivotNumbers - use export endpoint instead.

Endpoint: GET /api/v2/dashboard-widgets/{widgetId}/data

Query Parameters:

  • widgetId (required): Widget _id from the database
  • workspace_id (required): Workspace identifier
  • user_filter_id (optional): Specific filter configuration
  • api_key (required): User API key

Example:

curl -X GET \
  "https://app.hive.com/api/v2/dashboard-widgets/abc123xyz/data?workspace_id=ws789" \
  -H "api_key: your_api_key"

Object Structure

Core Properties

PropertyTypeDescription
_idstringUnique identifier for API requests
typestringWidget type (barChart, pieChart, line, pivotNumbers, pivotTable)
workspaceIdstringAssociated workspace ID
titlestringWidget display title
deletedbooleanSoft delete flag

Data Configuration

PropertyTypeDescription
reportOnstringData source: actions, projects, time, goals
XAxisstringPrimary dimension (e.g., projectNames, projectStatuses)
XAxisCustomFieldIdstringCustom field ID for X-axis
YAxisstringMetric (e.g., countOfActions, estimatedTime, projectBudget)
YAxisCustomFieldIdstringCustom field ID for Y-axis
aggFuncstringAggregation: sum, count, avg, min, max

Display Options

PropertyTypeDescription
chartTypestringVisual type: verticalBar, horizontalBar, pie, doughnut, lineGraph
sortstringSort order: ascending, descending
showTitlesbooleanDisplay axis titles
showLegendbooleanDisplay legend
legendPositionstringLegend placement: top, bottom, left, right
showValueLabelsbooleanDisplay values on data points
displayGroupsAsstringPivot layout: rows, columns

Example Objects

Bar Chart

{
  "_id": "abc123xyz",
  "type": "barChart",
  "workspaceId": "ws789",
  "title": "Budget by Project",
  "reportOn": "projects",
  "chartType": "verticalBar",
  "XAxis": "projectNames",
  "YAxis": "projectBudget",
  "aggFunc": "sum",
  "sort": "descending",
  "showLegend": false,
  "groupOthers": {
    "type": "firstN",
    "firstN": 15,
    "showOthers": false
  }
}

Pivot Table

{
  "_id": "def456ghi",
  "type": "pivotTable",
  "workspaceId": "ws789",
  "title": "Time Analysis",
  "reportOn": "time",
  "XAxis": "projects",
  "YAxis": "estimatedTime",
  "aggFunc": "sum",
  "displayGroupsAs": "rows",
  "showRowTotals": false,
  "showColumnTotals": false
}

Number Widget

{
  "_id": "ghi789jkl",
  "type": "pivotNumbers",
  "workspaceId": "ws789",
  "title": "Project Count by Status",
  "reportOn": "projects",
  "XAxis": "projectStatuses",
  "YAxis": "countOfProjects",
  "aggFunc": "sum",
  "titleSize": "H3",
  "truncateLongNumbers": false,
  "timeUnitsType": "hours"
}

Authentication

Include your API key via header or query parameter:

-H "api_key: your_api_key"
# or
?api_key=your_api_key

Generate API keys in your Hive workspace settings.

Error Codes

CodeDescription
400Invalid parameters or unsupported widget type
401Missing or invalid API key
404Widget not found
504Export timeout (large datasets)

Notes

  • CSV exports may take up to 15 minutes for large datasets
  • Dashboard-level filters apply unless ignoreContainerFilter is true
  • Deleted widgets cannot be exported
  • pivotTable and pivotNumbers widgets only support the /export endpoint
  • Chart widgets (barChart, pieChart, line) support both /export and /data endpoints