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: .github/PULL_REQUEST_TEMPLATE/default.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,11 @@ title: <Insert Title>
9
9
10
10
Thank you for your contribution!
11
11
12
-
*For most Pull Requests, the target branch should be [**`dev`**](https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev). Please ensure you are targeting **`dev`** to avoid complications and help make the Review process as smooth as possible.*
12
+
To avoid complications and help make the Review process as smooth as possible, make sure to:
13
+
14
+
1. Target [**`dev`**](https://github.com/openmobilityfoundation/mobility-data-specification/tree/dev) branch. Please ensure you are targeting **`dev`**, not **`main`**.
15
+
1. Keep the *"Allow edits from maintainers"* button checked to help us resolve some issues for you.
16
+
1. Be ready to resolve any merge conflicts before we approve your Pull Request.
***Ulm, Germany**: A draft of the guidelines can be found at [the city's GitHub presence](https://github.com/stadtulm/mds-zonen).
77
77
***Washington, DC**: [Dockless Vehicle Permits](https://ddot.dc.gov/page/dockless-vehicle-permits-district), [terms and conditions](https://ddot.dc.gov/sites/default/files/dc/sites/ddot/2019.11.6%20Shared%20dockless%202020%20Terms%20and%20Conditions%20scooter.pdf), [data reporting standards](https://ddot.dc.gov/sites/default/files/dc/sites/ddot/2019.11.6%20Dockless%20Permit%20TC%20Attatchments.pdf), and [FAQ](https://docs.google.com/document/d/1G2ddANcXl3lShCZInV3uX2NTBfRRu4Fm-tiaCi203QM/).
78
78
79
-
*_[add your City here by opening a pull request](https://github.com/openmobilityfoundation/mobility-data-specification/compare)_
79
+
*_add a city here by [opening a pull request](https://github.com/openmobilityfoundation/mobility-data-specification/compare/dev...dev) or [making an issue](https://github.com/openmobilityfoundation/mobility-data-specification/issues/new?assignees=&labels=&template=feature-request---proposal.md&title=)_.
80
80
81
81
Other cities include Baltimore, Bellevue, Charlotte, Oakland, and Seattle, via the [NACTO Guidelines for Regulating Shared Micromobility](https://nacto.org/wp-content/uploads/2019/09/NACTO_Shared_Micromobility_Guidelines_Web.pdf), page 48.
Copy file name to clipboardExpand all lines: agency/README.md
+77-17Lines changed: 77 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,38 +2,46 @@
2
2
3
3
This specification contains a collection of RESTful APIs used to specify the digital relationship between *mobility as a service* Providers and the Agencies that regulate them.
4
4
5
-
* Date: 19 Sep 2019
6
-
* Version: BETA
7
-
8
5
## Table of Contents
9
6
10
7
*[General Information](#general-information)
8
+
*[Versioning](#versioning)
9
+
*[Responses and Error Messages](#responses-and-error-messages)
10
+
*[Authorization](#authorization)
11
11
*[Vehicles](#vehicles)
12
-
*[Vehicle Registration](#vehicle---register)
13
-
*[Vehicle Update](#vehicle---update)
14
-
*[Vehicle Events](#vehicle---event)
15
-
*[Vehicles Telemetry](#vehicles---telemetry)
12
+
*[Vehicle - Register](#vehicle---register)
13
+
*[Vehicle - Update](#vehicle---update)
14
+
*[Vehicle - Events](#vehicle---event)
15
+
*[Vehicle - Telemetry](#vehicle---telemetry)
16
16
*[Telemetry Data](#telemetry-data)
17
17
*[Stops](#stops)
18
18
19
19
## General information
20
20
21
21
This specification uses data types including timestamps, UUIDs, and vehicle state definitions as described in the MDS [General Information][general] document.
22
22
23
+
[Top][toc]
24
+
23
25
### Versioning
24
26
25
27
`agency` APIs must handle requests for specific versions of the specification from clients.
26
28
27
29
Versioning must be implemented as specified in the [Versioning section][versioning].
28
30
31
+
[Top][toc]
32
+
29
33
### Responses and Error Messages
30
34
31
35
See the [Responses][responses] and [Error Messages][error-messages] sections.
32
36
37
+
[Top][toc]
38
+
33
39
### Authorization
34
40
35
41
When making requests, the Agency API expects `provider_id` to be part of the claims in a [JWT](https://jwt.io/)`access_token` in the `Authorization` header, in the form `Authorization: Bearer <access_token>`. The token issuance, expiration and revocation policies are at the discretion of the Agency.
36
42
43
+
[Top][toc]
44
+
37
45
## Vehicles
38
46
39
47
The `/vehicles` endpoint returns the specified vehicle (if a device_id is provided) or a list of known vehicles. Providers can only retrieve data for vehicles in their registered fleet.
@@ -49,7 +57,7 @@ Path Params:
49
57
50
58
200 Success Response:
51
59
52
-
If `device_id` is specified, `GET` will return 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:
60
+
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:
53
61
54
62
```json
55
63
{
@@ -83,7 +91,9 @@ A vehicle record is as follows:
83
91
84
92
_No content returned on vehicle not found._
85
93
86
-
## Vehicle Registration
94
+
[Top][toc]
95
+
96
+
## Vehicle - Register
87
97
88
98
The `/vehicles` registration endpoint is used to register a vehicle for use in the Agency jurisdiction.
89
99
@@ -120,6 +130,8 @@ _No content returned on success._
|`device_id`| UUID | Required | ID used in [Register](#vehicle-register)|
176
+
|`device_id`| UUID | Required | ID used in [Register](#vehicle---register)|
163
177
164
178
Body Params:
165
179
@@ -185,7 +199,9 @@ Body Params:
185
199
|`missing_param`| A required parameter is missing | Array of missing parameters |
186
200
|`unregistered`| Vehicle is not registered ||
187
201
188
-
## Vehicles - Telemetry
202
+
[Top][toc]
203
+
204
+
## Vehicle - Telemetry
189
205
190
206
The vehicle `/telemetry` endpoint allows a Provider to send vehicle telemetry data in a batch for any number of vehicles in the fleet.
191
207
@@ -214,13 +230,15 @@ Body Params:
214
230
|`invalid_data`| None of the provided data was valid. ||
215
231
|`missing_param`| A required parameter is missing. | Array of missing parameters |
216
232
233
+
[Top][toc]
234
+
217
235
## Telemetry Data
218
236
219
237
A standard point of vehicle telemetry. References to latitude and longitude imply coordinates encoded in the [WGS 84 (EPSG:4326)](https://en.wikipedia.org/wiki/World_Geodetic_System) standard GPS or GNSS projection expressed as [Decimal Degrees](https://en.wikipedia.org/wiki/Decimal_degrees).
220
238
221
239
| Field | Type | Required/Optional | Field Description |
|`device_id`| UUID | Required | ID used in [Register](#vehicle-register)|
241
+
|`device_id`| UUID | Required | ID used in [Register](#vehicle---register)|
224
242
|`timestamp`|[timestamp][ts]| Required | Date/time that event occurred. Based on GPS or GNSS clock |
225
243
|`gps`| Object | Required | Telemetry position data |
226
244
|`gps.lat`| Double | Required | Latitude of the location |
@@ -234,15 +252,34 @@ A standard point of vehicle telemetry. References to latitude and longitude impl
234
252
|`charge`| Float | Required if Applicable | Percent battery charge of vehicle, expressed between 0 and 1 |
235
253
|`stop_id`| UUID | Required if Applicable | Stop that the vehicle is currently located at. Only applicable for _docked_ Micromobility. See [Stops][stops]|
236
254
255
+
[Top][toc]
256
+
237
257
## Stops
238
258
239
-
The `/stops` endpoint allows an agency to register Stops.
259
+
The `/stops` endpoint allows an agency to register city-managed Stops, or a provider to register self-managed Stops.
|`stop_id`| UUID | Optional | If provided, retrieve the specified stop |
319
+
320
+
200 Success Response:
261
321
262
-
In the case that a `stop_id`query 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.
322
+
If `stop_id` is specified, `GET`will return an array with a single stop record, otherwise it will be a list of all stop records.
263
323
264
324
[Top][toc]
265
325
@@ -269,10 +329,10 @@ In the case that a `stop_id` query parameter is specified, the `stops` array ret
0 commit comments