|
69 | 69 |
|
70 | 70 | :query name: a name of the politician |
71 | 71 | :query jurisdiction_id: an OCD id for the jurisdiction of the organization that the politician is seeking election into or is a member of |
72 | | - :query office: (optional) a name of the office |
| 72 | + :query role: (optional) a name of the role associated with a post |
| 73 | + :query active_date: (optional) a date, date range, year, year range |
| 74 | + when the politician was seeking or held this |
| 75 | + role |
| 76 | + :query post_label: the label of the post |
73 | 77 | :query birth_date: (optional) the birth date of the politician |
74 | | - :query active_date: (optional) a date, date range, year, year range when the politician was seeking or held this office |
75 | 78 | :status 200 OK: no error, returns a list of possible ids with match scores |
76 | 79 | :status 404 Not Found: could not find any possible matches |
| 80 | + :status 402 Payment required: If the balance between data added (puts and posts on `/identifier`) and searches is out of wack. This reduce |
| 81 | + :status 429 Too Many Requests: Rate limiting |
| 82 | + |
| 83 | + :reqheader Authorization: optional OAuth token to authenticate |
| 84 | + :resheader Balance: Balance between data added and data searched |
| 85 | + |
| 86 | + |
| 87 | + **Example request**: |
| 88 | + |
| 89 | + .. sourcecode:: http |
| 90 | + |
| 91 | + GET /search?jurisdiction_id=ocd-jurisdiction/country:us/state:il/place:chicago/government&name="Ed Burke" HTTP/1.1 |
| 92 | + Host: example.com |
| 93 | + Accept: application/json, text/javascript |
| 94 | + |
| 95 | + **Example response**: |
| 96 | + |
| 97 | + .. sourcecode:: http |
| 98 | + |
| 99 | + HTTP/1.1 200 OK |
| 100 | + Vary: Accept |
| 101 | + Content-Type: text/javascript |
| 102 | + |
| 103 | + [{"politician": {"jurisdiction_id": "ocd-jurisdiction/country:us/state:il/place:chicago/government", |
| 104 | + "name": "Ed Burke", |
| 105 | + "ocd_id": "ocd-person/912c8ddf-8d04-4f7f-847d-2daf84e096e2" |
| 106 | + "birth_date": null, |
| 107 | + "posts": {"role": "Alderman", "label": "Ward 3"} |
| 108 | + }, |
| 109 | + "match_score": 0.74} |
| 110 | + ] |
77 | 111 |
|
78 | 112 | .. http:get:: /identifier/(str:ocd_identifier) |
79 | 113 |
|
|
0 commit comments