Events

Joondalup Events

Created 13/01/2025

Updated 13/01/2025

API documentation can be found on https://eventespresso.com/wiki/json-api-add-on/

Events website: http://events.joondalup.wa.gov.au/

Detailed view of events http://events.joondalup.wa.gov.au/event-registration/?ee=XXXXXX where XXXXXX is the event id from the api

API options

Response/Request Formats (xml, json,pretty_json) this API supports both JSON (default) and XML formats. To get a response back in XML, simply append “.xml” to any of the session key (eg, “mysite.com/espresso-api/v1/events/{session_key}.xml?id__lt=10” or “mysite.com/espresso-api/v1/events/14/{session_key}.xml?). If you would like to have your JSON returned in a more readable, but less efficient, format, simply set the format to ‘pretty_json’ (eg, “mystei.com/espresso-api/v1/events/{session_key}.pretty_json?id__in=1,23,342)

Request Methods (GET, POST, PUT, DELETE) According to RESTful principles, the HTTP request method sent to an endpoint dictates functionality in this API. Eg: sending the request method of DELETE on a request will be interpreted very differently by the API server than the same request using the PUT request method. In the following documentation, each endpoint is preceded by the HTTP request method that invokes that functionality. (Eg the title “GET /events” explains the functionality of sending a request to “/events” using the GET request method).

If you are unable to send PUT or DELETE request methods, we have provided a workaround: in the body of your request, provide a parameter called ‘request_method’ and set its value to the desired request method. Eg, if you want to send a PUT request but are unable, send a POST request with the request parameters ‘request_method’:’PUT’ (and the usual ‘body’ parameter with the json or xml to indicate what you want to update). Or if you want to send a DELETE request to /events/{id}/{sessionId}, send the following GET request /events/{id}/{sessionid}?request_method=DELETE.

GETting with Query Parameters On all GET requests (eg, an HTTP GET request to mysite.com/espresso-api/v1/events,) you may add GET querystring variables to filter your results, eg mysite.com/espresso-api/v1/events?Datetime.event_start2012-04-23%2000:00:00. But, what if you want all events before April 23rd 2012? you’d like to use mysite.com/espresso-api/v1/events?Datetime.event_start<2012-04-23%2000:00:00, but that’s invalid HTTP querystring syntax. If you want to alter a query like that simply append ‘__lt’ to the querystring parameter and it will be interpreted as < (or “less than”). ie mysitecom/espresso-api/v1/events?Datetime.event_start__lt=2012-04-23%2000:00:00. The following operators are available:

MySQL Operator String to Append to Query Parameter Example < __lt eg: mysite.com/espresso-api/v1/events?Datetime.event_start__lt=2012-04-23%2012:23:56 __gt eg: mysite.com/espresso-api/v1/events?Datetime.event_start__gte=2012-04-23%2012:23:56

= __gte eg: mysite.com/espresso-api/v1/events?Datetime.event_start__gt=2012-04-23%2012:23:56 LIKE __like eg: mystie.com/esresso-api/v1/attendees?fname__like=%25Tim%25 (note that ‘%’ urlencoded is %25) IN __in eg: mysite.com/espresso-api/v1/registrations__in=234,432,345

You may also query based on most related models, as long as they are part of the response of the endpoint you’re currenlty querying. For example, Price is a related model of Event, and is always included on any query to Events. So if you want to find all events with a price of 12.00, you could do a query like mysite.com/espresso-api/v1/events/{session_key}?Price.amount=12.00.

Further Examples:

Example Request Description generated SQL for WHERE statement GET mysite.com/espresso-api/v1/events/{session_key}?name__like=%25party%25&description__like=%25all%20fun%25 Get all events where the name has a substring of ‘party’, and where the event description has the substring ‘all fun’ WHERE event_name LIKE ‘%party%’ AND event_desc LIKE ‘%all fun%’ GET mysite.com/espresso-api/v1/events/{session_key}?/events/{session_key}?Datetime.event_start__lt=2012-02-06%2012:23:56 get all events which start before february 6th 2012 WHERE Datetime.event_start < ‘2012-02-06%2012:23:56’ GET mysite.com/espresso-api/v1/registrations/{session_key}?Event.id__lt=5 get all registrations whose associated Event.id is less than 5 WHERE wp_events_detail < 5

Source

This data file or API can be downloaded from:

http://events.joondalup.wa.gov.au/espresso-api/v1/events/public.json