PUT drill

PUT Updates specific drill details. Only the author of a drill can update its details. Note that if the drill is public or is used by a group, changes are immediately visible to all users.

Resource URL

https://www.drillster.com/api/2/drill/{drill_id}

Parameters

Field Description
drill_id
required

The unique identifier of the drill. Note that this API call will only operate on drills, not on courses.

Example value: R_GVlYZQTKOEmN_r69EVFQ

name
optional

The name of the drill.

Example value: German Made Easy chapter 1

subject
optional

The subject of the drill.

Example value: German

description
optional

The description of the drill.

Example value: This drill is about the German language after all

If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e. Content-Length: 0). Not all HTTP clients do this automatically. For more information, please see RFC 2616.

Response

An 2.0 Drill object.

Example request

PUT https://www.drillster.com/api/2/drill/R_GVlYZQTKOEmN_r69EVFQ
name=German Made Easy chapter 1
subject=German
description=This drill is about the German language after all

Response

{
  "id":"R_GVlYZQTKOEmN_r69EVFQ",
  "type":"DRILL",
  "name":"German Made Easy chapter 1",
  "subject":"German",
  "description":"This drill is about the German language after all",
  "lastEdited":"2016-12-21T15:05:07Z"
}

Error responses

The following error situations are possible:

ID Response code Description
missing_drill_id 400 (Bad request) No drill ID given
invalid_drill_id 400 (Bad request) Given drill ID is invalid or drill could not be loaded.
missing_parameters 400 (Bad request) No input parameters specified.
invalid_locale 400 (Bad request) Given locale is not valid.
invalid_drill_description 400 (Bad request) Given drill description is not valid.
invalid_drill_name 400 (Bad request) Given drill name is not valid.
invalid_drill_subject 400 (Bad request) Given drill subject is not valid.