Skip to main content

Filtering Rules - Delete

Endpoint

/i/blocks/delete

Enterprise Only
This API is available exclusively in Countly Enterprise.

Overview

Deletes a filtering rule by its rule ID.

Authentication

Authentication Methods:

  • 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

  • Filtering Rules: Delete permission (or global admin equivalent).

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
app_idStringYesApplication ID
block_idStringYesRule ID to delete

Response

Success Response

{
"result": "Success"
}

Response Fields

FieldTypeDescription
resultStringOperation status

Error Responses

  • HTTP 400 - Missing app ID:
{
"result": "Provide app_id"
}
  • HTTP 400 - Missing rule ID:
{
"result": "No rule id"
}
  • HTTP 400 - Delete failure:
{
"result": "Error deleting rule"
}
  • HTTP 400 - Missing auth params:
{
"result": "Missing parameter \"api_key\" or \"auth_token\""
}
  • HTTP 401 - Auth/user validation failed:
{
"result": "User does not exist"
}

Behavior/Processing

  1. Validates app_id and delete permission.
  2. Resolves rule in app document.
  3. Removes matching rule from app blocks array.

Database Collections

CollectionUsed forData touched by this endpoint
countly.appsApp configuration and metadataStores app-level feature settings and metadata used or modified by this endpoint.

Examples

Example: Delete a rule

curl "https://your-server.com/i/blocks/delete?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&block_id=rule1"

Ⓔ Enterprise

This feature is part of Countly Enterprise.

Get Access:

Already a Customer? Use support portal if you have any questions.

Last Updated

2026-02-15

Last Updated

2026-02-16