rest.christchurchlye.org.uk

restdocs.php

Creation Date: 2011-03-11

Last updated: 15:34 19/05/2012

Version : 0.4

A RESTful Service for Church Events.

This REST service is not intended for use in a web browser. It provides a mechanism for interrogating the backend website database in order to provide XML formatted information for use by client applications.

The response may be requested in JSON format by appending "/json" to any of the URI's specified below.

XML and JSON formatted responses contain the same information in the same structure. The exception being that when the response contains multiple events the XML response contains repeated elements, whilst the JSON reply wraps multiple events as an array.

One off events are automatically deleted from the database once they have taken place so attempting to examine historical One off events will never return any items.

Rather than document the responses here just cut and paste the URI's below into a browser. Obviously, don't use the hard coded dates in the URI's. Instead start by using the current year and month.


Change Log

Version Date Programmer Description
0.2 2011/06/03 CDN Initial Release
0.3 2012/03/21 CDN Added Support for MP3 Sermons and Talks information
0.4 2012/04/19 CDN Added ability to download all events (Forthcoming and Regular) in date/time order (Most recent first)


Available URI's

MP3 Sermons and Talks Information and URI of MP3's of Church Sermons/Talks. Returned in date order - most recent first
URI Response Description
http://rest.christchurchlye.org.uk/events/sermonsandtalks All MP3 Files and associated information held on database

One off events Events that occur once at some time in the future. One off events are automatically deleted by a cron job once they have taken place. Returned in date order - First occuring event first.
URI Response Description
http://rest.christchurchlye.org.uk/events/oneoff All One off events held on database
http://rest.christchurchlye.org.uk/events/oneoff/237 One off event whose primary key is 237
http://rest.christchurchlye.org.uk/events/oneoff/id/237 One off event whose primary key is 237. A synonym URI for the above
http://rest.christchurchlye.org.uk/events/oneoff/date Error - Year and Month not provided
http://rest.christchurchlye.org.uk/events/oneoff/date/2011 Error - Month not provided
http://rest.christchurchlye.org.uk/events/oneoff/date/2011/12 One off events scheduled for December 2011
http://rest.christchurchlye.org.uk/events/oneoff/date/2011/12/11 One off events scheduled for the 11th of December 2011


Regular events Events that take place on a regular basis - daily, weekly, monthly or annually
URI Response Description
http://rest.christchurchlye.org.uk/events/regular All Regular events held on database
http://rest.christchurchlye.org.uk/events/regular/1 Regular event whose primary key is 1
http://rest.christchurchlye.org.uk/events/regular/id/1 Regular event whose primary key is 1. A synonym URI for the above
http://rest.christchurchlye.org.uk/events/regular/date Error - Year and Month not provided
http://rest.christchurchlye.org.uk/events/regular/date/2011 Error - Month not provided
http://rest.christchurchlye.org.uk/events/regular/date/2011/3 All Regular events due to take place in March 2011 sorted in date time order
http://rest.christchurchlye.org.uk/events/regular/date/2011/3/22 All Regular events due to take place on the 22nd of March 2011 sorted in date time order

Regular and One off events combined Events are returned sorted in date time order.
URI Response Description
http://rest.christchurchlye.org.uk/events/all Error - Minimum Year and Date must be specified
http://rest.christchurchlye.org.uk/events/all/2011 Error - Minimum Year and Date must be specified
http://rest.christchurchlye.org.uk/events/all/2011/3 All events for year 2011 and month March sorted in date time order
http://rest.christchurchlye.org.uk/events/all/2011/3/22 All events for 22nd March 2011 sorted in date time order
http://rest.christchurchlye.org.uk/events/all/days/7 All events for 7 days starting from today. The number of days can be any positive integer.

REST home page
Main Website