Skip to main content
Version: 24.05

Star Rating - Ratings Metadata

Endpoint​

/o?method=star

Overview​

Returns the platforms and app versions that received star ratings in a period.

Authentication​

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

Permissions​

Requires star_rating Read permission.

Request Parameters​

ParameterTypeRequiredDescription
methodStringYesMust be star.
app_idStringYesTarget app ID.
periodStringYesprevMonth, month, day, yesterday, hour, a number of days such as 30days, or a date range array.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples​

Example 1: Read ratings metadata​

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

Response​

Success Response​

{
"Android": ["3:2", "1:7"],
"iOS": ["1:1", "2:5"]
}

Response Fields​

FieldTypeDescription
(root object)ObjectOne key per platform that received ratings in the period.
<platform>ArrayDistinct app versions that received ratings on that platform, as stored in the rating data.

Error Responses​

Status Code: 400 Bad Request

{
"result": "Missing request parameter: period"
}
{
"result": "Bad request parameter: period"
}

Behavior​

  • Reads the star rating event data of the app for the period and merges the platform and version lists of every day in it.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.events{hash}Star rating event dataReads the platform and version metadata of [CLY]_star_rating.