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 : Vehicle_receive
Type:
Show Source
object
-
id:
string
vehicle ID
-
name:
string
vehicle name
-
registrationNumber:
string
vehicle registration number
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:
{
"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": 1519035105102,
"registrationTimeAsString": "2018-02-19T10:11:45.102Z",
"lastModifiedTime": 1519035105102,
"lastModifiedTimeAsString": "2018-02-19T10:11:45.102Z",
"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": "42ca2644-b5d8-3974-ab8e-46b1e2376778",
"name": "sys_idlingDuration",
"entityType": "vehicles",
"eventTime": 1519034305692,
"computedTime": 1519034305692,
"eventTimeAsString": "2018-02-19T09:58:25Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
},
{
"id": "e5a72ae7-c8c1-3a28-ba24-45f7f2b2729e",
"name": "sys_geoLocation",
"entityType": "vehicles",
"eventTime": 1519033248603,
"computedTime": 1519033248603,
"eventTimeAsString": "2018-02-19T09:40:48Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"stringValue": "34.49378, -118.62244, 0.0",
"geoLocationValue": [
-118.62244,
34.49378
]
},
{
"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
},
{
"id": "a6d176fe-a283-3c74-aae2-7c759dfeb44a",
"name": "sys_consumedFuelCost",
"entityType": "vehicles",
"eventTime": 1519034305692,
"computedTime": 1519034305692,
"eventTimeAsString": "2018-02-19T09:58:25Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
},
{
"id": "eb8916d6-b2d5-31a8-9fc0-e83fff45799c",
"name": "sys_fuelConsumed",
"entityType": "vehicles",
"eventTime": 1519034305692,
"computedTime": 1519034305692,
"eventTimeAsString": "2018-02-19T09:58:25Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"numericValue": 0
},
{
"id": "b8a4acfe-af6a-3821-8301-9432328fd8d0",
"name": "sys_alerts",
"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": "2176b6b7-e8b6-397c-8cbb-6218a24e738d",
"name": "sys_availabilityStatus",
"entityType": "vehicles",
"eventTime": 1519032117819,
"computedTime": 1519032117819,
"eventTimeAsString": "2018-02-19T09:21:57Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"booleanValue": true
},
{
"id": "2b381dff-66b2-314b-9c43-5ec1d559d1db",
"name": "sys_openIncidents",
"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": "e2668020-3b1f-3b61-8e9b-23d43fa65234",
"name": "sys_averageFuelEconomy",
"entityType": "vehicles",
"eventTime": 1519034305692,
"computedTime": 1519034305692,
"eventTimeAsString": "2018-02-19T09:58:25Z",
"interval": "CURRENT",
"entityId": "FE2F1A64-3D07-43EA-AEC3-7989D9231D20",
"type": "KPI",
"lastKnown": false,
"numericValue": 127.5
}
],
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/FE2F1A64-3D07-43EA-AEC3-7989D9231D20/",
"rel": "self"
},
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/FE2F1A64-3D07-43EA-AEC3-7989D9231D20/",
"rel": "canonical"
},
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/drivers/BD17C92B-AE92-439B-AB25-D0A1ADFD471A",
"rel": "driver"
},
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/trips/EF712496-6451-42E4-A844-1E7814EA9764",
"rel": "trip"
}
]
}
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/5c5d6e9d662a-77be
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.