REST API Documentation

REST API Documentation

GET /getReportsByUserId

This API retrieves a paginated list of reports created by or shared with a user. It allows filtering by report type, publish status, and optionally, other filter criteria.

Request (POST)

{
  "pageNo": 1,
  "pageSize": 10,
  "type": "Report",
  "isPublished": true,
  "filterValue": "search",
  "date": "2024-01-01"
}

Response (200)

{
  "data": [ ... ],
  "totalRecords": 100
}

Error Handling

CodeMessage
DNX_LIB_001Request body is required.
DNX_LIB_002‘pageNo’ is missing.
DNX_LIB_003‘pageSize’ is missing.
DNX_LIB_004‘type’ is missing.
DNX_LIB_005‘isPublished’ is missing.
DNX_LIB_006Invalid date format.

GET /getSharedUser/:widgetId

This API fetches the list of users and roles with whom a widget (report or dashboard) has been shared. It requires the widgetId as a route parameter and uses the currently authenticated user’s ID as the ownerId

Request (GET)

GET /getSharedUser/12345

Response (200)

[
  { "users": [ ... ] },
  { "roles": [ ... ] }
]

Error Handling

CodeMessage
DNX_LIB_002‘widgetId’ is missing.
DNX_LIB_003‘ownerId’ is missing.

POST /getReportsByUserIdForShared

Fetches reports, dashboards, templates, or workflows that are shared with a specific user. It supports pagination, filtering, and timezone-based formatting for date/time fields.

Request (POST)

{
  "pageNo": 1,
  "pageSize": 10,
  "type": "Report",
  "filterValue": "search",
  "date": "2024-01-01"
}

Response (200)

{
  "data": [ ... ],
  "totalRecords": 100
}

Error Handling

CodeMessage
DNX_LIB_001Request body is required.
DNX_LIB_002‘pageNo’ is missing.
DNX_LIB_010‘pageSize’ is missing.
DNX_LIB_011‘type’ is missing.
DNX_LIB_006Invalid date format.

GET /getEmbedLinkDomain/:widgetId

This API retrieves a list of domains where a given widget (e.g., report/chart) is allowed to be embedded. It is typically used to control cross-origin embedding for security and configuration.

Request (GET)

GET /getEmbedLinkDomain/12345

Response (200)

[]

Error Handling

CodeMessage
DNX_LIB_013‘widgetId’ is missing.

POST /updateEmbedLinkDomain

Updates the embedding access configuration for a widget by specifying its type (e.g., Anonymous, Secure), associated domains, and other related data. This allows control over where (which domains) and how a widget (e.g., report/chart) can be embedded.

Request (POST)

{
  "detail": {
    "type": "Anonymous",
    "domain": "example.com",
    "widgetId": "12345",
    "gridType": "grid",
    "date": "2024-01-01"
  }
}

Response (200)

{ "success": true, "message": "done." }

Error Handling

CodeMessage
DNX_LIB_001Request body is required.
DNX_LIB_013‘detail’ is missing in request body.
DNX_LIB_007‘widgetId’ is missing.
DNX_LIB_011‘type’ is missing.
DNX_LIB_016‘domain’ is missing.
DNX_LIB_006Invalid date format.

POST /saveSharedRole/:obj/:widgetId

This API assigns/shares a widget (like a report or chart) with a list of user roles. It performs ownership and validity checks and ensures roles are associated only once.

Request (POST)

POST /saveSharedRole/[1,2,3]/12345

Response (200)

{ "success": true, "message": "done." }

Error Handling

CodeMessage
DNX_LIB_007‘widgetId’ is missing.
DNX_LIB_018‘obj’ is missing or invalid.
DNX_LIB_019‘userId’ is missing.
DNX_LIB_020‘clientId’ is missing.

POST /saveSharedUser/:obj/:widgetId

This API allows a user to share a widget (e.g., a chart or report) with a list of other users. It performs all necessary validations, avoids duplication, and handles recursive sharing for child widgets.

Request (POST)

POST /saveSharedUser/[1,2,3]/12345

Response (200)

{ "success": true, "message": "done." }

Error Handling

CodeMessage
DNX_LIB_007‘widgetId’ is missing.
DNX_LIB_019‘userId’ is missing.
DNX_LIB_020‘clientId’ is missing.
DNX_LIB_018‘obj’ is missing or invalid.
DNX_LIB_006Invalid date format.

POST /exportData

This API allows users to export dashboard or workflow data as a downloadable .rpt file. It supports two modes: Export by dashboard IDs (exportDashboardIds) Export by raw data (export_Data)

Request (POST)

{
  "exportDashboardIds": [1,2,3]
}
{
  "export_Data": [[{"workflowname": "wf1"}]]
}

Response (200)

Binary file download (.rpt)

Error Handling

CodeMessage
DNX_LIB_026‘exportDashboardIds’ or ‘export_Data’ is missing.
DNX_LIB_027‘workflowname’ is missing in export_Data.

POST /getWorkflowsByUserId

Retrieves workflows or deidentification (DID) workflows created by the currently logged-in user, based on filters like type and search value, with pagination support

Request (POST)

{
  "pageNo": 1,
  "pageSize": 10,
  "type": "Workflow",
  "filterValue": "search",
  "date": "2024-01-01"
}

Response (200)

{
  "data": [ ... ],
  "totalRecords": 100
}

Error Handling

CodeMessage
DNX_LIB_002‘pageNo’ is missing.
DNX_LIB_010‘pageSize’ is missing.
DNX_LIB_011‘type’ is missing.
DNX_LIB_019‘userId’ is missing.
DNX_LIB_020‘clientId’ is missing.
DNX_LIB_006Invalid date format.