Skip to content
Matt Farmer edited this page Aug 17, 2013 · 10 revisions

The Votes Resource is used to obtain information about the votes that have occurred in the Georgia General Assembly. Unless otherwise specified in your request, the Vote API will assume that you're querying about the current legislative session. It is also possible to retrieve all votes in the entirety of the database, if you so desire, regardless of session.

The Vote Model

Field Description
_id The unique ID of the vote in the API's database.
sessionId The unique ID of the session in the API's database.
assemblyId The assembly ID that's used in the GGA database.
legislationIds An array of unique IDs of the legislation associated with this vote, if any.
voteNumber The vote number of the session the vote occurred in. Vote numbers are unique to each chamber.
dateTime The date and time the vote occurred.
description The description of the vote on the General Assembly website.
chamber An indication of what chamber the vote was cast in. One of "house" or "senate".
votes A map of members who cast votes in this vote keyed on what their vote was.
  <table>
    <tr>
      <td>yea</td>
      <td>An array of [[members|Members]] ID's who voted yea.</td>
    </tr>
    <tr>
      <td>nay</td>
      <td>And array of [[members|Members]] ID's who voted nay.</td>
    </tr>
    <tr>
      <td>nv</td>
      <td>An array of [[members|Members]] ID's who didn't vote.</td>
    </tr>
    <tr>
      <td>exc</td>
      <td>An array of [[members|Members]] ID's who were excused from vote.</td>
    </tr>
  </table>
</td>

GET /api/v1/votes

This API call will retrieve all votes matching the query parameters specified from either of the two chambers of the Georgia General Assembly. The possible query parameters that you can provide are:

  • sessionId (String) - The object ID of the legislative session in the API's database. If not provided, the sessionId defaults to that of the current session. To retrieve votes from all sessions, provide the string "any."
  • chamber (String) - To limit your search to a particular chamber, provide either "senate" or "house" for this query parameter.
  • before (DateTime) - Matches all votes that occurred before the date/time specified.
  • after (DateTime) - Matches all votes that occurred after the date/time specified.

Success Response

In the event of a query that has matching results, the API will respond with an HTTP 200, and the body of the response will be a JSON array of the following format:

[
  {
    "_id": "abc123abcabc",
    "sessionId": "abcabcabc",
    "voteNumber": 1,
    "chamber": "house",
    ....
  },
  {
    "_id": "abc123abcabc",
    "sessionId": "abcabcabc",
    "voteNumber": 1,
    "chamber": "senate",
    ....
  }
]

No matches response.

In the event no matches are found for your query, the API will respond with an HTTP 204, to indicate that the request was successful and understood, but that there's no matching content for your query. There will be no body in the response.

Error response

See the Error Handling page.

Clone this wiki locally