Skip to main content

SDK - SDK Metrics Read

Endpoint

/o?method=sdks

Overview

Returns SDK metrics time-object data.

Authentication

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

Permissions

Requires sdk Read permission.

Request Parameters

ParameterTypeRequiredDescription
methodStringYesMust be sdks.
api_keyStringYes (or use auth_token)API key for authentication.
auth_tokenStringNoAuth token as query parameter or countly-token header.
app_idStringYesApp id.
periodStringNoCountly period parameter.
timezoneStringNoTimezone used for period parsing.
actionStringNoOptional refresh mode support from shared fetch pipeline.

Examples

Read SDK metrics for 30 days

/o?method=sdks&api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&period=30days

Response

Success Response

{
"2026": {
"3": {
"7": {
"sdks": {
"[countly-sdk-ios]_24.3.0": {
"t": 12,
"u": 10,
"n": 2
}
}
}
}
},
"meta": {
"sdks": [
"[countly-sdk-ios]_24.3.0"
]
}
}

Response Fields

FieldTypeDescription
(root)ObjectSDK metrics time object.
meta.sdksArraySDK segment keys present in response.

Error Responses

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

Behavior

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Standard metrics readmethod=sdks and valid accessReads SDK metric time object from sdks collection for requested app/period.Raw time-object with meta.
Refresh readaction=refreshUses shared refresh flow from metrics fetch pipeline.Raw time-object (refresh-oriented slice).
Access failureMissing auth or missing read rightsStops before metrics fetch.Wrapped error in result.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.sdksSDK metrics sourceReads SDK metrics by app and time period.