Issues
List issues
GET https://seeclickfix.com/api/v2/issues
Optional Parameters
-
one or more area geographies - Limit results to a specified area. See how to specify a geography for syntax help.
-
page=
:page_number
- number of the page to return, default: 1 -
per_page=
:per_page
- number of issues returned per page, default: 20, maximum: 100, requests with details are limited to 20. -
status=
:status1,:status2
- one of ‘open’, ‘acknowledged’, ‘closed’, ‘archived’. default: open,acknowledged,closed -
sort=
:order
- one of ‘updated_at’, ‘created_at’, ‘rating’, ‘distance’. default: created_at. -
sort_direction=
:sort_direction
= One of ASC or DESC. Default is DESC. -
after=
:time
- must be a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ -
before=
:time
- must be a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ -
updated_at_after=
:time
- must be a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ -
updated_at_before=
:time
- must be a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ -
search=
:search
- limit results by search terms. -
request_types=
:request_type_id0,:request_type_id1
- comma delimited Request Type ids. -
assigned_to_me=
true
- issues assigned to the current_user. NOTE the request must be authenticated or this will be ignored. -
assigned=
:user_id0,:user_id1
- comma delimited user ids, -
assigned=
:user_id0,unassigned
- use the string “unassigned” to select unassigned issues -
details=
true
- defaults tofalse
. Passtrue
to get an extended issue object including comments, user information, and questions and answers.
Filter by created_at
To filter issues by their creation time (created_at
) use:
-
after
: only include issues wherecreated_at
>=after
-
before
: only include issues wherecreated_at
<before
Filter by updated_at
To filter issues by their update time (updated_at
) use:
-
updated_at_after
: only include issues whereupdated_at
>=updated_at_after
-
updated_at_before
: only include issues whereupdated_at
<updated_at_before
Examples
$ curl -i https://seeclickfix.com/api/v2/issues?page=1&per_page=5
Returns the last five issues.
Status: 200 OK
{
"errors": null,
"metadata": {
"pagination": {
"next_page": 2,
"next_page_url": "https://seeclickfix.com/api/api/v2/<ENDPOINT>?page=2",
"page": 1,
"pages": 40457,
"per_page": 20,
"previous_page": "null",
"previous_page_url": "null"
}
},
"issues": [
{
"id": 1,
"status": "Open",
"summary": "Pothole",
"description": "Please fix my neighborhood.",
"rating": "5",
"lat": 42.30293,
"lng": -72.234234234,
"point": {
"type": "Point",
"coordinates": [
-72.234234234,
42.30293
]
},
"address": "123 State St. New Haven, CT",
"created_at": "2011-04-22T13:33:48Z",
"updated_at": "2011-04-22T13:33:48Z",
"acknowledged_at": null,
"closed_at": null,
"reporter": {
"avatar": {
"full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
},
"civic_points": 10,
"id": 1,
"name": "Jeffb",
"role": "Verified Official",
"witty_title": "Street Smart"
},
"shortened_url": "http://scf.cm/i/1",
"url": "https://seeclickfix.com/api/v2/issues/1",
"comments_url": "https://seeclickfix.com/api/v2/issues/1/comments",
"flag_url": "https://seeclickfix.com/api/v2/issues/1/flag",
"html_url": "http://seeclickfix.com/issues/1-pothole",
"media": {
"image_full": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"image_square_100x100": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"representative_image_url": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"video_url": "http://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
}
]
}
Get a single issue
GET /issues/:id
Returns a single issue by id.
Example
$ curl -i https://seeclickfix.com/api/v2/issues/1?details=true
Response
Status: 200 OK
{
"acknowledged_at": null,
"address": "123 State St. New Haven, CT",
"assignee": {
"avatar": {
"full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
},
"civic_points": 10,
"id": 1,
"name": "Jeffb",
"role": "Verified Official",
"witty_title": "Street Smart"
},
"closed_at": null,
"comment_url": "https://seeclickfix.com/api/v2/issues/1/comments",
"comments": [
{
"comment": "Me too",
"commenter": {
"avatar": {
"full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
},
"civic_points": 10,
"id": 1,
"name": "Jeffb",
"role": "Verified Official",
"witty_title": "Street Smart"
},
"media": {
"image_full": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"image_square_100x100": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"video_url": "http://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
"flag_url": "https://seeclickfix.com/api/api/v2/comments/12345/flag",
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
},
{
"comment": "Me too",
"commenter": {
"avatar": {
"full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
},
"civic_points": 10,
"id": 1,
"name": "Jeffb",
"role": "Verified Official",
"witty_title": "Street Smart"
},
"media": {
"image_full": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"image_square_100x100": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"video_url": "http://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
"flag_url": "https://seeclickfix.com/api/api/v2/comments/12345/flag",
"created_at": "2011-04-14T16:00:49Z",
"updated_at": "2011-04-14T16:00:49Z"
}
],
"comment_count": 2,
"created_at": "2008-03-25T12:32:41-04:00",
"current_user_relationship": {
"assignee": false,
"following": false,
"reporter": false,
"voted": true
},
"description": "Please fix my neighborhood.",
"html_url": "http://seeclickfix.com/issues/1-pothole",
"id": 1,
"lat": 42.30293,
"lng": -72.234234234,
"media": {
"image_full": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"image_square_100x100": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"representative_image_url": "http://seeclickfix.com/files/comment_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg",
"video_url": "http://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
"point": {
"coordinates": [
-72.234234234,
42.30293
],
"type": "Point"
},
"questions": [
{
"question": "How deep is the pothole?",
"answer": "Shallow"
},
{
"question": "Is it hazardous?",
"answer": "No"
}
],
"rating": "5",
"integrations": {
"remote_id": 2,
"title": "City of New Haven",
"status": "Accepted"
},
"reporter": {
"avatar": {
"full": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf.jpeg",
"square_100x100": "http://seeclickfix.com/files/user_images/0001/3476/32eebb4f8669b5beb441280bc16f26bf_square.jpeg"
},
"civic_points": 10,
"id": 1,
"name": "Jeffb",
"role": "Verified Official",
"witty_title": "Street Smart"
},
"shortened_url": "http://scf.cm/i/1",
"status": "Open",
"summary": "Pothole",
"updated_at": "2011-04-22T13:33:48Z",
"url": "https://seeclickfix.com/api/v2/issues/1",
"vote_count": 2,
"votes": [
{
"created_at": "2011-04-24T13:33:48Z"
},
{
"created_at": "2011-04-24T13:33:48Z"
}
]
}
Create an Issue
See the reporting an issue.