Fleet - Safety

Safety report

A safety report is an overview of safety driving and events.

This API can get event and trip summaries and the trend type of 4 types of events:

  • Sensor Event
  • AI(ADAS) Event
  • Traffic sign
  • AI(DMS) Event
Securityapi key and Authorization
Request
query Parameters
since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

tz
string

When grouping information by date, you may prefer not to use the UTC+0 time zone. Using the 'tz' parameter allows for grouping dates based on the specified time zone.

Responses
200

OK

get/V2/analytics/safety
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "summary": {
    },
  • "trend": [
    ]
}

Event list

This API is used to get and query event list within time period.

Securityapi key and Authorization
Request
query Parameters
sort
string

The field to sort

available fields are:

time

Example: sort=time
keyword
string

Query the trip with keywords, which apply with driver name or asset id

type
string

The types to querying with, and should separate with a comma

Example: type=1,4,22
order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
offset
integer <int32>
Default: 0

For pagination offset

limit
integer <int32>
Default: 5

For pagination limit

since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

Responses
200

OK

get/V2/events
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "count": 0,
  • "data": [
    ]
}

Event detail

This API is used to get the detail information of event

Securityapi key and Authorization
Request
query Parameters
ticket
required
string
Responses
200

OK

get/V2/event/detailV2
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": [
    ]
}

Video asset details

This API is used to get the video asset details information of event

Securityapi key and Authorization
Request
Request Body schema: multipart/form-data
ticket
required
string
Responses
200

OK

post/V2/event/GetVideoDetail
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

List of manual upload

This API is used to get event videos that upload manually.

The list contains:

device CID, event name, event expiration status, left days to expired, latitude and longitude of the event, device, event recording video ID, tag info, trip ID

Securityapi key and Authorization
Request
query Parameters
sort
string

The field to sort

available fields are:

uploadDate

Example: sort=uploadDate
keyword
string

Query with keywords, which apply with file name or asset id

type
string

The types to querying with, and should seprate with a comma

Example: type=27,28,29
order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
offset
integer <int32>
Default: 0

For pagination offset

limit
integer <int32>
Default: 5

For pagination limit

since
required
integer <int32>

Query items after the timestamp(Unix timestamp)

until
required
integer <int32>

Query items before the timestamp(Unix timestamp)

Responses
200

OK

get/V2/event/StorageList
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "count": 0,
  • "data": [
    ]
}

Request to upload a video clip

This API can send a remote command to request the device to upload a video clip asynchronously, regardless of whether the device is online or not when the request is made.
The response includes a task ID that allows you to check the result with V2/event/taskResult/{taskId} later.

This feature was introduced from region 43.
The device won't respond to the remote command before the version of region 43.

Securityapi key and Authorization
Request
path Parameters
sn
required
string

serial number or cid(certificate id)

Request Body schema:
required
cam_id
required
string non-empty

The cameria id, please refer to Camera capture mode and Camera ID

Additionally, you can set cam_id to 'ALL' to upload all video clips corresponding to the target_timestamp parameter.

Upload all video clips at once requires Cam app version 1.2.21.3-REL_20240701_1455 or higher.

Upload all video clips at once requires region R44 or higher.

file_name
required
string non-empty

The desired file name to save as

target_timestamp
required
integer <int32>

The desired timestamp to include in the video clip

duration_in_seconds
integer or null <int32> [ 6 .. 60 ]

Duration of the video
duration_in_seconds will be processed into an even number, then evenly divided into two parts centered around target_timestamp.

Responses
200

OK

post/V2/event/videoClip/{sn}
Request samples
{
  • "cam_id": "string",
  • "file_name": "string",
  • "target_timestamp": 0,
  • "duration_in_seconds": 6
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Get task process history

This API allowing you to query the process result of a remote task like

  1. request to upload a video clip
Securityapi key and Authorization
Request
path Parameters
taskId
required
string
Responses
200

OK

get/V2/event/taskResult/{taskId}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

To discard an event

This API can discard an event.

Deleting the event will not update the score for that specific trip; instead, it will be reflected in the driver's overall driving score as a positive adjustment.
Please note that this action is irreversible.

Securityapi key and Authorization
Request
Request Body schema: multipart/form-data
ticket
required
string
Responses
200

OK

post/V2/event/discard