Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Show attributes on SR details page? #82

@Mr0grog

Description

@Mr0grog

While fixing #80, I just noticed that Chicago’s Open311 server is now returning an SR’s attributes (the additional detail questions you have to answer when submitting an SR) when using the extensions=true flag.

For example, “building violations” in Chicago might come with any of these attributes:

  • What is the actual problem being encountered?
  • Give precise address - floor or unit #
  • Is anyone in danger because of this condition?
  • Input mobile # to opt-in for text updates. If already opted-in, add mobile # to contact info.

It would be pretty nice to show these.


Example case: http://311api.cityofchicago.org/open311/v2/requests/14-02000061.json?extensions=true

[{
  "service_request_id": "14-02211982",
  "status": "open",
  "service_code": "4fd3bd72e750846c530000cd",
  ...
  "attributes": {
    "WHATISTH": "THE CALLER STATES THAT THE GARAGE ROOF HAS COLLASPED. AND HAS BEEN LIKE THIS FOR SEVERAL YEARS. AND THE OWNER'S IS NOT REPARING NOR TEARING DOWN THE GARAGE. HAZARDOUS AND UNSAFE..",
    "OWNEROC1": "YES"
  },
  ...
}]

You can look up the attribute names via [api base url]/services/[service code].json, e.g. http://311api.cityofchicago.org/open311/v2/services/4fd3bd72e750846c530000cd.json

{
  "service_code": "4fd3bd72e750846c530000cd",
  "attributes": [
    {
      "variable": true,
      "code": "WHATISTH",
      "datatype": "text",
      "required": false,
      "order": 1,
      "description": "What is the actual problem being encountered?"
    },
    ...
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions