FixMyStreet support for Open311

FixMyStreet supports Open311 both as a client (sending reports made on the site to an external service via the Open311 protocol), and partly as a server (returning reports made on the site when queried via the Open311 protocol).

What is Open311?

In a nutshell, it's an international open standard that allows services to 'talk to' council systems.

As channels of communication diversify, it has become more and more important that council systems can recognise and accept reports from a variety of sources. For example, reports may come in via Twitter, SMS, email, services like FixMyStreet, and the council's own website.

Where can I find out more?

Open311 isn't as widely known as it deserves to be, so we wrote a short series of blog posts to explain the basics. And you can find out lots more at open311.org.

Why does it matter?

If you oversee problem reports at a council, you will of course be concerned about future-proofing your communication channels in an easy and economical way – Open311 gives you that assurance.

Any questions?

We're always happy to talk. Just drop us a line.


Open311 API for the mySociety FixMyStreet server

Notiz: ERROR: Missing jurisdiction_id

At the moment only searching for and looking at reports work.

This API implementation is work in progress and not yet stabilized. It will change without warnings in the future.

At most 1000 requests are returned in each query. The returned requests are ordered by requested_datetime, so to get all requests, do several searches with rolling start_date and end_date.

The following Open311 v2 attributes are returned for each request: service_request_id, description, lat, long, media_url, status, requested_datetime, updated_datetime, service_code and service_name.

In addition, the following attributes that are not part of the Open311 v2 specification are returned: agency_sent_datetime, title (also returned as part of description), interface_used, comment_count, requestor_name (only present if requestor allowed the name to be shown on this site).

Beispiele:

Searching

The following search parameters can be used:

service_request_id
Search for numeric ID of specific request. Using this is identical to asking for a individual request using the /requests/number.format URL.
service_code
Search for the given category / service type string.
status
Search for open or closed (fixed) requests.
start_date
Only return requests with requested_datetime set after or at the date and time specified. The format is YYYY-MM-DDTHH:MM:SS+TZ:TZ.
end_date
Only return requests with requested_datetime set before the date and time specified. Same format as start_date.
interface_used
Name / identifier of interface used.
has_photo
Search for entries with or without photos. Use value 'true' to only get requests created with images, and 'false' to get those created without images.
max_requests
Max number of requests to return from the search. If it is larger than the site specific max_requests value specified in the discovery call, the value provided is ignored.

The search result might look like this:

  <service_requests>
    <request>
      <agency_sent_datetime>2013-04-04T07:25:05+02:00</agency_sent_datetime>
      <description>Unebener Bürgersteig: Auf dem Asphalt des Bürgersteigs hat es eine Erhebung, die man wirklich nicht sieht und immer wieder drüber stolpert.</description>
      <detail>Auf dem Asphalt des Bürgersteigs hat es eine Erhebung, die man wirklich nicht sieht und immer wieder drüber stolpert.</detail>
      <interface_used>Web interface</interface_used>
      <lat>47.374042</lat>
      <long>8.484223</long>
      <requested_datetime>2013-03-17T00:38:14+01:00</requested_datetime>
      <service_code>Strasse/Trottoir/Platz</service_code>
      <service_name>Strasse/Trottoir/Platz</service_name>
      <service_notice>Diese Reparatur wird von uns in den kommenden Wochen / Monaten ausgeführt.</service_notice>
      <service_request_id>1</service_request_id>
      <status>closed</status>
      <title>Unebener Bürgersteig</title>
      <updated_datetime>2013-04-12T07:59:30+02:00</updated_datetime>
    </request>
  </service_requests>