-
Notifications
You must be signed in to change notification settings - Fork 3
/
api-methods.json
129 lines (117 loc) · 6.13 KB
/
api-methods.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"default_format": "json",
"formats": [
"json"
],
"methods": {
"open311.services.getList": {
"description": "Returns a list of services for which incidents may be reported. The types of services and their meaning are left to the discretion of individual cities.",
"enabled": 1,
"documented": 1,
"requires_auth": 0,
"paginated": 1,
"method": "GET",
"example" : "file://./api-methods-examples/open311.services.getList.json"
},
"open311.services.getInfo": {
"description": "Returns basic information (as included in the _open311.services.getList_ method) as well any additional details that may be relevant to the service.",
"enabled": 1,
"documented": 1,
"requires_auth": 0,
"method": "GET",
"parameters": [
{ "name": "service_id", "description": "A valid service_id to get information about.", "required": 1 }
],
"example" : "file://./api-methods-examples/open311.services.getInfo.json"
},
"open311.statuses.getList": {
"description": "Return a list of valid statuses for incidents. The types of statuses and their meaning are left to the discretion of individual cities.",
"enabled": 1,
"documented": 1,
"paginated": 1,
"method": "GET",
"requires_auth": 0,
"example" : "file://./api-methods-examples/open311.incidents.getStatuses.json"
},
"open311.incidents.report": {
"description": "Report an incident for a given service. Returns a unique ID for the incident that may be used to call the _open311.incidents.status_ API method.",
"enabled": 1,
"documented": 1,
"method": "POST",
"requires_auth": 1,
"parameters": [
{ "name": "service_id", "description": "A valid service_id as defined by the city operating the Open 311 (Simple) API", "required": 1 },
{ "name": "latitude", "description": "A valid WGS84 coordinate", "required": 1 },
{ "name": "longitude", "description": "A valid WGS84 coordinate", "required": 1 },
{ "name": "description", "description": "A free-form text field in which the user reporting the incident may leave additional notes.", "required": 0}
],
"notes": [
"All dates should be passed in using the [W3C DateTime format](http://www.w3.org/TR/NOTE-datetime) format.",
"All geographic data is expected to be using the unprojected [WGS84](http://spatialreference.org/ref/epsg/4326/) datum (read: plain old latitudes and longitudes)."
],
"example" : "file://./api-methods-examples/open311.incidents.report.json"
},
"open311.incidents.addNote": {
"description": "Add an additional note to an incident report.",
"enabled": 1,
"documented": 1,
"requires_auth": 1,
"method": "POST",
"parameters": [
{ "name": "incident_id", "description": "The unique ID of the incident to add a note for.", "required": 1 },
{ "name": "note", "description": "The body of the note to add to the incident report.", "required": 1 },
{ "name": "public", "description": "Whether or not the note is publicly viewable. Default is false..", "required": 0 }
],
"notes": [
],
"example" : "file://./api-methods-examples/open311.incidents.addNote"
},
"open311.incidents.getInfo": {
"description": "Get the detailed information for an incident report.",
"enabled": 1,
"documented": 1,
"requires_auth": 0,
"method": "GET",
"parameters": [
{ "name": "incident_id", "description": "The unique ID of the incident to get information about.", "required": 1 }
],
"notes": [
"All dates are recorded using the [W3C DateTime format](http://www.w3.org/TR/NOTE-datetime) format.",
"All geographic data is returned using the unprojected [WGS84](http://spatialreference.org/ref/epsg/4326/) datum (read: plain old latitudes and longitudes)."
],
"example" : "file://./api-methods-examples/open311.incidents.getInfo"
},
"open311.incidents.search": {
"description": "Returns a list of incidents matching a search criteria as defined by the API request.",
"enabled": 1,
"documented": 1,
"paginated": 1,
"method": "GET",
"requires_auth": 0,
"parameters": [
{ "name": "service_id", "description": "The unique ID of the service type to search for. Multiple services may be passed in as a comma-separated list.", "required": 0 },
{ "name": "incident_id", "description": "The unique ID of the incident to search for. Multiple incidents may be passed in as a comma-separated list.", "required": 0 },
{ "name": "status_id", "description": "The unique ID of a status type to search for. Multiple statuses may be passed in as a comma-separated list.", "required": 0 },
{ "name": "created", "description": "The date or date range (see [api.md](https://github.com/straup/open311-simple/blob/master/api.md) for details) of when an incident was reported.", "required": 0 },
{ "name": "modified", "description": "The date or date range (see [api.md](https://github.com/straup/open311-simple/blob/master/api.md) for details) of when an incident was last modified.", "required": 0 },
{ "name": "where", "description": "A geopgraphic location or extent (see [api.md]((https://github.com/straup/open311-simple/blob/master/api.md) for details) for details) in which to scope the query.", "required": 0 }
],
"notes": [
"All dates should be passed to the API (and returned in results) using the [W3C DateTime format](http://www.w3.org/TR/NOTE-datetime).",
"All geographic data should be passed to the API using the unprojected [WGS84](http://spatialreference.org/ref/epsg/4326/) datum (read: plain old latitudes and longitudes).",
"If called with a valid OAuth token and signature then the query will be scoped to the user associated with that token.",
"Parameterless searches are not permitted. You must define at least one search criteria."
],
"example": "file://./api-methods-examples/open311.incidents.search.json"
},
"open311.where.getList": {
"description": "Returns a list of geographic prefixes that may be used to query for incident reports using the 'open311.incidents.search' API method.",
"enabled": 1,
"documented": 1,
"requires_auth": 0,
"paginated": 1,
"method": "GET",
"example" : "file://./api-methods-examples/open311.where.getList.json"
}
}
}