Filtering Rules - Delete
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/blocks/delete
Overview
Deletes a filtering rule by its rule ID.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Filtering Rules:
Deletepermission (or global admin equivalent).
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes (or auth_token) | API key authentication |
auth_token | String | Yes (or api_key) | Auth token authentication |
app_id | String | Yes | Application ID |
block_id | String | Yes | Rule ID to delete |
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"
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Operation 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
- Validates
app_idand delete permission. - Resolves rule in app document.
- Removes matching rule from app
blocksarray.
Related Endpoints
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.apps | App configuration and metadata | Stores app-level feature settings and metadata used or modified by this endpoint. |