Skip to main content

/i/event_groups/delete

Endpoint

/i/event_groups/delete

Overview

Deletes one or more event groups and removes their keys from events.overview.

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 Delete 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 delete permission check and filtering.
argsJSON String (Array)YesArray of event-group IDs to delete.

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: write conflict while deleting event group"
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Standard deleteValid args array and permissionsParses IDs, deletes matching groups by _id, then updates events.overview.Wrapped string: { "result": "Success" }
Overview cleanupevents.overview contains removed group keysRemoves matching keys from overview and persists updated array.Wrapped string: { "result": "Success" }

Impact on Other Data

  • After deleting groups, the endpoint also mutates countly.events.overview to remove deleted group keys.

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and permission validationReads member identity and app-level delete permissions.
countly.event_groupsGroup definition deletionRemoves event-group documents matching provided IDs.
countly.eventsEvent overview cleanupReads and updates overview after group deletion.

Examples

Example 1: Delete one group

/i/event_groups/delete?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&args=["[CLY]_group_dfc09a75fff37cd46fa09d7c88ab77bb"]

Example 2: Delete multiple groups

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

Limitations

  • args must be valid JSON array data.
  • JSON parse failures in delete logic are not handled with a dedicated parse-error response branch.

Last Updated

2026-02-17