Fetch all the available query reports for the user

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API lists all query reports along with their metadata such as Report ID, Label, Owner, View name, Description, and Last modified time.

Endpoints

Request URL

https://{server-hostname}:8383/dcapi/reports/queryReports

Scope

QueryReport.READCopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

AcceptstringMandatory
application/allQueryReports.v1+jsonapplication/allQueryReports.v1+jsonCopied!

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request GET \
  --url https://appdomain/dcapi/reports/queryReports \
  --header 'Accept: application/allQueryReports.v1+json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52'
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON object
Hide Sub-Attributes
parentstring

Parent node identifier. Always null for the root node

childrenJSON array

Array of child query-report nodes. Each element represents one saved query report. Null when no reports exist

Show Sub-Attributes
JSON object
Show Sub-Attributes
parentstring

Parent node identifier. Always queryReports for child report nodes

childrenarray

Always null for leaf nodes. Individual query reports have no children

rootboolean

Whether this node is the root. Always false for child report nodes

idstring

Unique report ID (CRSAVEVIEW_ID) identifying this saved query report

labelstring

Display name of the saved query report as set by the report creator

leafboolean

Whether this node is a leaf. Always true for individual query reports

propertiesJSON object

Additional metadata for the report including owner, view name, description, and last modified timestamp

Show Sub-Attributes
ownerstring

First name of the user who created the query report

viewNamestring

Internal view/query name stored in the database (CRVIEWNAME)

expandableboolean

Whether the node can be expanded. Always false for individual query reports

selectableboolean

Whether the node can be selected. Always true for individual query reports

descriptionstring

User-provided description of the query report

lastModifiedstring

Last modified timestamp formatted per the authenticated user's time-format preference. Example: Sep 3, 2024 01:05 PM

rootboolean

Whether this node is the root of the tree. Always true for the top-level response node

idstring

Unique identifier for this node. Always queryReports for the root node

labelstring

Localised display name for this node. Example: Query Reports

leafboolean

Whether this node is a leaf (has no children). False when children exist, true when children is null

propertiesJSON object

Additional metadata for the root node including report type and expandable/selectable flags

Show Sub-Attributes
reportTypestring

Report type identifier. Value 3 indicates Query Reports

expandableboolean

Whether the node can be expanded in the UI tree. True when child reports exist, false otherwise

selectableboolean

Whether the node can be selected in the UI tree. True when child reports exist, false otherwise

- HTTP code 417

Response Body - application/json
JSON object
Hide Sub-Attributes
errorCodestring

Error code for unauthorized MSP access. REPORT_UNAUTHORIZED = MSP non-admin user attempting to list query reports

errorMessagestring

Human-readable message indicating the user is not authorized as an MSP admin to access query reports

- HTTP code 500

Response Body - application/json
JSON object
Hide Sub-Attributes
errorCodestring

Error code for server-side failure. INTERNAL_ERROR = an unexpected error occurred while fetching the list of query reports (e.g., database exception)

errorMessagestring

Human-readable message describing the internal server error encountered while retrieving available query reports

Possible Response Codes

200HTTP code
417HTTP code
500HTTP code

Sample Response: HTTP 200

Root node with one saved query report as a child

Copied!
  {
    "parent": null,
    "children": [
      {
        "parent": "queryReports",
        "children": null,
        "root": false,
        "id": "1",
        "label": "sample",
        "leaf": true,
        "properties": {
          "owner": "user",
          "viewName": "SAMPLE",
          "expandable": false,
          "selectable": true,
          "description": "Test Description",
          "lastModified": "Sep 3, 2024 01:05 PM"
        }
      }
    ],
    "root": true,
    "id": "queryReports",
    "label": "Query Reports",
    "leaf": false,
    "properties": {
      "reportType": "3",
      "expandable": true,
      "selectable": true
    }
  }
                
Show full

Root node with no saved query reports — children is null and expandable/selectable are false

Copied!
  {
    "parent": null,
    "children": null,
    "root": true,
    "id": "queryReports",
    "label": "Query Reports",
    "leaf": true,
    "properties": {
      "reportType": "3",
      "expandable": false,
      "selectable": false
    }
  }
                
Show full

Sample Response: HTTP 417

MSP non-admin user attempting to list query reports

Copied!
  {
    "errorMessage": "You are not authorized to access this resource",
    "errorCode": "REPORT_UNAUTHORIZED"
  }
                
Show full

Sample Response: HTTP 500

Unexpected error while fetching available query reports from the database

Copied!
  {
    "errorMessage": "An internal server error occurred while retrieving query reports",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.