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
+39-39Lines changed: 39 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ This specification contains a collection of RESTful APIs used to specify the dig
17
17
*[Vehicles](#vehicles)
18
18
*[Vehicle - Register](#vehicle---register)
19
19
*[Vehicle - Update](#vehicle---update)
20
-
*[Vehicles - Events](#vehicles---events)
21
-
*[Vehicles - Telemetry](#vehicles---telemetry)
22
20
*[Trips](#trips)
21
+
*[Telemetry](#telemetry)
22
+
*[Events](#events)
23
23
*[Stops](#stops)
24
24
*[Stops - Register](#stops---register)
25
25
*[Stops - Update](#stops---update)
@@ -100,17 +100,17 @@ _No content returned on vehicle not found._
100
100
101
101
[Top][toc]
102
102
103
-
## Vehicle - Register
103
+
###Vehicle - Register
104
104
105
105
The `/vehicles` registration endpoint is used to register vehicles for use in the Agency's jurisdiction.
106
106
107
107
**Endpoint**: `/vehicles`
108
108
**Method:**`POST`
109
-
**Payload:** An array of [Vehicles](#vehicle)
109
+
**Payload:** An array of [Vehicles](/data-types.md#vehicles)
110
110
111
111
200 Success Response:
112
112
113
-
See [Bulk Responses](#bulk-responses)
113
+
See [Bulk Responses][bulk-responses]
114
114
115
115
[Top][toc]
116
116
@@ -126,17 +126,17 @@ See [Bulk Responses](#bulk-responses)
126
126
127
127
**None**
128
128
129
-
## Vehicle - Update
129
+
###Vehicle - Update
130
130
131
131
The `/vehicles` update endpoint is used to change vehicle information, should some aspect of the vehicle change, such as the `vehicle_id`. Each vehicle must already be registered.
132
132
133
133
**Endpoint**: `/vehicles`
134
134
**Method:**`PUT`
135
-
**Payload:** An array of [Vehicles](#vehicle)
135
+
**Payload:** An array of [Vehicles](/data-types.md#vehicles)
136
136
137
137
200 Success Response:
138
138
139
-
See [Bulk Responses](#bulk-responses)
139
+
See [Bulk Responses][bulk-responses]
140
140
141
141
### Vehicle Update Error Codes:
142
142
@@ -147,39 +147,42 @@ See [Bulk Responses](#bulk-responses)
147
147
148
148
[Top][toc]
149
149
150
-
## Vehicles - Events
150
+
## Trips
151
151
152
-
The vehicle `/events` endpoint allows the Provider to submit events describing the state changes of multiple vehicles.
152
+
The Trips endpoint serves two purposes:
153
+
154
+
* Definitively indicating that a Trip (a sequence of events linked by a trip_id) has been completed. For example, from analyzing only the raw Vehicle Events feed, if a trip crosses an Agency's jurisdictional boundaries but does not end within the jurisdiction (last event_type seen is a `leave_jurisdiction`), this can result in a 'dangling trip'. The Trips endpoint satisfies this concern, by acting as a final indication that a trip has been finished, even if it ends outside of jurisdictional boundaries; if a trip has intersected an Agency's jurisdictional boundaries at all during a trip, it is expected that a Provider will send a Trip payload to the Agency following the trip's completion.
155
+
* Providing information to an Agency regarding an entire trip, without extending any of the Vehicle Event payloads, or changing any requirements on when Vehicle Events should be sent.
153
156
154
-
**Endpoint:**`/vehicles/events`
157
+
**Endpoint:**`/trips`
155
158
**Method:**`POST`
156
-
**Payload:**An array of [Vehicle Events](#vehicle-event)
159
+
**Payload:**Array of [Trips](/data-types.md#trips)
|`bad_param`| A validation error occurred| Array of parameters with errors |
170
+
|`missing_param`| A required parameter is missing| Array of missing parameters |
171
+
|`unregistered`| This `device_id` is unregistered||
169
172
170
173
[Top][toc]
171
174
172
-
## Vehicles - Telemetry
175
+
## Telemetry
173
176
174
177
The vehicle `/telemetry` endpoint allows a Provider to send vehicle telemetry data in a batch for any number of vehicles in the fleet.
175
178
176
-
**Endpoint**: `/vehicles/telemetry`
179
+
**Endpoint**: `/telemetry`
177
180
**Method**: `POST`
178
181
**Payload**: An array of [Vehicle Telemetry][vehicle-telemetry]
179
182
180
183
200 Success Response:
181
184
182
-
See [Bulk Responses](#bulk-responses)
185
+
See [Bulk Responses][bulk-responses]
183
186
184
187
### Telemetry Errors:
185
188
@@ -191,28 +194,25 @@ See [Bulk Responses](#bulk-responses)
191
194
192
195
[Top][toc]
193
196
194
-
## Trips
195
-
196
-
The Trips endpoint serves two purposes:
197
+
## Events
197
198
198
-
* Definitively indicating that a Trip (a sequence of events linked by a trip_id) has been completed. For example, from analyzing only the raw Vehicle Events feed, if a trip crosses an Agency's jurisdictional boundaries but does not end within the jurisdiction (last event_type seen is a `leave_jurisdiction`), this can result in a 'dangling trip'. The Trips endpoint satisfies this concern, by acting as a final indication that a trip has been finished, even if it ends outside of jurisdictional boundaries; if a trip has intersected an Agency's jurisdictional boundaries at all during a trip, it is expected that a Provider will send a Trip payload to the Agency following the trip's completion.
199
-
* Providing information to an Agency regarding an entire trip, without extending any of the Vehicle Event payloads, or changing any requirements on when Vehicle Events should be sent.
199
+
The vehicle `/events` endpoint allows the Provider to submit events describing the state changes of multiple vehicles.
200
200
201
-
**Endpoint:**`/trips`
201
+
**Endpoint:**`/events`
202
202
**Method:**`POST`
203
-
**Payload:**Array of [Trips](#trip-data)
203
+
**Payload:**An array of vehicle [Events](/data-types.md#events)
0 commit comments