Concurrent Users - Reset Maximum
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_users_max/reset
Overview
Reset the all-time maximum online user counters for an app.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Required permission:
Updateon the Online Users feature (concurrent_users)
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 |
Examples
Example 1: Reset maximum values for an app
curl -X POST "https://your-server.com/i/concurrent_users_max/reset" \
-d "api_key=YOUR_API_KEY" \
-d "app_id=YOUR_APP_ID"
Example 2: Reset with auth token
curl -X POST "https://your-server.com/i/concurrent_users_max/reset" \
-H "countly-token: YOUR_AUTH_TOKEN" \
-d "app_id=YOUR_APP_ID"
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| result | String | Operation status: Success indicates reset completed |
Error Responses
| HTTP Status | Error Response | Description |
|---|---|---|
| 200 | {\"result\": \"Failed to reset the max value of online users\"} | Reset operation failed or app not found |
| 400 | {\"result\": \"Insufficient permissions\"} | User lacks Update permission on feature |
| 500 | {\"result\": \"Failed to reset the max value of online users\"} | Database or server error |
Behavior
- Locates documents with keys
{appId}_overalland{appId}_overall_newinconcurrent_users_maxcollection - Sets
mx(maximum value) to0for both documents - Clears all time-series history (per-day, per-hour, per-minute max records are also removed)
- Does not affect current live user counts; only resets the all-time maximum tracking
- Does not affect alert configurations or execution history
Limitations
- Reset is permanent and cannot be undone
- Affects only maximum tracking; active user sessions continue uninterrupted
- Resetting an app's max does not affect other apps' max values
Related Endpoints
- Get Online User Metrics - Retrieve current and historical metrics
- Get Live Count - View current online users and all-time max
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly.concurrent_users_max | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |