List Vehicle Types
get
/fleetMonitoring/clientapi/v2/vehicleTypes
This operation returns the list of all the vehicle types present in the current instance of the application.
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
Entity description is undefined
-
q(optional): string
Entity description is undefined (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.
Header Parameters
-
X-ORACLE-IOT-ORG(optional): string
To allow targeting requests to different organizations. The header value should contain the organization identifier(orgId). This header is optional, if not provided orgId will be ORA_DEFAULT_ORG
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : VehicleType_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
-
attributes:
array attributes
Attributes associated with this vehicle type. Attributes could be custom or sensor based
-
description:
string
Description about the vehicle type.
-
icon:
object icon
Binary object representing the vehicle type icon.
-
id:
string
Unique Identifier of vehicle type.
-
lastModifiedTimeAsString:
string
Modified time as string
-
make:
string
Make of the vehicle type.
-
model:
string
Model of the vehicle type.
-
name:
string
Name of the vehicle type. It must be unique.
-
registrationTimeAsString:
string
Registration time as string.
-
years:
array years
Range of years for the vehicle type.
Nested Schema : attributes
Type:
array
Attributes associated with this vehicle type. Attributes could be custom or sensor based
Show Source
Nested Schema : icon
Type:
object
Binary object representing the vehicle type icon.
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : VehicleAttributes_receive
Type:
Show Source
object
-
allowedValues:
array allowedValues
Allowed values for the attribute.
-
dataType:
string
Data type of the attribute. One of [STRING, NUMBER, BOOLEAN, DATE, BINARY].
-
deviceModel:
string
Device model URN for the message format field this attribute is mapped to. It is mandatory for the attribute of the type sensor.
-
instructions:
string
Instructions on how to fill the vehicle type attributes.
-
messageFormat:
string
Message format URN which the field is mapped. For attributes of SENSOR type this attribute is mandatory.
-
messageFormatField:
string
Message format field to which this attributes is mapped. For attributes of SENSOR type this is mandatory.
-
name:
string
Name of the attribute.
-
required:
boolean
Boolean value for whether the attribute if required or optional.
-
type:
string
Attribute Type. One of [CUSTOM, SENSOR].
-
unique:
boolean
Boolean value for whether the attribute is unique or not.
Nested Schema : items
Type:
object
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
401 Response
Unauthorized. The request requires user authentication.
403 Response
Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"items": [
{
"id": "A1BF9272-A87D-4D74-BAC2-3D4EB566D69E",
"name": "DefaultVehicleType",
"description": "",
"years": [],
"registrationTimeAsString": "2018-04-13T13:04:42.485Z",
"lastModifiedTimeAsString": "2018-04-13T13:04:42.485Z",
"attributes": [
{
"name": "Speed",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_vehicle_speed",
"type": "SENSOR"
},
{
"name": "EngineRPM",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_engine_rpm",
"type": "SENSOR"
},
{
"name": "NumberOfDTCS",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_number_of_dtcs",
"type": "SENSOR"
},
{
"name": "EngineCoolantTemp",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_engine_coolant_temperature",
"type": "SENSOR"
},
{
"name": "Odometer",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_true_odometer",
"type": "SENSOR"
}
],
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes/A1BF9272-A87D-4D74-BAC2-3D4EB566D69E",
"rel": "self"
}
]
}
],
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes?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/vehicleTypes",
"rel": "canonical"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes?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/vehicleTypes?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": 1,
"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/vehicleTypes
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.