GET /api/events

Description

Returns list of course events. Note that this will not return events that are modules of a parent course. These are nested in the children attribute of the object.

Parameters

view

String. Optional. Specifies either "full" or "simple" result type.

competence_id

Int. Optional. To list only events belonging to a specific competence.

organisation_ids

List of ints. Optional. Only return events that have participants belonging to Organisations.

recursive

Int. Optional. 1 or 0. Whether or not parameter organisation_ids should result in a recursive, tree search for participants or not. If set, will return events with participants belonging to branches of organisation tree defined by organisation_ids. Default: 0

 

start

Int. Optional. Index to start at.

limit

Int. Optional. Max length of result set.

mode

String. Optional. ”future”/”finished”/”all”.  Controls if we are to get future or finished events, or both. Default: ”future”

startdate

String, date on ISO format. Optional. Return only events starting on or after this time. Overrides ”mode” parameter.

enddate

String, date on ISO format. Optional. Return only events starting before this time. Overrides ”mode” parameter.

sort_direction

String. "asc"/"desc". Whether the result should be sorted ascendingly or descendingly. Default: "asc". 

Return

Array of Event objects.

Security

Superuser, manager, person

GET /api/events/[event_id]

Description

Returns detailed view of course event.

Parameters

view

String. Optional. Specifies if you want either 'full' or 'simple' result type.

Return

Array of one Event object.

Security

Superuser, manager, person

GET /api/events/[event_id]/participants

Description

Returns a list of participants (Person) for the course event.

/api/participants/123 will yield the same result as /api/events/123/participants.

Parameters

view

String. Optional. Specifies if you want either 'full' or 'simple' result type.

Return

Array of Person objects.

Security

Superuser, manager, person