Skip to main content
Version: 26.01

System - User Sync History Read

Endpoint​

/o/system/usersync

Overview​

Returns the recent user sync history of an app, or of all apps together. Each record shows how long the user sync lagged at one run, and how many users it processed.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

  • Requires authenticated dashboard user access to management-read endpoints.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
appStringNoApp id. Defaults to all, which returns the records of all apps combined.

Examples​

Read the combined history of all apps​

/o/system/usersync?api_key=YOUR_API_KEY

Read the history of one app​

/o/system/usersync?api_key=YOUR_API_KEY&app=6991c75b024cb89cdc04efd2

Response​

Success Response​

{
"data": [
{
"a": "all",
"ts": 1771326000000,
"avg": 12.5,
"max": 40,
"median": 10,
"u": 1500
}
],
"app": "all"
}

Response Fields​

FieldTypeDescription
dataArrayHistory records of the requested app.
data[].aStringApp id, or all for the combined record.
data[].tsNumber or DateTime of the sync run.
data[].lagNumber or NullSync lag of the run. Present in app records.
data[].avgNumber or NullAverage lag across apps. Present in all records.
data[].maxNumber or NullMaximum lag across apps. Present in all records.
data[].medianNumber or NullMedian lag across apps. Present in all records.
data[].uNumberNumber of users processed in the run.
appStringThe requested app id, or all.

Behavior​

  • data is empty when no records exist for the requested app.
  • Records are removed automatically after 24 hours.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.app_users_sync_historySource for user sync history records.Reads records of the requested app.