PUT objective/…

Updates an objective. The calling user must have a teacher role in relation to the objective.

Resource URL

https://www.drillster.com/api/2.1.1/objective/{objective_id}

Parameters

Field Type Description
objectiveId
required
String The unique ID of the objective.
type
required
String The type of objective. Valid types are ONEOFF, PERMANENT and TEST.

Note that the type of an objective cannot be changed to or from TEST.
name
optional
String The custom name of the objective. If no name is given, a standard name is constructed.
reviewDate ISO 8601 Date The date (and time) at which the objective is supposed to be met.
minimumProficiency Integer The actual proficiency objective expressed as a percentage value. See also fallingMinimumProficiency.

Applies only to objectives of type ONEOFF and PERMANENT.
fallingMinimumProficiency Integer Provides an optional lower bound to the objective proficiency. The value must be lower than the objective proficiency itself.

Supplying a lower bound in conjunction with the objective representing the upper bound, a hysteresis is created. This avoids rapid flip-flopping between the 'objective met' and 'objective no longer met' states.

Applies only to objectives of type ONEOFF and PERMANENT.
estimatedStudyDuration Duration The estimated duration during which users should be able to reach the objective, expressed as an ISO-8601 duration. This value is used to determine whether users are on track with their learning efforts.
messageReminders Boolean Whether to send reminder messages.

Valid values are: TRUE and FALSE. The value is optional and defaults to FALSE.
messageRemindersStart Duration An optional grace period before the notification mechanism will kick in, expressed in the form of an ISO 8601 duration string.

Example: PT24H for a 24-hour grace period.
messageReminderInterval Duration Indicates the interval between successive reminder messages, expressed in the form of an ISO 8601 duration string.

Example: PT24H for a 24-hour interval.
messageChannelTypes
optional, repeatable
String Indicates which channel types should be used for sending objective notification messages. Valid values are EMAIL and MOBILE.

For channel type EMAIL the user must have a valid email address linked to their account. Channel type MOBILE requires the user to have installed the official Drillster app and be authenticated there.

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

A 2.1.1 Objective object.

Error responses

The following error situations are possible:

ID Response code Description
invalid_dates 400 (Bad request) Invalid combination of field "review date" and "estimated study duration".
invalid_estimated_study_duration 400 (Bad request) Invalid field "estimated study duration".
invalid_falling_minimum_proficiency 400 (Bad request) Invalid falling minimum proficiency specified.
invalid_message_channel_type 400 (Bad request) Given message channel type is invalid.
invalid_message_startup 400 (Bad request) The message startup setting can't be modified.
invalid_message_startup 400 (Bad request) Invalid field "message startup".
invalid_message_reminders 400 (Bad request) Invalid field "message reminders".
invalid_message_reminder_interval 400 (Bad request) Invalid field "message reminder interval".
invalid_message_reminders_start 400 (Bad request) Invalid field "message reminders start".
invalid_minimum_proficiency 400 (Bad request) Invalid minimum proficiency value specified.
invalid_objective_type 400 (Bad request) The objective's type cannot be changed to the given type.
invalid_review_date 400 (Bad request) Invalid review date specified.
minimum_proficiency_missing 400 (Bad request) No minimum proficiency specified.
missing_objective_id 400 (Bad request) No objective ID given.
no_message_reminders_start 400 (Bad request) No message reminders start was specified.
not_authorized 403 (Forbidden) Caller is not authorized to modify the objective.
objective_not_found 404 (Not found) The specified objective was not found.