You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agency/README.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,12 @@ MDS is intended to be used for multiple transportation modes, including its orig
59
59
60
60
### Responses and Error Messages
61
61
62
+
The response to a client request must include a valid HTTP status code defined in the [IANA HTTP Status Code Registry][iana].
63
+
64
+
The response must set the `Content-Type` header as specified in the [Versioning section][versioning].
65
+
66
+
Response bodies must be a `UTF-8` encoded JSON object
67
+
62
68
See the [Responses][responses], [Error Messages][error-messages], and [Bulk Responses][bulk-responses] sections, and the [schema][schema] for more details.
63
69
64
70
[Top][toc]
@@ -171,7 +177,7 @@ If `device_id` is specified, `GET` will return an array with a single vehicle re
171
177
172
178
Possible HTTP Status Codes:
173
179
200
174
-
400 (with `vehicle_id`parameter)
180
+
400 (with parameter)
175
181
401
176
182
404
177
183
406
@@ -214,7 +220,7 @@ If `device_id` is specified, `GET` will return an array with a vehicle status re
214
220
215
221
Possible HTTP Status Codes:
216
222
200
217
-
400 (with `vehicle_id`parameter)
223
+
400 (with parameter)
218
224
401
219
225
404
220
226
406
@@ -466,6 +472,7 @@ See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schem
Copy file name to clipboardExpand all lines: provider/README.md
+96-12Lines changed: 96 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ General authorization details are specified in the [Authorization section](/gene
54
54
55
55
### Versioning
56
56
57
-
`provider` APIs must handle requests for specific versions of the specification from clients.
57
+
`Provider` APIs must handle requests for specific versions of the specification from clients.
58
58
59
59
Versioning must be implemented as specified in the [Versioning section][versioning].
60
60
@@ -70,11 +70,13 @@ MDS is intended to be used for multiple transportation modes, including its orig
70
70
71
71
The response to a client request must include a valid HTTP status code defined in the [IANA HTTP Status Code Registry][iana].
72
72
73
-
See [Responses][responses] for information on valid MDS response codes and [Error Messages][error-messages] for information on formatting error messages.
74
-
75
73
The response must set the `Content-Type` header as specified in the [Versioning section][versioning].
76
74
77
-
Response bodies must be a `UTF-8` encoded JSON object and must minimally include the MDS `version` and a `data` payload:
75
+
Response bodies must be a `UTF-8` encoded JSON object
76
+
77
+
See the [Responses][responses], [Error Messages][error-messages], and [Bulk Responses][bulk-responses] sections, and the [schema][schema] for more details.
78
+
79
+
Response bodies must be a `UTF-8` encoded JSON object and must minimally include the MDS `version` and an object payload:
|`device_id`| UUID | Optional | If provided, retrieve the specified vehicle |
197
199
198
-
200 Success Response:
199
-
200
200
If `device_id` is specified, `GET` will return an array with a single vehicle record, otherwise it will be a list of vehicle records with pagination details per the [JSON API](https://jsonapi.org/format/#fetching-pagination) spec:
201
201
202
202
```json
@@ -212,9 +212,17 @@ If `device_id` is specified, `GET` will return an array with a single vehicle re
212
212
}
213
213
```
214
214
215
-
404 Failure Response:
215
+
#### Responses
216
216
217
-
_No content returned on vehicle not found._
217
+
Possible HTTP Status Codes:
218
+
200
219
+
400 (with parameter)
220
+
401
221
+
404
222
+
406
223
+
500
224
+
225
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
|`device_id`| UUID | Optional | If provided, retrieve the specified vehicle |
236
244
237
-
200 Success Response:
238
-
239
245
If `device_id` is specified, `GET` will return an array with a vehicle status record, otherwise it will be a list of vehicle records with pagination details per the [JSON API](https://jsonapi.org/format/#fetching-pagination) spec:
240
246
241
247
```json
@@ -251,9 +257,17 @@ If `device_id` is specified, `GET` will return an array with a vehicle status re
251
257
}
252
258
```
253
259
254
-
404 Failure Response:
260
+
#### Responses
261
+
262
+
Possible HTTP Status Codes:
263
+
200
264
+
400 (with parameter)
265
+
401
266
+
404
267
+
406
268
+
500
255
269
256
-
_No content returned on vehicle not found._
270
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
257
271
258
272
[Top][toc]
259
273
@@ -308,6 +322,19 @@ processing for that hour:
308
322
309
323
For the near-ish real time use cases, please use the [events][events] endpoint.
310
324
325
+
#### Responses
326
+
327
+
Possible HTTP Status Codes:
328
+
200
329
+
202
330
+
400(with parameter)
331
+
401
332
+
404
333
+
406
334
+
500
335
+
336
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
337
+
311
338
[Top][toc]
312
339
313
340
## Telemetry
@@ -333,6 +360,17 @@ Telemetry for a [trip](#trip) must include at least 2 points: the start point an
333
360
334
361
Without a `telemetry_time` query parameter, `/telemetry` shall return a `400 Bad Request` error.
335
362
363
+
#### Responses
364
+
365
+
Possible HTTP Status Codes:
366
+
200
367
+
400(with parameter)
368
+
401
369
+
406
370
+
500
371
+
372
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
373
+
336
374
[Top][toc]
337
375
338
376
## Events
@@ -384,6 +422,19 @@ processing for that hour:
384
422
}
385
423
```
386
424
425
+
#### Responses
426
+
427
+
Possible HTTP Status Codes:
428
+
200
429
+
202
430
+
400(with parameter)
431
+
401
432
+
404
433
+
406
434
+
500
435
+
436
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
437
+
387
438
[Top][toc]
388
439
389
440
### Recent Events
@@ -411,6 +462,17 @@ Should either side of the requested time range be missing, `/events/recent` shal
411
462
412
463
Should either side of the requested time range be greater than 2 weeks before the time of the request, `/events/recent` shall return a `400 Bad Request` error.
413
464
465
+
#### Responses
466
+
467
+
Possible HTTP Status Codes:
468
+
200
469
+
400(with parameter)
470
+
401
471
+
406
472
+
500
473
+
474
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
475
+
414
476
[Top][toc]
415
477
416
478
## Stops
@@ -436,6 +498,18 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
436
498
437
499
In the case that a `stop_id` path parameter is specified, the `stops` array returned will only have one entry. In the case that no `stop_id` query parameter is specified, all stops will be returned.
438
500
501
+
#### Responses
502
+
503
+
Possible HTTP Status Codes:
504
+
200
505
+
400 (with parameter)
506
+
401
507
+
404 (with parameter)
508
+
406
509
+
500
510
+
511
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
512
+
439
513
[Top][toc]
440
514
441
515
## Reports
@@ -456,6 +530,16 @@ The authenticated reports are monthly, historic flat files that may be pre-gener
456
530
**`data` Filename:** monthly file named by year and month, e.g. `/reports/YYYY-MM.csv`
457
531
**`data` Payload:** monthly CSV files of [Report](/data-types.md#Reports) objects
458
532
533
+
#### Responses
534
+
535
+
Possible HTTP Status Codes:
536
+
200
537
+
401
538
+
404
539
+
500
540
+
541
+
See [Responses][responses], [Bulk Responses][bulk-responses], and [schema][schema] for details.
0 commit comments