JSON API - Openki/Openki GitHub Wiki
The JSON-API is available under https://openki.net/api/0/json/. There are three endpoints: groups, venues, and events. The API is read-only.
The last finished event in region Zürich: https://openki.net/api/0/json/events?before=now&limit=1®ion=wvoJEz0eSerrAJ
Get the 10 next events organised by ASZ: https://openki.net/api/0/json/events?after=now&limit=10&group=90aa41f3
Query URL: https://openki.net/api/0/json/groups
Data-structure of return: (click here)
{
'_id': 'GroupName',
'sourceLink': 'https://openki.net/group/ID/GroupName', // link to the page on Openki
'name': 'GroupName',
'claim': 'We are the champions',
'description': 'We bla bla bla bla bla bla bla bla bla bla bla bla bla bla',
'webLink': 'http://example.com',
'logo': '/zurich/groups/ReTake.png', // or 'https://GroupName.com/data/imgs/logo.png'
'venue': {
'loc': {
'type':'Point',
'coordinates': [8.55952, 47.41030] // attention: long, lat
}
}
}Query: `https://openki.net/api/0/json/events
filter options: (click here)
These are the most used filters:
-
?group=l1i83hor groups=(comma separated list of groups where one must match) -
?after=2018-02-03T12:30?after=now ?before=2018-02-10?region=id?venue=barId
all options: (click here)
course: id,
region: id,
search: string,
categories: ids,
group: id,
groups: ids,
venue: string,
room: string,
start: date,
before: date,
after: date,
end: date,
internal: flag,
Results can be sorted by including a sort parameter. The sort parameter is a string of comma-separated field-names. If the first field compares equal for two entries, they are sorted by the second field, then the third, and so on. A hyphen in front of a field name causes descending sort on that field. Examples:
-
sort=startLocal: Order events by local start time. -
sort=start,duration: Order events by start time, put longer events after shorter ones if they start at the same time. -
sort=-start: sort by start time, last first.
The parameter limit allows you to limit the amount of results returned. The preset and maximum value is limit=100. To return a different part of the list than the start, add a skip parameter. Naturally, preset is skip=0. To get the second page you would pass limit=20&skip=20, and limit=20&skip=40 for the third page.