Skip to content

Commit 503a5b2

Browse files
committed
add provider_id for telemetry
1 parent a9b6466 commit 503a5b2

2 files changed

Lines changed: 14 additions & 46 deletions

File tree

agency/README.md

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,9 @@ Method: `POST`
9090

9191
Body Params:
9292

93-
| Field | Type | Required/Optional | Field Description |
94-
| ------------ | ------- | ----------------- | -------------------------------------------------------------------- |
95-
| `device_id` | UUID | Required | Provided by Operator to uniquely identify a vehicle |
96-
| `vehicle_id` | String | Required | Vehicle Identification Number (vehicle_id) visible on vehicle |
97-
| `vehicle_type` | Enum | Required | [Vehicle Type][vehicle-types] |
98-
| `mode` | Enum | Required | [Mobility Mode][modes] |
99-
| `propulsion_types` | Enum[] | Required | Array of [Propulsion Type][propulsion-types]; allows multiple values |
100-
| `vehicle_attributes` | Conditionally Required | Array of [vehicle attributes](/modes/#vehicle-attributes) | Vehicle attributes appropriate for the current [mode][modes] |
101-
| `battery_capacity` | Integer | Required if Available | Capacity of battery expressed as milliamp hours (mAh) |
102-
| `fuel_capacity` | Integer | Required if Available | Capacity of fuel tank (liquid, solid, gaseous) expressed in liters |
103-
104-
201 Success Response:
93+
TODO a list of Vehicle records FIXME
94+
95+
200 Success Response:
10596

10697
_No content returned on success._
10798

@@ -120,36 +111,6 @@ _No content returned on success._
120111

121112
[Top][toc]
122113

123-
## Vehicle - Update
124-
125-
The `/vehicles` update endpoint is used to update some mutable aspect of a vehicle. For now, only `vehicle_id`.
126-
127-
Endpoint: `/vehicles/{device_id}`
128-
Method: `PUT`
129-
130-
Body Params:
131-
132-
| Field | Type | Required/Optional | Field Description |
133-
| ------------ | ------- | ----------------- | -------------------------------------------------------------------- |
134-
| `vehicle_id` | String | Required | License Plate (if present) or VIN visible on a vehicle |
135-
136-
200 Success Response:
137-
138-
_No content returned on success._
139-
140-
400 Failure Response:
141-
142-
| `error` | `error_description` | `error_details`[] |
143-
| -------------------- | ------------------------------------------------- | ------------------------------- |
144-
| `bad_param` | A validation error occurred. | Array of parameters with errors |
145-
| `missing_param` | A required parameter is missing. | Array of missing parameters |
146-
147-
404 Failure Response:
148-
149-
_No content returned if no vehicle matching `device_id` is found._
150-
151-
[Top][toc]
152-
153114
## Vehicles - Events
154115

155116
The vehicle `/events` endpoint allows the Provider to submit events describing the state changes of multiple vehicles.
@@ -225,10 +186,12 @@ The `/stops` endpoint allows an agency to register city-managed Stops, or a prov
225186
**[Beta feature][beta]:** Yes (as of 1.0.0). [Leave feedback](https://github.com/openmobilityfoundation/mobility-data-specification/issues/638)
226187
**Request Body**: An array of [Stops][stops]
227188

228-
201 Success Response:
189+
200 Success Response:
229190

230191
_No content returned on success._
231192

193+
(?) TODO FIXME resolve bulk return codes
194+
232195
400 Failure Response:
233196

234197
| `error` | `error_description` | `error_details`[] |

data-types.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ A vehicle record is as follows:
3535

3636
Note that the only mutable field is `vehicle_id`.
3737

38+
(?) Move `vehicle_id` into events?
39+
3840
[Top][toc]
3941

4042
### Propulsion Types
@@ -92,6 +94,7 @@ Events represent changes in vehicle status.
9294
| `device_id` | UUID | Required | A unique device ID in UUID format |
9395
| `provider_id` | UUID | Required | A UUID for the Provider, unique within MDS. See MDS [provider list](/providers.csv). |
9496
| `data_provider_id` | UUID | Optional | If different than `provider_id`, a UUID for the data solution provider managing the data feed in this endpoint. See MDS [provider list](/providers.csv) which includes both service operators and data solution providers. |
97+
| `event_id` | UUID | Required | A unique event ID |
9598
| `vehicle_id` | String | Required | A unique vehicle identifier (visible code, license plate, etc), visible on the vehicle itself |
9699
| `vehicle_state` | Enum | Required | See [vehicle state][vehicle-states] table |
97100
| `event_types` | Enum[] | Required | Vehicle [event types][vehicle-events] for state change, with allowable values determined by `vehicle_state` |
@@ -117,8 +120,10 @@ A standard point of vehicle telemetry. References to latitude and longitude impl
117120

118121
| Field | Type | Required/Optional | Field Description |
119122
| -------------- | -------------- | --------------------- | ------------------------------------------------------------ |
120-
| `telemetry_id` | UUID | Required | ID used for uniquely-identifying a Telemetry entry |
121123
| `device_id` | UUID | Required | ID used in [Register](#vehicle---register) |
124+
| `provider_id` | UUID | Required | A UUID for the Provider, unique within MDS. See MDS [provider list](/providers.csv). |
125+
| `data_provider_id` | UUID | Optional | If different than `provider_id`, a UUID for the data solution provider managing the data feed in this endpoint. See MDS [provider list](/providers.csv) which includes both service operators and data solution providers. |
126+
| `telemetry_id` | UUID | Required | ID used for uniquely-identifying a Telemetry entry |
122127
| `timestamp` | [Timestamp][ts]| Required | Date/time that event occurred. Based on GPS or GNSS clock |
123128
| `trip_ids` | UUID[] | Required | If telemetry occurred during a trip, the ID of the trip(s). If not in a trip, `null`.
124129
| `journey_id` | UUID | Required | If telemetry occurred during a trip, the ID of the journey. If not in a trip, `null`.
@@ -214,8 +219,8 @@ A Trip is defined by the following structure:
214219
| `fare_attributes` | Map | Optional | **[Mode](/modes#list-of-supported-modes) Specific**. [Fare attributes](/modes#fare-attributes) given as unordered key-value pairs |
215220
| `start_time` | [Timestamp][ts] | Required | Start of the passenger/driver trip |
216221
| `end_time` | [Timestamp][ts] | Required | End of the passenger/driver trip |
217-
| `start_location` | [Point](point) | Required | Location of the start of the trip. See also [Stop-based Geographic Data][stop-based-geo]. |
218-
| `end_location` | [Point](point) | Required | Location of the end of the trip. See also [Stop-based Geographic Data][stop-based-geo]. |
222+
| `start_location` | [GPS](gps) | Required | Location of the start of the trip. |
223+
| `end_location` | [GPS](gps) | Required | Location of the end of the trip. |
219224
| `publication_time` | [Timestamp][ts] | Optional | Date/time that trip became available through the trips endpoint |
220225
| `reservation_attributes` | [Reservation](#reservation-data) | Required if available | Reservation details, if a reservation initiated this trip
221226
| `accessibility_options` | Enum[] | Optional | The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. See [accessibility-options][accessibility-options] |

0 commit comments

Comments
 (0)