GET repertoire

GET Retrieves the user's repertoire, or searches in it using a search query.

The repertoire consists of all of the drills that the user has (co-) authored, has taken from the Drill Store or has received as being a group member. All of the drills present in the repertoire include progress details such as current proficiency and expected time to achieve 100% proficiency.

The following features are supported:

  • Searching for specific words
  • Sorting the result by various fields
  • Searching specific fields (e.g. name, or subject)
  • Pagination of the result
  • Filtering on a group

Resource URL

https://www.drillster.com/api/2/repertoire

Parameters

Field Type Description
query
optional
String

The text to search for. It can be a single word, or multiple words (separated with a space). The search is case-insensitive. If multiple words are specified, the default search behavior is to search for any of the words. The AND operator can be used to search for all words, e.g. "milk AND butter". Note that the AND operator must be in capitals.

Example values: chinese mandarin, chinese AND mandarin

searchField
optional, repeatable
String

Specifies which fields will be searched. Can be included multiple times to specify multiple search fields. If not specified, all available fields will be searched. Possible values are:

  • NAME
  • DESCRIPTION
  • SUBJECT
  • TAGS
  • CONTENTS

resultStart
optional
String

The index number (zero-based) of the first drill (or course) to include in the result. Use this parameter, in combination with resultSize, to apply pagination of the result; it will limit the number of drills included in the result. Defaults to 0.

resultSize
optional
String

The maximum number of drills (or courses) to include in the result. If not specified, the results for all (remaining) drills are returned.

sortField
optional
String

The field to sort the result by. If no sortField is specified, sorting depends on the presence of a search query:

  • No query specified: The result is sorted by the last practiced date (descending)
  • Query specified: The result is sorted by relevance
Possible values are:
  • NAME – the name of the drill or course
  • SUBJECT – the subject of the drill or course
  • PROFICIENCY – the user's current proficiency of the drill or course
  • LAST_PRACTICED – the date and time the user has last practiced the drill or course
  • LAST_EDITED – the date and time the user has last edited the drill or course
  • ADDED – the date and time the drill or course was added to the user's repertoire

sortDirection
optional
String

The sort direction (ascending or descending), if a sortField has been specified. If omitted, a default sort direction is used, which depends on the sortField.

Possible values are:

  • ASC – ascending
  • DESC – descending

group
optional
String

If specified, only drills and courses contained by this group will be returned.

Response

A Drillables object, containing the total number of drills that were found (total), regardless of the optionally specified resultStart and resultSize, and a list of Drillable objects (drills).

Example request

GET https://www.drillster.com/api/2/repertoire?query=famous&sortField=NAMEsortDirection=ASC

Response

{
  "total" : 2,
  "drills" : [ {
    "id" : "Ij9-TPxebLc_7VS-hIuUbg",
    "name" : "Famous movie quotes",
    "subject" : "Movie",
    "type" : "DRILL",
    "size" : 12,
    "description" : "Learn the most famous English movie quotes.",
    "practice" : {
      "proficiency" : {
        "receptive" : 50,
        "productive" : 49,
        "overall" : 49
      },
      "highestProficiency" : {
        "receptive" : 100,
        "productive" : 100,
        "overall" : 100
      },
      "expectedDuration" : 2382
    }
  }, {
    "id" : "1J-_acRwTnmyN03eMS5IHw",
    "name" : "Most Famous Paintings in the World",
    "subject" : "Art",
    "type" : "DRILL",
    "size" : 20,
    "description" : "With this drill you can learn to recognize the 10 most famous paintings in the world.",
    "practice" : {
      "proficiency" : {
        "overall" : 54
      },
      "highestProficiency" : {
        "overall" : 100
      },
      "expectedDuration" : 1193
    }
  } ]
}

Error responses

The following error situations are possible:

ID Description
invalid_sort_field Invalid sort field.
invalid_sort_direction Invalid sort direction