API – Quizzing report
- To get the quiz report you need to send GET request to the following URI
https://your-domain.davintoo.com/api/v2/test-report/test/{id}?page=1&count=10&filter[testId]={id}&sorting[user_full_name]=asc - The request must contain the headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.
Request example:
curl 'https://your-domain.davintoo.com/api/v2/test-report/test/2062?page=1&count=10&filter[testId]=2062&sorting[user_full_name]=asc' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of 2062 you need to set the quiz id.
The request supports filtering by the following fields:
taskId - Task ID
position - Position
city - City
department - Department
tags - tag
task_last_attempt_at - date of the last attempt
An example of a query with a filter by date of the last attempt:
curl 'https://your-domain.davintoo.com/api/v2/test-report/test/2062?page=1&count=10&filter[testId]=2062&filter[task_last_attempt_at]=2022-07-19&sorting[user_full_name]=asc' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Answer
- In case of successful request (HTTP response code - 200), the following result will be returned:
- results arraydata
- pagination object (information about the number of pages, the current page, the number of results)pager
- In case of error (HTTP response code - 400) it returns JSON object with error information