Skip to main content

Countly Diagnostics - Version Read

Endpoint​

/o/countly_version

Overview​

Returns Countly package version, filesystem migration markers, database migration markers, and MongoDB server version.

Authentication​

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

Permissions​

  • Any authenticated dashboard user.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API key.
auth_tokenStringYes (or use api_key)Dashboard auth token.

Examples​

Example 1: Read version diagnostics​

/o/countly_version?api_key=YOUR_API_KEY

Response​

Success Response​

{
"result": {
"mongo": "7.0.16",
"fs": [
{
"version": "24.10.0",
"updated": 1729641600
}
],
"db": [
{
"version": "24.11.0",
"updated": 1732147200
}
],
"pkg": "24.11.0"
}
}

Response Fields​

FieldTypeDescription
result.mongoString or ObjectMongoDB version string or error object when build info fails.
result.fsArray or String/ObjectFilesystem migration markers or read/parse error value.
result.dbArray or String/ObjectDB migration marker history or read error value.
result.pkgStringCountly package version.

Error Responses​

Status Code: 400 Bad Request

{
"result": {
"mongo": "7.0.16",
"fs": "error",
"db": "error",
"pkg": "24.11.0"
}
}

Returned when both filesystem and database marker reads fail.

Status Code: 400 Bad Request

{
"result": "Missing parameter \"api_key\" or \"auth_token\""
}

Behavior​

Behavior Modes​

ModeTriggerResponse Shape
Diagnostics with partial/complete dataAt least one marker source (fs or db) succeedsWrapped diagnostics object with status 200.
Dual marker-source failureBoth fs and db marker reads failWrapped diagnostics object with status 400.

Limitations​

  • Endpoint returns diagnostics objects, not only a single semantic version value.
  • mongo, fs, or db subfields may contain error payloads while HTTP status remains 200 (if not both marker sources fail).
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuth validationResolves authenticated user.
countly.pluginsDB version marker sourceReads _id: "version" marker history.