Hey all,
I spent the Summer working with Michael Evans at Code for America on the
Open311 dashboard. In trying to download data from the Boston API a while
back, I was first kind of confused why the endpoint consistently only
returned 10 results. I checked the documentation (
http://wiki.open311.org/GeoReport_v2#Response_Volume) and it appeared to be
contrary to the implementation. After a few minutes of playing around with
the URL parameters, I discovered there is an (apparently) undocumented
"page" parameter that allows a user to offset the search results.
Fast forward a little bit to when SeeClickFix put the incredible amounts of
cities on Open311. I discovered they also use the "page" URL parameter.
Fast forward again to Baltimore's announcement. They also use the "page"
parameter.
In my experience, there are more implementations of the API that use
pagination than don't. This should be documented, as well as the default
number of rows returned per page. In fact, it would be even more awesome if
the user could specify how many rows for the API to return.
- Chris
P.S.: If you haven't seen it yet, check out the preview of the Open311
Dashboard on the Code for America blog:
http://codeforamerica.org/2011/08/31/chriss-cfa-summer-preview-the-open311-dashboard/
(Thoughts/ideas/suggestions
strongly encouraged).
I spent the Summer working with Michael Evans at Code for America on the
Open311 dashboard. In trying to download data from the Boston API a while
back, I was first kind of confused why the endpoint consistently only
returned 10 results. I checked the documentation (
http://wiki.open311.org/GeoReport_v2#Response_Volume) and it appeared to be
contrary to the implementation. After a few minutes of playing around with
the URL parameters, I discovered there is an (apparently) undocumented
"page" parameter that allows a user to offset the search results.
Fast forward a little bit to when SeeClickFix put the incredible amounts of
cities on Open311. I discovered they also use the "page" URL parameter.
Fast forward again to Baltimore's announcement. They also use the "page"
parameter.
In my experience, there are more implementations of the API that use
pagination than don't. This should be documented, as well as the default
number of rows returned per page. In fact, it would be even more awesome if
the user could specify how many rows for the API to return.
- Chris
P.S.: If you haven't seen it yet, check out the preview of the Open311
Dashboard on the Code for America blog:
http://codeforamerica.org/2011/08/31/chriss-cfa-summer-preview-the-open311-dashboard/
(Thoughts/ideas/suggestions
strongly encouraged).