The API calls make it possible to

  • add new events
  • change properties of existing events
  • (un)link instructors and events
  • (un)link events and event activities

Context

Courses in aNewSpring consist of activities. One such activity is the event activity. Multiple events can be linked to one event activity, this gives learners the option to choose in which of the events they want to participate. The learner will then be a participant of the event.

Events can also have an instructor. The instructor can change the event properties and assess the participants (learners) with a score if scoring is enabled. It's also possible to enable the instructors to assess by attendance, but only if scoring is not enabled.

Support articles:

  • Adding events
  • Guiding events
  • Which activities can I use in a template?

For historical reasons and to continue to support old API integrations, the terminology of the API and the front-end for administrators does not always match completely. In the API:

  • An Event is called a BookableEvent. This is not to be confused with Calendar items, which are called "Event" in the API. Calendar items are not part of the API calls in this support article.
  • An Instructor is called a Teacher.

API calls

You can view more information and an example of each API call in the API Documentation by clicking the titles below. However, all links go to the /apidocs page of a demo environment that you cannot use for your own testing purposes.
To test the API calls, you will need to change the first part of the URL to match the right learning environment.

POST requests

POST /addBookableEvent/{eventID}
Use this to create a new event. The event will get the external ID that you specify as eventID.

POST /updateBookableEvent/{eventID}
Use this to change the properties of a specific event. You will need to use the external ID of the event.

POST /addOrUpdateBookableEvent/{eventID}
You can use this if you're not sure if an event already exists. If the event already exists, it will work as /updateBookableEvent and only accept those parameters. If the event doesn't exist yet, it will work as /addBookableEvent and only accept those parameters. You will need to use the external ID of the event.

POST /addBookableEventTeachers/{eventID}
Use this to link instructors to a specific event. You will need to use the external IDs of the event and of the users (instructors) that you want to link.

POST /deleteBookableEventTeachers/{eventID}
Use this to unlink instructors from a specific event. You will need to use the external IDs of the event and of the users (instructors) that you want to unlink.

POST /linkBookableEvent/{eventID}/{courseID}/{activityID}
Use this to link an event to a specific event activity in a specific course. You will need to use the external IDs of the event, the course and the event activity.

POST /unlinkBookableEvent/{eventID}/{courseID}/{activityID}
Use this to unlink an event from a specific event activity in a specific course. You will need to use the external IDs of the event, the course and the event activity.