Skip to main content

/i/event_groups/update

Endpoint

/i/event_groups/update

Overview

Updates event groups through one of three branches: full update (args), reorder (event_order), or status change (update_status + status).

Authentication

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Requires Update permission on feature core for app_id.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API authentication key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
app_idStringYesTarget app ID for update permission check and filtering.
argsJSON String (Object)NoFull group object update branch; payload must include _id.
event_orderJSON String (Array)NoReorder branch: array of group IDs in desired order.
update_statusJSON String (Array)NoBulk status update branch: array of group IDs.
statusJSON String (Boolean)NoUsed with update_status; expected values are true or false.

Parameter Semantics

FieldExpected valuesBehavior
argsJSON objectBranch 1: updates one event group using _id + app_id.
event_orderJSON array of group IDsBranch 2: rewrites each group's order index by list position.
update_status + statusJSON array + JSON booleanBranch 3: toggles status for listed groups; when status=false, group keys are removed from events.overview.
Branch precedenceargs first, then event_order, then update_statusIf multiple branch params are sent, only the first matching branch is executed.

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringOperation status message.

Error Responses

Status Code: 400 Bad Request

{
"result": "Error: args not found"
}

Status Code: 400 Bad Request

{
"result": "Could not find event"
}

Status Code: 400 Bad Request

{
"result": "Missing parameter \"api_key\" or \"auth_token\""
}

Status Code: 401 Unauthorized

{
"result": "No app_id provided"
}

Status Code: 500 Internal Server Error

{
"result": "error: duplicate key error collection: event_groups index: _id_ dup key"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Full object updateargs is providedParses args, then updates one group by _id with $set.Wrapped string: { "result": "Success" }
Reorder updateevent_order is provided (and args is not)Parses array and bulk-updates order for each listed group.Wrapped string: { "result": "Success" }
Bulk status updateupdate_status is provided (and previous branches not used)Parses IDs and status, updates status for listed groups.Wrapped string: { "result": "Success" }
Disable-status cleanupupdate_status branch with status=falseAfter status update, removes matching keys from events.overview.Wrapped string: { "result": "Success" }

Impact on Other Data

  • Status disable flow mutates countly.events.overview by removing disabled group keys.

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and permission validationReads member identity and app-level update permissions.
countly.event_groupsGroup definition updatesUpdates group payload, order, or status by group IDs provided in request payload.
countly.eventsEvent overview cleanupReads and updates overview when disabling group status.

Examples

Example 1: Update one group object

/i/event_groups/update?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&args={"_id":"[CLY]_group_dfc09a75fff37cd46fa09d7c88ab77bb","name":"Playback Group Updated","description":"Edited description"}

Example 2: Reorder groups

/i/event_groups/update?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&event_order=["[CLY]_group_id_1","[CLY]_group_id_2"]

Example 3: Disable multiple groups

/i/event_groups/update?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&update_status=["[CLY]_group_id_1","[CLY]_group_id_2"]&status=false

Limitations

  • JSON payload parameters are parsed directly with JSON.parse in endpoint logic.
  • Sending multiple branch parameters in one request uses only the first branch in this order: args -> event_order -> update_status.

Last Updated

2026-02-17