Example reference data queries
This section will demonstrate a number of common queries used to build UIs for selecting films and showtimes.
These examples also make use of some of the filtering and selection functionality that the OData specificiation allows.
Film queries
Films that are currently playing
/Odata.svc/Film?$filter=IsScheduledAtCinema eq true&$format=json
Films that opened after specific date
/Odata.svc/Films?filter=OpeningDate gt DATETIME'2014-01-09T00:00:00'&$format=json
ID, title and opening date of all films
/Odata.svc/Films?$select=ID,Title,OpeningDate&$format=json
Specific film
/Odata.svc/Films('HO00000002')?$format=json
Scheduled film queries (films per cinema)
ID and title of films that are currently playing per cinema
/Odata.svc/GetNowShowingScheduledFilms?$select=ID,Title&$format=json
Coming soon films
/Odata.svc/GetComingSoonScheduledFilms?$format=json
Currently showing films plus sessions & session attributes
/Odata.svc/GetNowShowingScheduledFilms?$expand=Sessions/Attributes&$format=json
Currently showing films plus sessions & session attributes for a specific cinema
/Odata.svc/GetNowShowingScheduledFilms?cinemaId=001&$expand=Sessions/Attributes&$format=json
Currently showing film titles plus session times and attribute names
/Odata.svc/GetNowShowingScheduledFilms?$expand=Sessions&$select=Title,CinemaId,Sessions/Showtime,Sessions/SessionAttributesNames&$format=json
Currently showing films plus sessions filtered to IMAX sessions
/Odata.svc/GetNowShowingScheduledFilms?attributeShortName=IMAX&$expand=Sessions&$format=json
Specific scheduled film plus cast & crew
/Odata.svc/ScheduledFilms('0000000001-HO00000003')?$format={{format}}&$expand=Cast
Session queries
All showtimes between two dates for a specific cinema
/OData.svc/Sessions?$filter=Showtime gt DATETIME'2018-09-07T06:00:00' and Showtime lt DATETIME'2018-09-08T06:00:00' and CinemaId eq '001'&$format=json
All shotimes for a specific film at a specific cinema
/OData.svc/Sessions?$filter=CinemaId eq '0001' and ScheduledFilmId eq 'HO00000025'&$format=json