List vehicles
get
/fleetMonitoring/clientapi/v2/vehicles
This operation returns the list of all vehicles.
Request
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.
-
limit(optional): integer
The maximum number of entries to return to the end user.
-
offset(optional): integer
The number that the first record of results is starting from.
-
orderBy(optional): string
Ordering criteria for the returned vehicles.
-
q(optional): string
Query to filter vehicles on the server. (For more information on mongoDB query parameters refer to Using mongoDB Query Syntax.)
-
since(optional): integer
The starting point of the desired time interval, in milliseconds. The default is 0.
-
totalResults(optional): boolean
The total number of results suiting the request.
-
until(optional): integer
The finishing point of the desired time interval, in milliseconds. The default is 0.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=collection
200 Response
Successfully processed.
Root Schema : VehicleImpl_receive_list
Type:
Show Source
object
-
count:
integer(int32)
-
hasMore:
boolean
-
items:
array items
-
limit:
integer(int32)
-
links:
array links
The set of API navigation links.
-
offset:
integer(int32)
Nested Schema : items
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
Nested Schema : items
Type:
Show Source
object
-
href:
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel:
string
Relation typeExample:
canonical
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
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"offset":0,
"count":2,
"limit":10,
"hasMore":false,
"links":[
{
"rel":"self",
"href":"https://iotserver/fleetMonitoring/clientapi/version/resource/path"
},
{
"rel":"canonical",
"href":"https://iotserver/fleetMonitoring/clientapi/version/resource/path"
}
],
"items":[
{
"utilizationStatus":false,
"registrationTime":1469184297746,
"lastReportedTime":1469184297746,
"lastModifiedTime":1469184297746,
"registeredBy":"vehicle registered by",
"vehicleIdlingDuration":12345,
"year":12345,
"openOutageIncidents":12345,
"tripId":"26073b742563-3be7",
"openIncidents":12345,
"fuelConsumed":12345,
"averageFuelEconomy":12345,
"model":"vehicle model",
"vin":"vehicle identification number",
"availabilityStatus":false,
"consumedFuelCost":12345,
"id":"20ff46e437e5-2d1d",
"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":"4ac46545109d-2467",
"geoLocation":[longitude,latitude],
"registrationNumber":"vehicle registration number",
"name":"vehicle Name",
"status":"vehicle mobility status, One of [IN_MOTION, STOPPED, UNKNOWN]."
},
{
"utilizationStatus":false,
"registrationTime":1469184297746,
"lastReportedTime":1469184297746,
"lastModifiedTime":1469184297746,
"registeredBy":"vehicle registered by",
"vehicleIdlingDuration":12345,
"year":12345,
"openOutageIncidents":12345,
"tripId":"43d4f1a7185-543f",
"openIncidents":12345,
"fuelConsumed":12345,
"averageFuelEconomy":12345,
"model":"vehicle model",
"vin":"vehicle identification number",
"availabilityStatus":false,
"consumedFuelCost":12345,
"id":"4e4a4ed07bc8-37b8",
"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":"19681b4f2ade-6e97",
"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
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
.