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 : Vehicle_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
-
devices:
object devices
Additional Properties Allowed: additionalPropertiesList of vehicle parameters available e.g On Board Diagnostics 2 (OBD2).
-
driverId:
string
Driver ID
-
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
-
metricResultMap:
object MetricMap_receive
-
model:
string
vehicle model
-
name:
string
vehicle Name
-
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
-
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 : MetricMap_receive
Type:
Show Source
object
-
metricResults:
array metricResults
The metric result lists of an entity.
Nested Schema : Metric_receive
Type:
Show Source
object
-
booleanValue:
boolean
Property description was not set
-
computedTime:
integer
Property description was not set
-
confidenceLevel:
integer
Property description was not set
-
entityId:
string
Property description was not set
-
entityType:
string
Property description was not set
-
eventTime:
integer
Property description was not set
-
eventTimeAsString:
string
Property description was not set
-
geoLocationValue:
object GeoPosition_receive
-
id:
string
Property description was not set
-
interval:
string
One of [CURRENT, EVERY2MINUTE, HOURLY, DAILY, NEXT24HOURS, WEEKLY, NEXT7DAYS, NEXT30DAYS].
-
lastKnown:
boolean
Property description was not set
-
name:
string
Property description was not set
-
numericValue:
integer
Property description was not set
-
params:
object params
Additional Properties Allowed: additionalPropertiesProperty description was not set
-
stringValue:
string
Property description was not set
-
type:
string
One of [KPI, PREDICTION, ANOMALY, SENSOR].
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 : params
Type:
object
Additional Properties Allowed
Show Source
-
string
A map of the following type: Map<String, String>
Property description was not set
Show Source
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:
{
"items": [
{
"id": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"name": "VEHNAME1",
"make": "VEHMAKE1234",
"model": "VEHMODEL1234",
"year": 2017,
"status": "UNKNOWN",
"vin": "vin1",
"registrationNumber": "VEHREG2",
"driverId": "BD17C92B-AE92-439B-AB25-D0A1ADFD471A",
"tripId": "EF712496-6451-42E4-A844-1E7814EA9764",
"devices": {
"deviceId": "D44CD5E7-E893-4A98-AC9A-89C67E16B521"
},
"registrationTime": 1519035093179,
"registrationTimeAsString": "2018-02-19T10:11:33.179Z",
"lastModifiedTime": 1519035093179,
"lastModifiedTimeAsString": "2018-02-19T10:11:33.179Z",
"lastModifiedBy": "system",
"metricResults": [
{
"id": "1c4196cb-a8f9-39f8-95b9-2e2af265f7d2",
"name": "sys_openOutageIncidents",
"entityType": "vehicles",
"eventTime": 1519032117819,
"computedTime": 1519032117819,
"eventTimeAsString": "2018-02-19T09:21:57Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
},
{
"id": "171bd431-7566-3414-ad41-315c46507fbf",
"name": "sys_utilizationStatus",
"entityType": "vehicles",
"eventTime": 1519033034320,
"computedTime": 1519033034320,
"eventTimeAsString": "2018-02-19T09:37:14Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"booleanValue": true
}
],
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/drivers/BD17C92B-AE92-439B-AB25-D0A1ADFD471A",
"rel": "driver"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/trips/EF712496-6451-42E4-A844-1E7814EA9764",
"rel": "trip"
}
]
},
{
"id": "212E10CB-6EB0-4549-A223-DEF1E6898E33",
"name": "VEHNAME2",
"make": "VEHMAKE1234",
"model": "VEHMODEL1234",
"year": 2017,
"status": "UNKNOWN",
"vin": "Vin1",
"registrationNumber": "VEHREG1",
"devices": {
"deviceId": "1D8F639B-B9B4-411B-BE5D-EB9D0FC6DF0E"
},
"registrationTime": 1519035093180,
"registrationTimeAsString": "2018-02-19T10:11:33.180Z",
"lastModifiedTime": 1519035093180,
"lastModifiedTimeAsString": "2018-02-19T10:11:33.180Z",
"lastModifiedBy": "iot",
"metricResults": [
{
"id": "1c4196cb-a8f9-39f8-95b9-2e2af265f7d2",
"name": "sys_openOutageIncidents",
"entityType": "vehicles",
"eventTime": 1519032117568,
"computedTime": 1519032117568,
"eventTimeAsString": "2018-02-19T09:21:57Z",
"interval": "CURRENT",
"entityId": "212E10CB-6EB0-4549-A223-DEF1E6898E33",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
},
{
"id": "e2668020-3b1f-3b61-8e9b-23d43fa65234",
"name": "sys_averageFuelEconomy",
"entityType": "vehicles",
"eventTime": 1519034306194,
"computedTime": 1519034306194,
"eventTimeAsString": "2018-02-19T09:58:26Z",
"interval": "CURRENT",
"entityId": "212E10CB-6EB0-4549-A223-DEF1E6898E33",
"type": "KPI",
"lastKnown": false,
"numericValue": 127.5
},
{
"id": "b8a4acfe-af6a-3821-8301-9432328fd8d0",
"name": "sys_alerts",
"entityType": "vehicles",
"eventTime": 1519032117568,
"computedTime": 1519032117568,
"eventTimeAsString": "2018-02-19T09:21:57Z",
"interval": "CURRENT",
"entityId": "212E10CB-6EB0-4549-A223-DEF1E6898E33",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
}
]
}
],
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicles?offset=0&limit=10&q=%7B%20%22$or%22%20:%20[%7B%22registeredBy%22:%20%7B%20%22$exists%22:false%20%7D%20%7D,%7B%22registeredBy%22:%20%7B%20%22$ne%22:%22OIOTFMSYS%22%20%7D%20%7D]%20%7D",
"rel": "self"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicles",
"rel": "canonical"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicles?q=%7B%20%22$or%22%20:%20[%7B%22registeredBy%22:%20%7B%20%22$exists%22:false%20%7D%20%7D,%7B%22registeredBy%22:%20%7B%20%22$ne%22:%22OIOTFMSYS%22%20%7D%20%7D]%20%7D&offset=0&limit=10",
"rel": "first"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicles?q=%7B%20%22$or%22%20:%20[%7B%22registeredBy%22:%20%7B%20%22$exists%22:false%20%7D%20%7D,%7B%22registeredBy%22:%20%7B%20%22$ne%22:%22OIOTFMSYS%22%20%7D%20%7D]%20%7D&offset=0&limit=10",
"rel": "last"
}
],
"offset": 0,
"limit": 10,
"count": 2,
"hasMore": false
}
Complete cURL Example
The following example shows a complete cURL command that you can use 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.