Arlo

REST Pub API: EventSearch filters

The EventSearch resource supports filtering of the resultset via the filter query parameter. Filters are specified using the format filter_code=filter_parameter. Multiple filters can be used in a single request and must be separated by commas in the query.

Care must be taken to ensure that all string parameter values are encoded for filters, particularly those involving user-specified values such as codes and names that may have value with characters that, if not properly encoded, would prevent correct parsing of the filter query.

Filters specification

Event ID (eventid)

Filters search results based on their EventID. Parameter must be an encoded event ID string value, or an array of encoded event ID string values. This filter can be used to retrieve specific event records.

Examples

  • Filter results by a single event ID: ?filter=eventID=233
  • Filter results by a list of event IDs: ?filter=eventID=[233,237,239]

Event tag (tag)

Filters search results based on event tag values. Parameter must be an encoded tag string value, or an array of encoded tag string values.

Examples

  • Filter results by a single tag: ?filter=tag=FillingFast
  • Filter results by a list of tags: ?filter=tag=[FillingFast,NewIn2013,Popular]

Location name (locname)

Filters search results based on the Name field of their location details. Parameter must be an encoded location string value, or an array of encoded location string values.

Examples

  • Filter results by a single location name: ?filter=locname=Auckland
  • Filter results by a list of location names: ?filter=locname=[Auckland,Melbourne,Sydney]

City (city)

Filters search results based on the City field of their location. Parameter must be an encoded city string value, or an array of encoded city string values.

Examples

  • Filter results by a single city: ?filter=city=Dunedin
  • Filter results by a list of cities: ?filter=city=[Dunedin,Christchurch,Wellington]

City/suburb (citysuburb)

Filters search results based on City and Suburb field combinations. Parameter must be an encoded city/suburb pair string value, or an array of encoded city/suburb pair string values. Each pair of city/suburb filter values must be in the format city;suburb.

Examples

  • Filter results by a single city/suburb pair: ?filter=citysuburb=Wellington;Miramar
  • Filter results by a list of city/suburb pairs: ?filter=citysuburb=[Wellington;Johnsonville,Wellington;Aro%20Valley]

State (state)

Filters search results based on the state location of the event. Parameter must be an encoded state string value, or an array of encoded state string values.

Examples

  • Filter results by a single state: ?filter=state=QLD
  • Filter results by a list of states: ?filter=state=[QLD,VIC,NSW]

StartDateTime min (startmin)

Filters search results starting after a specified date/time. Parameter must be a date/time string value, including a UTC offset. Can be comined with the startmax filter to return only events within a date range window. Date value must be in ISO 8601 format: yyyy-MM-ddTHH:mm:ss.fffffff+zzzz

Examples

  • Filter results for events that start after a date:
    ?filter=startmin=2013-05-20T08:30:00.0000000+12:00

Date/time string format must be exact, including the UTC offset and placeholder zeros. Incorrect parameter format will cause a HTTP 400 Bad Request response.

StartDateTime max (startmax)

Filters search results starting before a specified date/time. Parameter must be a date/time string value, including a UTC offset. Can be comined with the startmin filter to return only events within a date range window. Date value must be in ISO 8601 format: yyyy-MM-ddTHH:mm:ss.fffffff+zzzz

Examples

  • Filter results for events that start before a date:
    ?filter=startmax=2013-05-20T08:30:00.0000000+12:00

Date/time string format must be exact, including the UTC offset and placeholder zeros. Incorrect parameter format will cause a HTTP 400 Bad Request response.

Template code (templatecode)

Filters search results based on the code of the template associated with the event. Parameter must be an encoded template code string value, or an array of encoded code string values.

Examples

  • Filter results by a single code: ?filter=templatecode=MGMT101
  • Filter results by a list of codes: ?filter=templatecode=[MGMT101,MGMT102,MGMT103]

Template topic code (templatetopic)

Filters search results based on the topic of the template associated with the event. Parameter must be an encoded topic string value, or an array of encoded topic string values.

Examples

  • Filter results by a single code: ?filter=templatetopic=ECON
  • Filter results by a list of codes: ?filter=templatetopic=[MATH,COSC,ECON]

Template tag (templatetag)

Filters search results based on the tags of the template associated with the event. Parameter must be an encoded tag string value, or an array of encoded tag string values.

Examples

  • Filter results by a single tag: ?filter=templatetag=Top%2010
  • Filter results by a list of tags: ?filter=templatetag=[Top%2010,Popular%20Course,New%20in%202013]

Template category ID (templatecategoryid)

Filters search results based on the categories of the template associated with the event. Parameter must be an encoded category ID string value, or an array of encoded category ID string values.

Examples

  • Filter results by a single category ID: ?filter=templatecategoryid=683
  • Filter results by a list of category IDs: ?filter=templatecategoryid=[683,684,685]

Template ID (templateid)

Filters search results based on the ID of the template associated with the event. Parameter must be an encoded template ID string value, or an array of encoded template ID string values.

Examples

  • Filter results by a single template ID: ?filter=templateid=2882
  • Filter results by a list of template IDs: ?filter=templateid=[2882,2883,2884]

Presenter ID (presenterid)

Filters search results based on the ID of the template associated with the event. Parameter must be an encoded presenter ID string value, or an array of encoded presenter ID string values.

Examples

  • Filter results by a single presenter ID: ?filter=presenterid=199
  • Filter results by a list of presenter IDs: ?filter=presenterid=[199,200,201]

Venue ID (venueid)

Filters search results based on the ID of the venue associated with the event. Parameter must be an encoded venue ID string value, or an array of encoded venue ID string values.

Examples

  • Filter results by a single venue ID: ?filter=venueid=677
  • Filter results by a list of venue IDs: ?filter=venueid=[678,679,680]

Examples

Example 1

Retrieve all event results that have a specific template code (BENCH). This example is a typical method of retrieving upcoming dates for a single course or event template (using the templatecode filter).

GET /api/2012-02-01/pub/resources/eventsearch/?format=json&fields=EventID,TemplateCode,Name,StartDateTime&filter=templatecode=BENCH

{
   "StartIndex":0,
   "Count":16,
   "Items":[
      {
         "EventID":10063,
         "Name":"Benchmarking",
         "StartDateTime":"2013-05-13T08:00:00.0000000+10:00",
         "TemplateCode":"BENCH"
      },
      {
         "EventID":9695,
         "Name":"Benchmarking",
         "StartDateTime":"2013-10-24T13:00:00.0000000+13:00",
         "TemplateCode":"BENCH"
      },
      {
         "EventID":9701,
         "Name":"Benchmarking",
         "StartDateTime":"2013-10-24T13:00:00.0000000+13:00",
         "TemplateCode":"BENCH"
      },
      ...
   ]
}
Example 2

Retrieve all event results that have a specific template code (BENCH) and a specific location name (Auckland). This example is often used on a page showing dates for a known template (templatecode filter) but where the user also wants a location filter applied to show dates for their own area (locname filter).

GET /api/2012-02-01/pub/resources/eventsearch/?format=json&fields=EventID,TemplateCode,Name,StartDateTime&filter=templatecode=BENCH,locname=Auckland

{
   "StartIndex":0,
   "Count":2,
   "Items":[
      {
         "EventID":10063,
         "Name":"Benchmarking",
         "StartDateTime":"2013-05-13T08:00:00.0000000+10:00",
         "TemplateCode":"BENCH"
      },
      {
         "EventID":9695,
         "Name":"Benchmarking",
         "StartDateTime":"2013-10-24T13:00:00.0000000+13:00",
         "TemplateCode":"BENCH"
      }
   ]
}
Example 3

Retrieve all event results that are tagged with a specific value (Top 10). This example is often used to produce promotional lists of events on a homepage and uses the tag filter.

GET /api/2012-02-01/pub/resources/eventsearch/?format=json&fields=EventID,TemplateCode,Name,StartDateTime&filter=tag=Top%2010

{
   "StartIndex":0,
   "Count":10,
   "Items":[
      {
         "EventID":9698,
         "Name":"Building Your Brand",
         "StartDateTime":"2013-05-27T08:00:00.0000000+12:00",
         "TemplateCode":"BRAN"
      },
      {
         "EventID":10074,
         "Name":"Business Modelling",
         "StartDateTime":"2013-06-14T08:00:00.0000000+08:00",
         "TemplateCode":"MOD"
      },
      {
         "EventID":9768,
         "Name":"Creating a Marketing Plan",
         "StartDateTime":"2013-06-20T08:00:00.0000000+12:00",
         "TemplateCode":"PLAN"
      },
      ...
   ]
}