Revision history for API2
Additions:
====Potential Tech====
===Frameworks===
CherryPy
[[https://bitbucket.org/weholt/django-quickview/src/fde97a0a0befaeda0ab2317035f8e7cd9c311511/docs/basic.md?at=default quickview]]
===Frameworks===
CherryPy
[[https://bitbucket.org/weholt/django-quickview/src/fde97a0a0befaeda0ab2317035f8e7cd9c311511/docs/basic.md?at=default quickview]]
Additions:
====More Information====
[[API2Objects]]
[[API2Objects]]
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?)
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:
No Differences
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*##
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/elections.candidates?election_id=1234&candidates.election_party=*Democratic*##
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.>>
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.>>
Deletions:
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.
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.
Amount - total records to return. I think default should be fairly high so that most requests this will be irrelevant.
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
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