Revision history for API2


Revision [7815]

Last edited on 2013-02-27 13:52:16 by MikeShultz
Additions:
====Potential Tech====
===Frameworks===
CherryPy
[[https://bitbucket.org/weholt/django-quickview/src/fde97a0a0befaeda0ab2317035f8e7cd9c311511/docs/basic.md?at=default quickview]]


Revision [6952]

Edited on 2012-09-19 18:36:14 by MikeShultz
Additions:
====More Information====
[[API2Objects]]


Revision [6949]

Edited on 2012-09-17 21:34:00 by MikeShultz [Added respons codes]
Additions:
Design notes for version 2 of the Vote Smart A
PI.
====HTTP Response Codes====
We should adhere as much as possible to standard HTTP response codes so developers can get an idea of what's going on(if they want to).
For instance:
200 OK
400 Bad Request
401 Unauthorized
404 Not Found
406 Not Acceptable (for bad input params)
413 Request Entity Too Large (for overly-broad requests)
503 Service Unavailable (if we turn the API off?)
Deletions:
Design notes for version 2 of the Vote Smart API.


Revision [6948]

Edited on 2012-09-17 21:10:37 by MikeShultz [Added respons codes]

No Differences

Revision [6947]

Edited on 2012-09-17 21:10:22 by MikeShultz [Added respons codes]
Additions:
>>**DECISION NEEDED**: Should the default be to return all fields, or only a subset? Default would e most accessible, but some fields could be remarkably large and bandwidth intensive.>>
Returned fields(like cols in an SQL query) should be able to be specified.
##api.votesmart.org/v2/candidates?candidate_id=9490&fields=candidate_id,firstname,lastname##
##api.votesmart.org/v2/elections.candidates?election_id=1234&candidates.elections.party=*Democratic*##
Deletions:
##api.votesmart.org/v2/candidates?candidate_id=9490##
##api.votesmart.org/v2/elections.candidates?election_id=1234&candidates.election_party=*Democratic*##


Revision [6946]

Edited on 2012-09-17 20:53:35 by MikeShultz [Added respons codes]
Additions:
>>**DECISION NEEDED** on these headers:
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.>>
Deletions:
**DECISION NEEDED** on these headers:
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.


Revision [6945]

Edited on 2012-09-17 20:53:06 by MikeShultz [Added respons codes]
Additions:
Page - Page number to return
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.


Revision [6944]

Edited on 2012-09-17 20:47:58 by MikeShultz [add http headers]
Additions:
Authorization [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.8 ref]] - Contains API key
Cache-Control [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 ref]] - Whether or not or how the API software should pay attention to its cache
**DECISION NEEDED** on these headers:
Content-Type [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 ref]]
If-Modified-Since [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 ref]] - If someone only wants to return(or check) recently updated items. We may want to also support HEAD requests in this case so people can easily check for updated content without returning everything.
Overall HTTP header reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html


Revision [6943]

The oldest known version of this page was created on 2012-09-17 20:28:59 by MikeShultz [add http headers]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki