NYC Tennis Courts


Tennis courts in New York City Department of Parks & Recreation properties.

API

Request URL

http://actuatr.com/datasets/7nt2q82x.<b>format</b>?<b>parameter</b>=<b>value</b>

The server will return the rows that match the parameters you set. Each parameter is set on one of the columns of the dataset. Multiple parameters may be chained together to further narrow down the results. Support for ORing queries is coming. Responses come back in either JSON or XML formats.

Column definitions

Each column of data is mapped to a generic column number, beginning with c1. To view the actual data, click here.
c1
Name (String)

c2
Location (String)

c3
Phone (String)

c4
Courts (Float)

c5
Indoor/Outdoor (String)

c6
Type (String)

c7
Accessible (String)

c8
Info (Fixnum)


Query parameters

In your queries, replace the # symbol in this table with the column number from the column definitions above.
c#_is
exactly equals, case-sensitive

c#_not
not equal to, case-sensitive

c#_like
contains, case-insensitive

c#_not_like
does not contain, case-insensitive

c#_lt
less than

c#_lte
less than or equal to

c#_gt
greater than

c#_gte
greater than or equal to

c#_blank
column is empty

c#_not_blank
column is not empty

ascend_by_c#
sort in ascending order

descend_by_c#
sort in descending order


Response

You can construct your own queries and view the response using a service like hurl.it.

The following is an example XML response from Actuatr.

<?xml version="1.0" encoding="UTF-8"?>
<dataset>
<title>Title</title>
<description>Description</description>
<created-at type="datetime">2009-12-09T15:41:14Z</created-at>
<updated-at type="datetime">2009-12-09T15:41:18Z</updated-at>
<items type="array">
<item>
<c1>cell 1 contents</c1>
<c2>cell 2 contents</c2>
...
<c15>cell 15 contents</c15>
<c16>cell 16 contents</c16>
<created-at type="datetime">2009-12-09T15:41:18Z</created-at>
<lat type="float" nil="true">40.7834345</lat>
<lng type="float" nil="true">-73.9662495</lng>
<updated-at type="datetime">2009-12-09T15:41:18Z</updated-at>

</item>

</items>

</dataset>


The following is an example JSON response from Actuatr.

{ "dataset": { "title": "Title of dataset", "description": "Description of dataset", "updated_at": "2009-12-09T15:59:19Z" "created_at": "2009-12-09T15:43:25Z", "items": [ { "c1": "cell 1 contents", "c2": "cell 2 contents", ... "c15": "cell 15 contents", "c16": "cell 16 contents", "created_at": "2009-12-09T15:43:28Z", "lat": 40.7834345, "lng": -73.9662495, "updated_at": "2009-12-09T15:43:28Z" } ] } }


Examples

Here are some generic examples.
To get a list of the items where column 2 contains the number 212 somewhere in it, make the following request to get a JSON reponse:

http://actuatr.com/datasets/7nt2q82x.json?c2_like=212

To get a list of the items where column 4 is "Brooklyn" and column 1 is "student", append the parameters and make the following request to get a JSON reponse:

http://actuatr.com/datasets/7nt2q82x.json?c4_is=Brooklyn&c1_is=student

To get a list of the items where column 3 is not blank, sorted in ascending order on column 5, make the following request to get an XML reponse:

http://actuatr.com/datasets/7nt2q82x.xml?c3_not_blank=true&ascend_by_c5=true



Comments

blog comments powered by Disqus