Retrieve trip metrics by ID
get
/fleetMonitoring/clientapi/v2/trips/{id}/metrics
This operation returns the metrics of a trip specified by its trip ID.
Request
Path Parameters
-
id: string
ID of trip to get metrics from Oracle IoT Cloud Service.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
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/trips/{id}/metrics
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"metrics": {
"sys_elapsedDurationSeconds": {
"value": 1962,
"time": 1519034305570,
"timeAsString": "2018-02-19T09:58:25Z"
},
"sys_alerts": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_distanceTravelled": {
"value": 0,
"time": 1519034305570,
"timeAsString": "2018-02-19T09:58:25Z"
},
"sys_consumedFuelCost": {
"value": 0,
"time": 1519034305570,
"timeAsString": "2018-02-19T09:58:25Z"
},
"sys_fenceViolations": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_idlingViolations": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_percentComplete": {
"value": 0,
"time": 1519034305570,
"timeAsString": "2018-02-19T09:58:25Z"
},
"sys_speedViolations": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_etaTime": {
"value": 1519225019139,
"time": 1519034148621,
"timeAsString": "2018-02-19T09:55:48Z"
},
"sys_openIncidents": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_incidents": {
"value": 0,
"time": 1519032344220,
"timeAsString": "2018-02-19T09:25:44Z"
},
"sys_geoLocation": {
"value": "34.49378, -118.62244, 0.0",
"time": 1519033249068,
"timeAsString": "2018-02-19T09:40:49Z"
},
"sys_fuelConsumed": {
"value": 0,
"time": 1519034305570,
"timeAsString": "2018-02-19T09:58:25Z"
},
"sys_estimatedDelaySeconds": {
"value": 138333,
"time": 1519034148621,
"timeAsString": "2018-02-19T09:55:48Z"
}
}
}
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/trips/29936813480f-5a9e/metrics
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.