List trips
get
/fleetMonitoring/clientapi/v2/trips
This operation returns the list of all the trips existing for the current Oracle IoT Fleet Monitoring Application instance.
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 trips' list.
-
q(optional): string
Query to filter trips on the app. (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 : TripImpl_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
-
alertCount:
integer
Number of alerts
-
consumedFuelCost:
number
Consumed fuel cost for the Trip
-
destination:
object TripStopRecord_receive
-
distanceTraveled:
number
Distance travelled for the Trip
-
driverId:
string
ID of the driver associated with the trip
-
elapsedDuration:
integer
Duration of the trip till now (second)
-
endTime:
integer
Trip end time (millisecond)
-
estimatedDelay:
integer
Returns the estimated delay in Seconds
-
eta:
integer
ETA Time (millisecond)
-
expectedDuration:
integer
Expected duration of the Trip (second)
-
fenceViolationCount:
integer
Number of instances of Fence violation
-
fuelConsumed:
number
Fuel consumed for the trip
-
geoLocation:
object GeoPosition_receive
-
id:
string
Trip ID
-
idlingDurationViolationCount:
integer
Number of IdlingDuration violations
-
incidentCount:
integer
Number of incidents
-
lastModifiedTime:
integer
Last modified time (millisecond)
-
name:
string
Trip name
-
percentageComplete:
number
Percentage of the Trip completed
-
source:
object TripStopRecord_receive
-
speedViolationCount:
integer
Number of instances of Speed violation
-
startTime:
integer
Trip start time (millisecond)
-
stops:
array stops
List of stops for the trip
-
stopsClassification:
string
One of [SINGLE_STOP, DUAL_STOP, TRIPLE_STOP, MULTI_STOP, NON_STOP].
-
totalStopDuration:
integer
Total duration of Stop Time (second)
-
totalStops:
integer
Total stops for the trip
-
tripContext:
array tripContext
List of Trip Context for the trip
-
tripLength:
number
Total length of the Trip
-
tripLengthClassification:
string
One of [SHORT, MEDIUM, LONG].
-
tripStatus:
string
One of [IN_PROGRESS, COMPLETED, CANCELLED].
-
tripTemplateId:
string
ID of the tripTemplate associated with the trip
-
tripTrackingStatus:
string
One of [ON_TIME, DELAYED].
-
unauthorizedStopsCount:
integer
Number of instances of Unauthorized stops
-
vehicle:
object TripVehicleInfoModel_receive
-
vehicleId:
string
ID of the vehicle associated with this trip
Nested Schema : TripStopRecord_receive
Type:
Show Source
object
-
address:
string
Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.
-
arrivalTime:
integer
Trip arrival time (millisecond)
-
city:
string
Name of City
-
country:
string
Name of country
-
departureTime:
integer
Trip departure time (millisecond)
-
distanceToNextStop:
number
Estimated distance to next stop
-
estimatedArrivalTime:
integer
Estimated arrival time (millisecond)
-
estimatedDepartureTime:
integer
Estimated departure time (millisecond)
-
estimatedTimeToNextStop:
integer
Estimated time it will take to reach next stop (second)
-
expectedDurationFromStart:
integer
Expected duration to reach from Start to this Stop (second)
-
geoLocation:
object GeoPosition_receive
-
plannedArrivalTime:
integer
Planned Trip arrival time (in millisecond)
-
plannedDepartureTime:
integer
Planned Trip departure time (in millisecond)
-
postalCode:
string
Postal/Zip code
-
state:
string
Name of State
-
stopDurationInSeconds:
integer
Stop duration in seconds
-
stopSequence:
integer
Property description was not set
-
stopType:
string
The reason for stopping
-
street:
string
Name of Street
-
timeZone:
string
Time zone of the time fields
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 : TripVehicleInfoModel_receive
Type:
Show Source
object
-
id:
string
vehicle ID
-
name:
string
vehicle name
-
registrationNumber:
string
vehicle registration number
Nested Schema : TripModel$TripContext_receive
Type:
Show Source
object
-
externalId:
string
The ID of the shipment in the external system, in case of connected systems
-
name:
string
Trip Context name
-
type:
string
Trip Context type either Shipment or default trip
-
value:
string
Trip Context Id, either Trip or Shipment Id
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.
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
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":[
{
"lastModifiedTime":1469184297746,
"tripTrackingStatus":"One of [ON_TIME, DELAYED].",
"totalStops":12345,
"destination":{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
},
"stopsClassification":"One of [SINGLE_STOP, DUAL_STOP, TRIPLE_STOP, MULTI_STOP, NON_STOP].",
"source":{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
},
"unauthorizedStopsCount":12345,
"idlingDurationViolationCount":12345,
"vehicle":{
"registrationNumber":"vehicle registration number",
"name":"vehicle name",
"id":"40dc4359159d-1b07"
},
"totalStopDuration":12345,
"tripContext":[
{
"name":"Trip Context name",
"externalId":"1fad5d1f1d04-3fda",
"type":"Trip Context type either Shipment or default trip",
"value":"Trip Context Id, either Trip or Shipment Id"
}
],
"speedViolationCount":12345,
"eta":12345,
"fuelConsumed":0.0,
"tripLengthClassification":"One of [SHORT, MEDIUM, LONG].",
"startTime":1469184297746,
"id":"672f5e3770b8-1d1f",
"vehicleId":"50d63a6f1dc-11d2",
"consumedFuelCost":0.0,
"distanceTraveled":0.0,
"tripLength":0.0,
"incidentCount":12345,
"expectedDuration":12345,
"estimatedDelay":12345,
"fenceViolationCount":12345,
"tripTemplateId":"51a85621763-1f69",
"driverId":"2989311553a4-6b30",
"geoLocation":[longitude,latitude],
"alertCount":12345,
"percentageComplete":0.0,
"name":"Trip name",
"stops":[
{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
}
],
"endTime":1469184297746,
"tripStatus":"One of [IN_PROGRESS, COMPLETED, CANCELLED].",
"elapsedDuration":12345
},
{
"lastModifiedTime":1469184297746,
"tripTrackingStatus":"One of [ON_TIME, DELAYED].",
"totalStops":12345,
"destination":{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
},
"stopsClassification":"One of [SINGLE_STOP, DUAL_STOP, TRIPLE_STOP, MULTI_STOP, NON_STOP].",
"source":{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
},
"unauthorizedStopsCount":12345,
"idlingDurationViolationCount":12345,
"vehicle":{
"registrationNumber":"vehicle registration number",
"name":"vehicle name",
"id":"3f92a912b87-419d"
},
"totalStopDuration":12345,
"tripContext":[
{
"name":"Trip Context name",
"externalId":"b663ae71855-6055",
"type":"Trip Context type either Shipment or default trip",
"value":"Trip Context Id, either Trip or Shipment Id"
}
],
"speedViolationCount":12345,
"eta":12345,
"fuelConsumed":0.0,
"tripLengthClassification":"One of [SHORT, MEDIUM, LONG].",
"startTime":1469184297746,
"id":"2b13abb298a-408",
"vehicleId":"64af1dad47b4-7f57",
"consumedFuelCost":0.0,
"distanceTraveled":0.0,
"tripLength":0.0,
"incidentCount":12345,
"expectedDuration":12345,
"estimatedDelay":12345,
"fenceViolationCount":12345,
"tripTemplateId":"48832bd13d79-1a53",
"driverId":"281b26026aec-3801",
"geoLocation":[longitude,latitude],
"alertCount":12345,
"percentageComplete":0.0,
"name":"Trip name",
"stops":[
{
"departureTime":1469184297746,
"stopDurationInSeconds":12345,
"distanceToNextStop":0.0,
"country":"Name of country",
"stopSequence":12345,
"address":"Unified full address, e.g. 110 Scottsville Center::Scottsville::VA::US::24590 . Must be provided if geoLocation is not specified.",
"city":"Name of City",
"plannedArrivalTime":1469184297746,
"postalCode":"Postal/Zip code",
"expectedDurationFromStart":12345,
"timeZone":"Time zone of the time fields",
"plannedDepartureTime":1469184297746,
"stopType":"The reason for stopping",
"estimatedTimeToNextStop":1469184297746,
"estimatedDepartureTime":1469184297746,
"geoLocation":[longitude,latitude],
"arrivalTime":1469184297746,
"street":"Name of Street",
"state":"Name of State",
"estimatedArrivalTime":1469184297746
}
],
"endTime":1469184297746,
"tripStatus":"One of [IN_PROGRESS, COMPLETED, CANCELLED].",
"elapsedDuration":12345
}
]
}
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/trips
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
.