Reports - Report Update
Endpoint
/i/reports/update
Overview
Updates an existing report definition.
Authentication
Countly API supports three authentication methods:
api_key=YOUR_API_KEYauth_token=YOUR_AUTH_TOKENcountly-token: YOUR_AUTH_TOKEN
Permissions
Requires reports Update permission.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Conditional | Required if auth_token is not provided. |
auth_token | String | Conditional | Required if api_key is not provided. |
app_id | String | Yes | App ID used by permission validation. |
args | String (JSON Object) | Yes | Update payload. |
args._id | String | Yes | Target report ID. |
args.apps | Array of Strings | Yes (practical) | App list validated against user access for non-global-admin users. |
args.frequency | String | No | Accepted values: daily, weekly, monthly; other values are removed from update. |
args.day | Number/String | No | Parsed to integer when provided. |
args.hour | Number/String | No | Parsed to integer when provided. |
args.minute | Number/String | No | Parsed to integer when provided. |
args.timezone | String | No | Defaults to Etc/GMT if omitted. |
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Success when update operation completes. |
Error Responses
401
{
"result": "User does not have right to access this information"
}
200
{
"result": "database error text"
}
Standard authentication/authorization errors from update validation can also be returned.
Behavior/Processing
- Parses
argsJSON before route execution. - Removes
_idfrom update payload and uses it only in query. - Removes
frequencyfrom update when value is notdaily|weekly|monthly. - Parses
day/hour/minuteto integers when provided. - Applies timezone conversion helper (
convertToTimezone). - Enforces app-level access for non-global-admin users via
args.appscheck. - Loads current report, updates report with
$set, logsreports_editedaction.
Impact on Other Data
- Updates one report document in
countly.reports. - Adds one audit entry in
countly.systemlogson success.
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.reports | Report storage | Reads existing report and updates target document. |
countly.systemlogs | Audit trail | Receives reports_edited action with before/update payload. |
Examples
Update schedule and recipients
/i/reports/update?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
args={"_id":"6262742dbf7392a8bfd8c1f6","apps":["6991c75b024cb89cdc04efd2"],"frequency":"monthly","day":1,"hour":8,"minute":30,"emails":["ops@company.com"]}
Limitations
- Although this is an update endpoint, code expects
args.appsfor permission checks; omittingappscan break update execution. - Ownership filtering for update is enforced by report query (
userconstraint for non-global-admins).
Related Endpoints
Last Updated
2026-03-07