API – List of quizzes
Use the API token for authorization. Read more in the article API token
- To get the list of quizzes you need to send GET request to the URI https://your-domain.davintoo.com/api/v2/tests/get-items
- The request must contain the following headings Content-Type: application/json;charset=UTF-8 и Authorization: Bearer xxxxxx.
Request example:
curl 'https://your-domain.davintoo.com/api/v2/tests/get-items' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of a local address https://your-domain.davintoo.com you need to use the address of your instance.
The request supports filtering by the following fields:
title - Quiz title
tags - Tags
Example of a request with a search by title:
curl 'https://your-domain.davintoo.com/api/v2/tests/get-items?filter[title]=How Well Do You Know About The Microsoft Word' -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:
- quiz arraydata
- pagination object (information about the number of pages, the current page, the number of quizzes)pager
- In case of error (HTTP code response - 400) it returns JSON object with information about the error