Challenges can not be accessed by user contexts that are not associated with any scope.
Challenge API object
Challenge object represents a single challenge data:
| Parameter | Type | Description |
|---|---|---|
attempt | ChallengeAttempt | Optional. The challenge attempt (if it has already been taken by the current API user). |
bonusPointsEnabled | Boolean | Required. Indicator of bonus points that can be earned for the fast answer. |
cta | Cta | Optional. Contains the list of challenge Call To Action objects for the current API user. |
description | String | Required. A challenge description. Contains an HTML markup. |
endDate | Int | Required. The timestamp when a challenge ends. The challenge will not be available for completion after this time. |
id | ID | Required. A challenge ID. |
image | MediaImage | Optional. A challenge image data. |
isRankingEnabled | Boolean | Required. A marker to indicate if the ranking and leaderboard displaying is enabled for the challenge. |
maxChallengeRank | Int | Optional. The max rank in the challenge. The value will be empty if the ranking and leaderboard displaying is not enabled for the challenge. |
participantsNumber | Int | Required. The number of users who took part in the challenge and completed it. |
questionsNumber | Int | Required. The total number of questions in a challenge. |
startDate | Int | Required. The timestamp when a challenge starts. The challenge will not be available for completion before this time. |
status | ChallengeStatus | Optional. The challenge status for the current API user (completed/ongoing/upcoming). If empty, the challenge is already finished and missed by the user. |
title | String | Required. A challenge title. |
Challenge CTA
The list of available CTAs can differ depending on the challenge status.| Action ID | Description | Corresponding mutation/query |
|---|---|---|
CREATE_CHALLENGE_ATTEMPT | Allows to create a challenge attempt for the current API user. Available if the challenge is not started yet. | createChallengeAttempt |
VIEW_CHALLENGE | Allows to access a challenge information. | getChallenge |
VIEW_CHALLENGE_RESULTS | Allows to view a challenge results. Available when the challenge attempt is completed. | getChallengeResult |
Retrieve a challenge from API
To retrieve a single challenge data, execute thegetChallenge query.
The query has one incoming argument - challengeId and returns a Challenge object if
the current API user have an access to view the requested entity.
Related Features
Authentication
Understand the authentication requirements and how to properly authenticate your requests.