Introduction
The Learn365 API enables you to retrieve and download learners' quiz answers. This is particularly helpful when you need learners' quiz answers for records in your organization, and they must be stored in a different place or archived.
In this article, we show how you can retrieve and download quiz answers using the GET/odata/v2/QuizAttempts request in the Learn365 API.
How to retrieve and download learners' quiz answers
To be able to use the Learn365 API, you should be authorized with the relevant API key on https:/api.365.systems. For details, see this article.
To retrieve and download quiz answers, follow these steps:
1. In https:/api.365.systems, navigate to the QuizAttempts section.
2. Select GET/odata/v2/QuizAttempts (this returns a list of all quizzes attempts on the tenant) to expand the Parameters section and select Try it out.
This opens the Parameters section, which includes the query parameter fields that can be completed if you want to narrow down the response data.
- If you want to retrieve data on all quizzes attempts on the tenant, leave the fields empty and proceed to the next step.
- If you want to narrow down the response data, specify query parameters in the query fields. The returned response data will contain only the filtered data.
EXAMPLE
To get all learners' quiz attempt answers for a specific quiz:
- Specify the quiz ID in the $filter field by pasting QuizId eq quiz id. See how to get a quiz ID in this article.
- In the $select field, you can paste QuizId,EnrollmentId,State. In this case, the response will contain the learner's answers for the specified quiz, without any other details about quiz attempts.
3. Select Execute at the bottom of the page to run the request .
4. In the Response body, you can Download the data from the response to your computer in .JSON format.
The Response block
Number 2xx (for example, 200) under Code shows that the request worked correctly.
You can Download the data from the response to your computer in .JSON format.
If no query parameters were set in the Parameters block to narrow the response, in the Response body field you can see all the quizzes on the tenant, including all attempts and learners' answers. The answers for a quiz attempt are displayed in the State parameter.
Under State, you'll find questions and answers data stated in .JSON format, the explanation of which can be found in this article or in the Quiz Attempt State section of the API documentation page.
Comments
Article is closed for comments.