PUT test/…/…/…

Links a test definition to an organization, group or user.

Optionally, an objective can be configured for the linked test. The objective is the (review) date that all testees of the test are required to have completed the test. If PER_USER is used as review date, a review date can be configured per individual testee. This is done through a separate API call.

If an objective is specified, it is possible to specify a reminder date. If the testee has not completed the test by this date, he will receive a reminder of the upcoming review date.

If an objective is specified, it is possible to initiate an announcement message, informing all testees that they are expected to complete the test before the review date.

An objective can be configured on an existing test definition link, if it does not have an objective yet. If an existing test definition link is specified without configuring an objective, an error will be returned, indicating that the link already exists.

When linking to a group, it is possible to configure a maximum number of test renditions per user.

Resource URL

https://www.drillster.com/api/2/test/{testId}/{type}/{id}

Parameters

Field Type Description
test
required
String The ID of the test definition.
type
required
String constant Represents the entity type that the test definition is being linked to. Possible values are GROUP, ORGANIZATION and USER.
id
required
String Represents the entity ID that the test definition is being linked to. In the case of type GROUP it is the group ID, in case of type ORGANIZATION it is the organization ID and for type USER this represents the user ID.

For types USER and ORGANIZATION the value self is also permitted.
reviewDate
optional
Timestamp When a test definition is being linked to a group, a learning objective can be created by setting a review date. Format must be ISO-8601.
reminderDays
optional
Integer The number of days before the review date to notify a group member if he has not completed the test yet. The reminder will be send only if the review date has been set.
sendAnnouncement
optional
Boolean Notify the group members that a new objective has been created. The announcement will be send only if the review date has been set.
maxRenditionsPerUser
optional
Integer The number of test attempts of each user for the test.
messageChannelTypes
optional
String array

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.0 NoContent (204) response indicating that the test definition has been linked to the given entity.