Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Query options and filters

lu40 edited this page Feb 5, 2018 · 1 revision

Filters and options usable for all iFrames, our JSON- and ical-API and the Infoscreens.

These options can always be set:

For views showing (or API requests for) either courses or events these filters can be used:

Additionally there's filters only for courses and only for events.

Options

Can always be set.

Language

You can always set the language by passing the language code.

  • Param: lang
  • Value: Language code e.g. en or en_US
  • Default: Language set in browser
  • Example: openki.net?lg=de

Region

In order to set the region you can pass the region's id.

  • Param: region
  • Value: Region ID or all
  • Default: all or the region which has been chosen on openki.net
  • Example: openki.net?region=J6GDhEEvdmdSMzPPF

Region IDs

Click here to see the regions' IDs

  • Zürich: J6GDhEEvdmdSMzPPF
  • Θεσσαλονίκη: eK4J208d720baaLHSzHj0
  • Αθήνα: wj39hF2fen4fJ20822aa
  • Jura (BEJUNE): Xj3EfKDQ4S1nzFo9
  • Bern: Siifr2P7drkv66FNA
  • Frauenfeld: doR7JQH0jDE7Uunp3
  • Aarhus: nH6iit84MueHhnl04
  • Berlin: kEu49vBsKjei0opFs
  • London: 4S3vnzFj3wjhgQzo9
  • Fribourg: JEhc83S4SdsJE0e
  • Winterthur: wvoJEz0eSerrAJ

Filters

Apply for courses and events.

Group

Filter by group by passing its id.

  • Param: group
  • Value: Group ID
  • Example: openki.net?group=90aa41f3

Internal

Filter for the courses/events which have the internal flag set. Internal courses and events (of groups / in venues) are always returned when respective group or venue filter is active.

Read more about it here.

  • Param: internal
  • Value: Boolean
  • Default: false
  • Example: openki.net/frame/courselist?group=90aa41f3&internal=true

Course filters

Can only be used for courses.

Course state

Filter for courses by their current state. You can choose between proposal (courses which have been proposed but for which no event has been organized yet), upcomingEvent (courses with upcoming events) and resting (courses where events have taken place but no upcoming events are scheduled).

  • Param: state
  • Value: Course state (either proposal, upcomingEvent or resting)
  • Example: openki.net/frame/courselist?state=proposal

Needed roles

Filter for courses which need the specified roles.

  • Param: needsRole
  • Value: Role(s) - participant, mentor, host, team or any combination of them e.g. team,mentor
  • Example: openki.net/frame/courselist?needsRole=host,mentor

Event Filters

Can only be used with events.

Venue

Filter by a specific location where the events take place by passing its id.

  • Param: venue
  • Value: Venue ID
  • Example: openki.net/frame/calendar?venue=ed417de0

Room

Filter by a specific room where the events take place by passing it's name.

  • Param: room
  • Value: Room name as string
  • Example: openki.net/frame/calendar?venue=ed417de0&room=4.%20Stock

Groups

The same as described here but for multiple groups.

  • Param: groups
  • Value: List of group IDs e.g. Ya3BgteukAtN5XkFr,90aa41f3
  • Example: openki.net/frame/calendar?groups=Ya3BgteukAtN5XkFr,90aa41f3