Retrieve Vehicle Type by ID

get

/fleetMonitoring/clientapi/v2/vehicleTypes/{type-id}

This operation returns the information about a vehicle type specified by its ID.

Request

Path Parameters
Query Parameters
  • The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
  • The comma-separated list of fields to be shown in response. By default all response object fields will be present.
Header Parameters
  • 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
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : VehicleType_receive
Type: object
Show Source
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
Nested Schema : years
Type: array
Range of years for the vehicle type.
Show Source
Nested Schema : VehicleAttributes_receive
Type: object
Show Source
Nested Schema : allowedValues
Type: array
Allowed values for the attribute.
Show Source
Nested Schema : items
Type: object

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.

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.
Back to Top

Examples

curl -X GET 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes/{type-id}

Example of Response Body

The following example shows the content of the response body in JSON format:

{
"id": "2F29B565-D2A4-4922-AE40-ED6A3E1F5E8B",
"name": "Test_Vehicle_Type",
"description": "Vehicle Type Description",
"make": "Vehicle_Type_Make",
"model": "Vehicle_Type_Model",
"years": [
2015,
2016,
2017
],
"registrationTimeAsString": "2018-04-16T07:58:16.186Z",
"lastModifiedTimeAsString": "2018-04-16T07:58:16.186Z",
"attributes": [
{
"name": "TestAttribute_Custom",
"dataType": "STRING",
"allowedValues": [
"Value_1",
"Value_2"
],
"defaultValue": "Value_1",
"required": true,
"unique": false,
"type": "CUSTOM"
},
{
"name": "TestAttribute_Sensor",
"dataType": "NUMBER",
"deviceModel": "urn:com:oracle:iot:device:obd2",
"required": false,
"unique": false,
"messageFormatField": "ora_obd2_vehicle_speed",
"type": "SENSOR"
}
],
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes/2F29B565-D2A4-4922-AE40-ED6A3E1F5E8B",
"rel": "self"
},
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/vehicleTypes/2F29B565-D2A4-4922-AE40-ED6A3E1F5E8B",
"rel": "canonical"
}
],
"icon": {
"links": [
{
"href": "https://iotserver/fleetMonitoring/clientapi/v2/binary/6A10144B-37FC-45B5-BD6F-070142944B50.image.jpeg",
"rel": "self"
}
]
}
}



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/6c523b3c73f8-6425



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.
Back to Top