Skip to main content

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: Update on the Online Users feature (concurrent_users)

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key for authentication
auth_tokenStringYes (or api_key)Auth token for authentication
app_idStringYesApplication 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

FieldTypeDescription
resultStringOperation status: Success indicates reset completed

Error Responses

HTTP StatusError ResponseDescription
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}_overall and {appId}_overall_new in concurrent_users_max collection
  • Sets mx (maximum value) to 0 for 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
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.concurrent_users_maxEndpoint data sourceStores endpoint-related records this endpoint reads or modifies.