-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
231 lines (231 loc) · 7.32 KB
/
swagger.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{
"swagger":"2.0",
"info":{
"title":"Air Pollution API",
"version":"0.1.0"
},
"host":"api.airpollution.online",
"basePath":"/",
"paths":{
"fields":{
"get":{
"summary":"Get fields",
"description":"An open standard for the pollutant parameters has been defined. You can access the format for the incoming API or take the API to use the standard formats for showcasing your air-quality data.",
"tags":[
"Fields API"
],
"consumes":[
"application/json",
"application/x-form-www-urlencoded"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"type",
"in":"query",
"description":"Device Type",
"required":false,
"type":"string"
}
],
"responses":{
"200":{
"description":"ok"
},
"default":{
"description":"default response"
}
}
}
},
"all/public/devices":{
"get":{
"summary":"Device and Data",
"description":"This API offers access to the current data sent by all the devices setup in Delhi. The user can access the data of all the specific locations being covered in Delhi and their current air-quality standards.",
"tags":[
"Public API"
],
"consumes":[
"application/json",
"application/x-form-www-urlencoded"
],
"produces":[
"application/json"
],
"responses":{
"200":{
"description":"ok"
},
"default":{
"description":"default"
}
}
},
"post":{
"summary":"Current data of devices",
"description":"This API provides access to the current air-quality data for each specific device. The device id has to be entered and the data for each specific device will be shared.",
"tags":[
"Public API"
],
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"devices list",
"in":"body",
"description":"Devices List",
"required":true,
"schema":{
"type":"object",
"properties":{
"devices":{
"type":"array",
"items":{
"type":"string",
"format":"\"Device_ID\"",
"propertyRow":true
},
"name":"devices",
"propertyRow":true
}
}
}
}
],
"responses":{
"200":{
"description":"ok",
"code":"200"
},
"default":{
"description":"default",
"code":"default"
}
}
}
},
"all/public/data/{deviceId}":{
"get":{
"summary":"Get device data",
"description":"This API provides access to the data on hourly basis for 24 hours or between a specified time-range for all or specific devices. The device id has to be entered and the specific data for each device within a defined time-frame will be shared.",
"tags":[
"Public API"
],
"consumes":[
"application/json",
"application/x-form-www-urlencoded"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"deviceId",
"in":"path",
"description":"deviceId",
"required":true,
"type":"string"
},
{
"name":"lte",
"in":"formData",
"description":"Less than time",
"required":false,
"type":"string"
},
{
"name":"gte",
"in":"formData",
"description":"Greater than time",
"required":false,
"type":"string"
}
],
"responses":{
"200":{
"description":"ok"
},
"default":{
"description":"default"
}
}
}
},
"all/public/aqi/{deviceId}":{
"get":{
"summary":"aqi by device name",
"description":"This API offers access to the Air-Quality Index(AQI) for each specific device. The device id has to be entered and the AQI for the respective device is accessible.",
"tags":[
"Public API"
],
"consumes":[
"application/json",
"application/x-form-www-urlencoded"
],
"produces":[
"application json"
],
"parameters":[
{
"name":"deviceId",
"in":"path",
"description":"deviceId",
"required":true,
"type":"string"
}
],
"responses":{
"200":{
"description":"ok",
"code":"200"
},
"default":{
"description":"default",
"code":"default"
}
}
}
},
"all/public/{deviceId}":{
"get":{
"summary":"Device current data",
"description":"This API offers access to all the current data about air-quality for each specific device. The device id has to be entered and on basis of which the current data of the specific location is accessible.",
"tags":[
"Public API"
],
"consumes":[
"application/json",
"application/x-form-www-urlencoded"
],
"produces":[
"application/json"
],
"parameters":[
{
"name":"deviceId",
"in":"path",
"description":"deviceId",
"required":true,
"type":"string"
}
],
"responses":{
"200":{
"description":"ok",
"code":"200"
},
"default":{
"description":"default",
"code":"default"
}
}
}
}
}
}