Challenge attempt
Once a challenge is started, attempt is created and can be used to track the completion results. In Opigno Enterprise API it is represented as aChallengeAttempt object:
Challenge attempt CTA
The list of available CTAs can differ depending on the attempt status.Create a challenge attempt
A challenge can be started by the current API user if the following conditions are met:- The user context is associated with an authenticated scope;
- The challenge is available for the current API user’s hierarchy level;
- The requested challenge is published and ongoing (the current date should be between start and end dates);
- A challenge cannot be restarted. If another attempt for the current API user exists, an error will be returned.
CREATE_CHALLENGE_ATTEMPT will be returned in the corresponding Challenge object.
To start a challenge, execute the createChallengeAttempt mutation:
Challenge question
A challenge question is represented in Opigno Enterprise API byChallengeQuestion object:
Get next question
Once a challenge started and attempt created, challenge questions are available for the user and can be retrieved one by one, by execution ofgetNextChallengeQuestion query.
In case if the randomization enabled for a challenge, questions will be returned in a random order.
Unlike training activities, challenge questions will be returned not as iframe, but as a
ChallengeQuestion object.
The question form should and the answer submission should be implemented on the frontend.Submit the answer
To submit a challenge answer, execute thesaveChallengeQuestionAnswer mutation.
It has one argument - answerData:
Here is an example of the mutation execution:
ChallengeQuestionAnswer object will be returned.
When the answer for the last question is submitted, a challenge attempt will be automatically closed,
and the user will be able to check their results.
ChallengeQuestionAnswer object
A question answer is represented in Opigno Enterprise API as a ChallengeQuestionAnswer object:
Related Features
Authentication
Understand the authentication requirements and how to properly authenticate your requests.