Dashboard Module REST API Documentation
GET /getDashBoardList/:selectedCategory?
Returns the list of dashboards for the current user and client. Optionally filters by category.
Request (GET)
GET /getDashBoardList/{selectedCategory?}
Query Parameter: selectedCategory – comma-separated category names (optional)
Response (200)
[
{ "list": "array", "TYPE": "string" }
]
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_001 | Request body or parameters are missing or invalid. |
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_003 | ‘clientId’ is missing in request context. |
| DNX_RPT_004 | Invalid date format in selected category parameter. |
GET /getDashboardCategories
Returns the list of dashboard categories available for the current user.
Request (GET)
GET /getDashboardCategories
Response (200)
[
{ "category_name": "string" }
]
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_004 | Invalid date format in selected category parameter. |
GET /getSavePreferenceFilterById/:id
Returns the saved filter preference for a given widget/report ID.
Request (GET)
GET /getSavePreferenceFilterById/{id}
Response (200)
[ { "preference": { ... } } ]
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_005 | ‘id’ parameter for filter preference is missing. |
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_004 | Invalid date format in selected category parameter. |
GET /getWidgetIdBySubDashboardId/:id
Returns the widget(s) inside a dashboard or sub-dashboard by its ID.
Request (GET)
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The ID of the dashboard or subdashboard used to fetch its widgets |
| isIdFromExternalLink | boolean | No | Flag indicating whether the ID is coming from an embed view link |
| breakpoint | any | No | Screen width breakpoint value for responsive design |
| minHeight | any | No | Minimum height threshold for responsive design |
GET /getWidgetIdBySubDashboardId/{id}?isIdFromExternalLink=true&reportIds=1,2,3&breakpoint=1200&minHeight=500
Response (200)
{ "id": "string", "widgets": [ ... ] }
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_006 | ‘id’ parameter for dashboard/sub-dashboard is missing. |
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_003 | ‘clientId’ is missing in request context. |
| DNX_RPT_004 | Invalid date format in selected category parameter. |
| DNX_RPT_007 | Dashboard data not found. |
POST /getDataVizItemById
Returns the DataViz item (widget/report) by its ID or options.
Request (POST)
{
"id": "string",
"reportOptions": { ... },
"type": "string",
"dataSourceId": "string",
"pageNo": 1,
"pageSize": 10,
"date": "YYYY-MM-DD"
}
Response (200)
{ "data": "array", "dataSourceId": "number", "reportOptions": "object", "totalNoOfRecords": "number" }
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_001 | Request body or parameters are missing or invalid. |
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_003 | ‘clientId’ is missing in request context. |
| DNX_RPT_004 | Invalid date format in selected category parameter. |
| DNX_RPT_006 | ‘id’ parameter for dashboard/sub-dashboard/widget is missing. |
| DNX_RPT_008 | reportOptions not found. |
| DNX_RPT_009 | type not found. |
| DNX_RPT_010 | dataSourceId not found. |
POST /postPreferences
Saves user preferences for a dashboard, including field/filter preferences and download settings.
Request (POST)
{
"preferenceObject": [
{
"id": "fde8d12d-2748-4491-bbc6-ff67855a3257",
"parentId": "afe068c7-5ec6-49fc-ba81-a24b3a779af1",
"fieldPreference": "[{\"id\":\"fde8d12d-2748-4491-bbc6-ff67855a3257\",\"dimension\":[{\"tableName\":\"PI_Register\",\"columnName\":\"Merch\",\"viewColumnName\":\"Merch\",\"dataSourceId\":\"816\",\"isHiddenByPreference\":false}],\"measure\":[{\"tableName\":\"PI_Register\",\"columnName\":\"PI_\",\"viewColumnName\":\"PI_\",\"dataSourceId\":\"816\",\"isHiddenByPreference\":true}]}]",
"filterPreference": "[{\"id\":\"fde8d12d-2748-4491-bbc6-ff67855a3257\",\"dimension\":[{\"tableName\":\"PI_Register\",\"columnName\":\"Merch\",\"viewColumnName\":\"Merch\",\"dataSourceId\":\"816\",\"isHiddenByPreference\":false}],\"measure\":[{\"tableName\":\"PI_Register\",\"columnName\":\"PI_\",\"viewColumnName\":\"PI_\",\"dataSourceId\":\"816\",\"isHiddenByPreference\":true}]}]"
}
],
"downloadpreference": {
"preferencestyle": "{\"header\":{\"showhead\":false},\"footer\":{\"showfoot\":false},\"logo\":{\"showlogo\":false},\"excelpreference\":{\"showtitle\":false}}",
"dashboard_id": "afe068c7-5ec6-49fc-ba81-a24b3a779af1"
},
"dashboardId": "afe068c7-5ec6-49fc-ba81-a24b3a779af1",
"reportType": "LinkedReport"
}
Response (200)
{
"success": true,
"message": "user preference saved."
}
Error Handling
| Code | Message |
|---|---|
| DNX_RPT_002 | ‘userId’ is missing in request context. |
| DNX_RPT_003 | ‘clientId’ is missing in request context. |
| DNX_RPT_011 | Missing or invalid downloadPreference. |
| DNX_RPT_012 | Missing or invalid preferenceObj for dashboard. |
| DNX_RPT_013 | Missing or invalid dashboardId for dashboard. |
