Retrieve vehicle by ID
get
/fleetMonitoring/clientapi/v2/vehicles/{id}
This operation returns information about a vehicle that is specified by its ID.
Request
Path Parameters
-
id: string
vehicle ID
Query Parameters
-
expand(optional): string
The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
-
fields(optional): string
The comma-separated list of fields to be shown in response. By default all response object fields will be present.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : VehicleImpl_receive
Type:
Show Source
object
-
availabilityStatus:
boolean
Availability status of the vehicle
-
averageFuelEconomy:
integer
Average fuel economy
-
consumedFuelCost:
integer
Consumed fuel cost
-
devices:
object devices
Additional Properties Allowed: additionalPropertiesList of vehicle parameters available e.g On Board Diagnostics 2 (OBD2).
-
driverId:
string
Driver ID
-
fuelConsumed:
integer
Fuel consumed
-
geoLocation:
object GeoPosition_receive
-
id:
string
vehicle ID
-
lastModifiedBy:
string
vehicle modified by
-
lastModifiedTime:
integer
vehicle last modified time (millisecond)
-
lastReportedTime:
integer
vehicle last reported time (millisecond)
-
make:
string
vehicle make
-
model:
string
vehicle model
-
name:
string
vehicle Name
-
openIncidents:
integer
vehicle incident count
-
openOutageIncidents:
integer
vehicle open outage incidents
-
registeredBy:
string
vehicle registered by
-
registrationNumber:
string
vehicle registration number
-
registrationTime:
integer
Time at which vehicle was registered (millisecond)
-
registrationTimeAsString:
string
vehicle registration time
-
status:
string
vehicle mobility status, One of [IN_MOTION, STOPPED, UNKNOWN].
-
tripId:
string
Trip Id
-
utilizationStatus:
boolean
Utilization status of the vehicle
-
vehicleIdlingDuration:
integer
vehicle Idling Duration in seconds
-
vin:
string
vehicle identification number
-
year:
integer
vehicle year
Nested Schema : devices
Type:
object
Additional Properties Allowed
Show Source
-
string
A map of the following type: Map<String, String>
List of vehicle parameters available e.g On Board Diagnostics 2 (OBD2).
Show Source
Nested Schema : GeoPosition_receive
Type:
Show Source
object
-
additionalElements:
array additionalElements
Property description was not set
-
altitude:
number
Property description was not set
-
latitude:
number
Property description was not set
-
longitude:
number
Property description was not set
-
valid:
boolean
Property description was not set
401 Response
Unauthorized. The request requires user authentication.
404 Response
Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
406 Response
Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/fleetMonitoring/clientapi/v2/vehicles/{id}
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"utilizationStatus":false,
"registrationTime":1469184297746,
"lastReportedTime":1469184297746,
"lastModifiedTime":1469184297746,
"registeredBy":"vehicle registered by",
"vehicleIdlingDuration":12345,
"year":12345,
"openOutageIncidents":12345,
"tripId":"5bd51a7a1649-5c7f",
"openIncidents":12345,
"fuelConsumed":12345,
"averageFuelEconomy":12345,
"model":"vehicle model",
"vin":"vehicle identification number",
"availabilityStatus":false,
"consumedFuelCost":12345,
"id":"2b10dc5372f-ef3",
"make":"vehicle make",
"devices":{
"devices_key1":"devices_value1",
"devices_key2":"devices_value2",
"devices_key3":"devices_value3"
},
"lastModifiedBy":"vehicle modified by",
"registrationTimeAsString":"2016-07-22T10:44:57.746Z",
"driverId":"7f72470d1afd-7927",
"geoLocation":[longitude,latitude],
"registrationNumber":"vehicle registration number",
"name":"vehicle Name",
"status":"vehicle mobility status, One of [IN_MOTION, STOPPED, UNKNOWN]."
}
Complete cURL Example
The following example shows the complete cURL command that can be used to perform the described operation:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/fleetMonitoring/clientapi/v2/vehicles/1b9d2f98213e-6085
Note that in the request,
https://iotserver
will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is
https://myinstance-myidentitydomain.iot.us.oraclecloud.com
and the default port is
443
.