Create a new custom report with table or chart components

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

Creates a new custom report. Supports either table or chart component types.

Request URL

https://{serverurl}/dcapi/reports/customReports/v2

Scope

DesktopCentralCloud.CustomReport.CREATECopied!

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/customReport.v2+jsonapplication/customReport.v2+jsonCopied!
AcceptstringMandatory
application/savedCustomReport.v2+jsonapplication/savedCustomReport.v2+jsonCopied!

- Query Parameters

saveReportbooleanOptional

When true, the report is saved permanently. When false (default), a preview is generated and will be deleted within 1 day.

- Request Body

application/json
JSON Object
Hide Sub-Attributes
reportNamestringMandatory

Display name of the custom report. Must be unique when saving

reportDescstringOptional

Optional description of the custom report

subModulestringMandatory

Sub-module name (e.g., Computer, Hardware, Software). Fetch from Get Available Columns

criteriaJSON ArrayOptional

Array of filter criteria objects for filtering report data

Show Sub-Attributes
JSON Object
Show Sub-Attributes
columnIDlongOptional

Column ID the criteria is applied on. Fetch from Get Available Columns

searchValuearrayOptional

Array of search values for the criteria

comparatorstringOptional

Comparison operator (e.g., contains, equal, greater than, less than, not equal)

logicalOperatorstringOptional

Logical operator (AND or OR) for combining with previous criteria

selectComponentsJSON ArrayMandatory

Array of selected column objects for table reports. Each object specifies a column and optional aggregation

Show Sub-Attributes
JSON Object
Show Sub-Attributes
columnIDlongMandatory

Column ID from the available columns API. Fetch from Get Available Columns

aggregationstringOptional

Aggregation method: SUM, AVG, COUNT, MIN, MAX, STRING_AGG, JSON_AGG, or ACTUAL_VALUE. Defaults to ACTUAL_VALUE if omitted

groupbyarrayOptional

Array of column IDs to group by. Required when aggregation is applied

criteriaPatternstringOptional

Custom criteria pattern defining how criteria are combined (e.g., (1 AND 2) OR 3)

componentTypestringMandatory

Type of report component: Table or Chart

chartMetaJSON ObjectOptional

Chart configuration object. Required when componentType is Chart

Show Sub-Attributes
chartTypestringOptional

Chart type identifier (e.g., bar, pie, line, area, dial, radar, scatter, bubble, stackedBar, wordCloud, pyramid, packedBubble, funnel). Fetch available types from Get Available Charts

xAxisJSON ObjectOptional

X-axis column configuration

Show Sub-Attributes
columnIDlongOptional

Column ID for the X-axis. Fetch from Get Available Columns

yAxisJSON ObjectOptional

Y-axis column configuration with aggregation

Show Sub-Attributes
columnIDlongOptional

Column ID for the Y/Z-axis. Fetch from Get Available Columns

aggregationstringOptional

Aggregation method for the axis (cannot be ACTUAL_VALUE). Values: SUM, AVG, COUNT, MIN, MAX, STRING_AGG, JSON_AGG

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomains/dcapi/reports/customReports/v2 \
  --header 'Accept: application/savedCustomReport.v2+json' \
  --header 'Authorization: Zoho-oauthtoken  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/customReport.v2+json' \
  --data '{"componentType":"Table","reportName":"Active Computers Report","subModule":"Computer","selectComponents":[{"columnID":"101"},{"columnID":"102"},{"columnID":"105"}]}'

Sample Request Body

Create a table-based custom report with column selection, grouping, and criteria

Copied!
  {
    "componentType": "Table",
    "reportDesc": "List of all active computers with OS details",
    "reportName": "Active Computers Report",
    "subModule": "Computer",
    "selectComponents": [
      {
        "columnID": "101"
      },
      {
        "columnID": "102"
      },
      {
        "columnID": "105",
        "aggregation": "COUNT"
      }
    ],
    "criteria": [
      {
        "comparator": "contains",
        "logicalOperator": "AND",
        "columnID": 103,
        "searchValue": [
          "Windows"
        ]
      }
    ],
    "groupby": [
      "101"
    ],
    "criteriaPattern": "(1)"
  }
                
Show full

Create a chart-based custom report with pie chart configuration

Copied!
  {
    "componentType": "Chart",
    "reportName": "OS Distribution Chart",
    "subModule": "Computer",
    "chartMeta": {
      "yAxis": {
        "columnID": "101",
        "aggregation": "COUNT"
      },
      "xAxis": {
        "columnID": "103"
      },
      "chartType": "pie"
    }
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
reportIdlong

Unique ID of the created/previewed custom report

reportNamestring

Display name of the report

viewNamestring

Internal view name (e.g., CRVIEW_1711234567890)

ownerstring

Username of the report creator

customerIdlong

Customer ID (or null for all customers)

- HTTP code 400

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodelong

Numeric error code: report name exists, column/criteria limits exceeded, invalid column IDs, aggregation mismatch, or invalid chart axis configuration

errorMessagestring

Detailed error description indicating the specific validation failure

- HTTP code 401

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodelong

Unauthorized error code: credentials missing, expired, or invalid

errorMsgstring

Authentication failure reason

- HTTP code 403

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodelong

Error code indicating insufficient permissions

errorMsgstring

Message indicating insufficient privileges to access this resource

- HTTP code 429

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodelong

Rate limit error code returned when the API call reached threshold

errorMsgstring

Rate limit exceeded message with retry guidance

Possible Response Codes

200HTTP code
400HTTP code
401HTTP code
403HTTP code
429HTTP code

Sample Response: HTTP 200

Custom report successfully created

Copied!
  {
    "owner": "admin",
    "reportId": 1005,
    "reportName": "Active Computers Report",
    "viewName": "CRVIEW_1711234567890",
    "customerId": 2
  }
                
Show full

Sample Response: HTTP 400

Report name already exists

Copied!
  {
    "errorMessage": "A custom report with this name already exists",
    "errorCode": 12345
  }
                
Show full

Sample Response: HTTP 401

Missing or invalid authentication token

Copied!
  {
    "errorMessage": "Authentication token is missing or invalid",
    "errorCode": "401"
  }
                
Show full

Sample Response: HTTP 403

User does not have the required role

Copied!
  {
    "errorMessage": "User does not have the required role to access this resource",
    "errorCode": "403"
  }
                
Show full

Sample Response: HTTP 429

Rate limit exceeded

Copied!
  {
    "errorMessage": "Rate limit exceeded. Please retry after some time",
    "errorCode": "429"
  }
                
Show full

Duration: 1 minute | Threshold: 15 | 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.