Skip to content

Drivers

The Drivers API enables management of driver information, including creating, retrieving, updating, and deleting driver records.

Data Schema

Field Type Description
id integer Driver ID
name string Driver's name
uniqueId string Unique identifier for driver
attributes object Additional driver attributes

Fetch Drivers

Retrieves a list of drivers based on specified filters.

🛠 Endpoint:

GET /drivers

Authorization:

  • Requires Basic Authentication (basicAuth) or Cookie Authentication

Query Parameters:

Parameter Type Description
all boolean Fetch all drivers (admin/manager only)
userId integer Filter drivers by user ID
deviceId integer Filter drivers by device ID
groupId integer Filter drivers by group ID
refresh boolean Refresh drivers data

cURL Requests:

"Basic Auth"

curl -u username:password -X GET "https://itsochvts.com/api/drivers" \
-H "Content-Type: application/json"

"Cookie Auth"

curl -b "JSESSIONID=your_session_id" -X GET "https://itsochvts.com/api/drivers" \
-H "Content-Type: application/json"
200 OK - Response Body
[
  {
    "id": 0,
    "name": "string",
    "uniqueId": "string",
    "attributes": {}
  }
]

Create Driver

Creates a new driver record.

🛠 Endpoint:

POST /drivers

Authorization:

  • Requires Basic Authentication (basicAuth) or Cookie Authentication

cURL Requests:

"Basic Auth"

curl -u username:password -X POST "https://itsochvts.com/api/drivers" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","uniqueId":"JD001","attributes":{}}'

"Cookie Auth"

curl -b "JSESSIONID=your_session_id" -X POST "https://itsochvts.com/api/drivers" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","uniqueId":"JD001","attributes":{}}'

Request Body:

{
  "id": 0,
  "name": "string",
  "uniqueId": "string",
  "attributes": {}
}
200 OK - Response Body
{
  "id": 0,
  "name": "string",
  "uniqueId": "string",
  "attributes": {}
}

Update Driver

Updates an existing driver record.

🛠 Endpoint:

PUT /drivers/{id}

Authorization:

  • Requires Basic Authentication (basicAuth) or Cookie Authentication

Path Parameters:

Parameter Type Description
id integer ID of driver to update

Request Body:

{
  "id": 0,
  "name": "string",
  "uniqueId": "string",
  "attributes": {}
}

cURL Requests:

"Basic Auth"

curl -u username:password -X PUT "https://itsochvts.com/api/drivers/1" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","uniqueId":"JD001","attributes":{}}'

"Cookie Auth"

curl -b "JSESSIONID=your_session_id" -X PUT "https://itsochvts.com/api/drivers/1" \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","uniqueId":"JD001","attributes":{}}'
200 OK - Response Body
{
  "id": 0,
  "name": "string",
  "uniqueId": "string",
  "attributes": {}
}

Delete Driver

Deletes a driver record.

🛠 Endpoint:

DELETE /drivers/{id}

Authorization:

  • Requires Basic Authentication (basicAuth) or Cookie Authentication

Path Parameters:

Parameter Type Description
id integer ID of driver to delete

cURL Requests:

"Basic Auth"

curl -u username:password -X DELETE "https://itsochvts.com/api/drivers/1" \
-H "Content-Type: application/json"

"Cookie Auth"

curl -b "JSESSIONID=your_session_id" -X DELETE "https://itsochvts.com/api/drivers/1" \
-H "Content-Type: application/json"
204 No Content