GET objectives/…/events

Retrieves a list of historic objective evaluation events for a specific objective in a specified period of time.

In other words: the response of this endpoint indicates at which times the evaluation of the objective changed, going from OK to not OK or vice versa.

Possible objective events are:

  • OBJECTIVE_BECAME_OK – the user started meeting the objective
  • OBJECTIVE_BECAME_NOK – the user stopped meeting the objective

Note that this endpoint is meant to retrieve historic objective evaluation changes. To retrieve current objective evaluations, please see GET /api/2.1.1/group/{groupId}/objective/{objectiveId}/evaluations.

Resource URL

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

Parameters

Field Type Description
objective_id
required
String The ID of the learning objective.

Example value: _2H7UjvE0MqJx0jYhg_H7A
user
optional
String Optional filter to limit the returned records to a specific user ID. The value may be replaced with self to refer to the calling user.
fromDate
optional
Date/time Date and time from which the objective events will be returned. The value should be in ISO8601 format.

Example: 2021-05-01T03:00:00Z

If omitted, a value of 7 days ago will be used.
toDate
optional
Date/time Date and time until which all objective events will be returned. The value should be in ISO8601 format.

Example: 2021-07-01T03:00:00Z

If omitted, the current date and time is used.
resultSize
optional
Integer Objective events are returned in a paginated manner. The result size indicates the number of events to be returned. If omitted, a value of 100 is used.

The default and maximum page sizes are subject to change!
resultFrom
optional
String The value of lastOnPage in the 2.1.1 Pagination object in the previous response. Use this parameter, in combination with resultSize, to apply pagination of the result. If it is not specified, the first page will be displayed.

Response

An 2.1.1 ObjectiveEvaluationEvents object, containing a page of objective evaluation events.

Example request

GET https://www.drillster.com/api/2.1.1/objectives/_2H7UjvE0MqJx0jYhg_H7A/events

Response

{
    "events": [
      {
        "objectiveEvaluation": {
          "objective": {
            "id": "DXDw-mzbfY73fqk0xSRJKA",
            "type": "ONEOFF",
            "reviewDate": "2021-07-21T07:56:32Z"
          },
          "user": {
            "person": {
              "id": "fikHYKc4Y2OjyE_7wrcWzQ",
              "creationUuid": "13814000-1dd2-11b2-8080-808080808080"
            },
            "id": "MDZJEJewWL0yg--2rjR10w",
            "name": "Steve Adams",
            "emailAddress": "steve@example.com",
            "type": "USER"
          },
          "met": false,
          "proficiency": 0,
          "evaluationDate": "2021-07-17T07:56:32Z",
          "okPlayablesCount": 0
        },
        "type": "OBJECTIVE_BECAME_OK"
      }
    ],
    "pagination": {
      "total": 1,
      "lastOnPage": "Mg==",
      "moreAvailable": false
    }
  }

Error responses

The following error situations are possible:

ID Response code Description
invalid_time_period 400 (Bad request) Parameter fromDate should be before of toDate.
invalid_result_size 400 (Bad request) Parameter resultSize must be a positive integer with a value smaller or equal to 1000.
invalid_result_from 400 (Bad request) Parameter resultFrom must copied from the Pagination object of the previous page.
not_permitted 403 (Forbidden) Account requesting the events of an objective must be a manager of the group where the objective exists.
objective_not_found 404 (Not found) The objective was not found.
account_not_found 404 (Not found) The account corresponding to the user parameter was not found.