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
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,20 +20,28 @@ This specification contains a collection of RESTful APIs used to specify the dig
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.
@@ -83,6 +91,8 @@ A vehicle record is as follows:
83
91
84
92
_No content returned on vehicle not found._
85
93
94
+
[Top][toc]
95
+
86
96
## Vehicle - Register
87
97
88
98
The `/vehicles` registration endpoint is used to register a vehicle for use in the Agency jurisdiction.
@@ -120,6 +130,8 @@ _No content returned on success._
|`already_registered`| A vehicle with `device_id` is already registered ||
122
132
133
+
[Top][toc]
134
+
123
135
## Vehicle - Update
124
136
125
137
The `/vehicles` update endpoint is used to update some mutable aspect of a vehicle. For now, only `vehicle_id`.
@@ -148,6 +160,8 @@ _No content returned on success._
148
160
149
161
_No content returned if no vehicle matching `device_id` is found._
150
162
163
+
[Top][toc]
164
+
151
165
## Vehicle - Event
152
166
153
167
The vehicle `/event` endpoint allows the Provider to control the state of the vehicle including deregister a vehicle from the fleet.
@@ -185,6 +199,8 @@ Body Params:
185
199
|`missing_param`| A required parameter is missing | Array of missing parameters |
186
200
|`unregistered`| Vehicle is not registered ||
187
201
202
+
[Top][toc]
203
+
188
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.
@@ -214,6 +230,8 @@ 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).
@@ -234,6 +252,8 @@ 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
259
The `/stops` endpoint allows an agency to register city-managed Stops, or a provider to register self-managed Stops.
0 commit comments