Events Example

Use case - Retrieve all events that took place in New York City in 2015.

Field selector:

{
  id,
  title,
  description,
  startDateTime,
  endDateTime,
  venue,
  assets
}

Query:

{
  "$query":
  {
    "startDateTime": {
      "$gte": "2015-01-01"
    },
    "endDateTime": {
      "$lte": "2015-12-31"
    },
    "venue.location.city": "New York"
  }
}

Request: GET /events?fs={id,title,description,startDateTime,endDateTime,venue,assets}&s={"$query":{"startDateTime":{"$gte":"2015-01-01"},"endDateTime":{"$lte":"2015-12-31"},"venue.location.city":"New York"}}

Response payload:

    {
      "pager": {},
      "data":
      [
        {
          "id": "862bc634-5daf-4c07-b557-a88d03d973ec",
          "title": "2015 NFL Draft",
          "description": "NFL Draft",
          "startDateTime": "2015-04-30T05:27:07.000Z",
          "endDateTime": "2015-05-02T05:27:07.000Z"
          "venue": {
              "name": "Radio City Music Hall",
              "address": {
                  "street": "1260 Avenue of the Americas",
                  "city": "New York",
                  "state": "NY",
                  "postalCode": "10020",
                  "country": "USA"
              }
          },

          "assets": {
              "imageUrl": "http://assets.nfl.com/xyz1",
              "imageIconUrl": "http://assets.nfl.com/xyz2"
          }
        }
      ]
    }