Concurrent Users - Update Alert Status
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/concurrent_alert/status
Overview
Enable or disable alerts in bulk to manage which alerts are active. Disabling temporarily suspends monitoring without deleting configuration, useful for maintenance windows. Enabling resets the alert's trigger state and start evaluation fresh.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Required permission:
Updateon thealertsfeature
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | String | Yes (or auth_token) | API key for authentication |
| auth_token | String | Yes (or api_key) | Auth token for authentication |
| app_id | String | Yes | Application identifier |
| status | String (JSON) | Yes | JSON map of alert ID to enabled state (true or false) |
Examples
Example 1: Enable and disable multiple alerts
curl "https://your-server.com/i/concurrent_alert/status" \
-d "api_key=YOUR_API_KEY" \
-d "app_id=YOUR_APP_ID" \
-d 'status={"507f1f77bcf86cd799439011":true,"607f1f77bcf86cd799439022":false}'
Example 2: Disable all alerts for maintenance
curl "https://your-server.com/i/concurrent_alert/status" \
-d "api_key=YOUR_API_KEY" \
-d "app_id=YOUR_APP_ID" \
-d 'status={"507f1f77bcf86cd799439011":false,"507f1f77bcf86cd799439012":false}'
Response
Success Response
true
Response Fields
| Field | Type | Description |
|---|---|---|
| (response) | Boolean | Always true on success; indicates status updates were applied |
Error Responses
| HTTP Status | Error Response | Description |
|---|---|---|
| 400 | {\"result\": \"Insufficient permissions\"} | User lacks Update permission on alerts feature |
| 500 | {\"result\": \"Concurrent users API error.\"} | Server error during status update |
Behavior
- Request accepts a JSON map of alert IDs to boolean states:
{"alert_id_1": true, "alert_id_2": false} - When enabling (
true): Setsdefined_atto current timestamp and clearslast_triggered(restarts the alert) - When disabling (
false): Only updatesenabledfield; preserveslast_triggered - For metric-type alerts (
type: "m"ortype: "o"): Server refetches and updates internal cache records - All specified alerts are updated atomically; partial failures are not returned individually
Limitations
- Maximum 1000 alert status changes per request
- Disabling an alert does not clear its
last_triggeredtimestamp (use delete and recreate to fully reset) - Non-existent alert IDs in the status map are silently ignored (no error returned)
Related Endpoints
- Get Alerts - Retrieve alerts and their current status
- Create or Update Alert - Create a new alert or modify existing configuration
- Delete Alert - Permanently remove an alert
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.concurrent_users_alerts | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |