Create vehicle details in bulk

post

/fleetMonitoring/clientapi/v2/vehicles

This operation creates vehicles in bulk by accepting the list of vehicles in a file stream. The list of vehicles is provided in CSV format as follows:

Format for the CSV file:
registrationNumber, vehicleIdentificationNumber,deviceId,vehicleType,year,name

Example:
VEHREG1234,VIN1234,Device1234,VEHICLETYPE1,2017,VEHNAME1234

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

Successfully processed.

401 Response

Unauthorized. The request requires user authentication.

406 Response

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

Examples

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/fleetMonitoring/clientapi/v2/vehicles

Example of Response Body

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

{
"totalEntries": 2,
"createdEntries": [
{
"rowNo": 1,
"id": "898CC9F1-D345-43BA-9069-998811605498",
"name": "veh8776",
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/898CC9F1-D345-43BA-9069-998811605498",
"rel": "self"
}
]
},
{
"rowNo": 2,
"id": "E5295FBA-ADD1-4837-B41C-7F0C7FCE6CE2",
"name": "veh8777",
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/E5295FBA-ADD1-4837-B41C-7F0C7FCE6CE2",
"rel": "self"
}
]
}
],
"updatedEntries": [],
"errorEntries": [],
"failedEntries": [],
"links": [
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/",
"rel": "self"
},
{
"href": "https://iotserver:443/fleetMonitoring/clientapi/v2/vehicles/",
"rel": "canonical"
}
]
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/fleetMonitoring/clientapi/v2/vehicles



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