Fleet - Fleet

Add fleet user

This API allows the fleet's admin to add a fleet user.

Securityapi key and Authorization
Request
Request Body schema:
email
required
string <email> non-empty

Email of user

first_name
required
string [ 1 .. 45 ] characters

First name of user

last_name
string or null [ 1 .. 45 ] characters

Last name of user

role
required
integer <int32> (FleetUserRole)

2 = Fleet_Admin

3 = Fleet_Operator

Enum: 2 3
accessable_fleet
Array of integers or null <int32>

List of accessable fleet IDs

This parameter only applies when the user's role is not Fleet_Admin.

Responses
200

OK

post/V2/fleet/user/add
Request samples
{
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "role": 2,
  • "accessable_fleet": [
    ]
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": "S00000",
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Get user list

This API can get the list of user.

Securityapi key and Authorization
Request
query Parameters
keyword
string or null

By querying the email and name with keyword,

it will return a list of users that match the search criteria.

role
Array of integers or null <int32>

Role of user

2 = Fleet_Admin

3 = Fleet_Viewer

7 = Fleet_Operator

status
Array of integers or null <int32>

Status of user

0 = pending

1 = active

2 = deactive

sort
string (UserListSortEnum)

Sort by what criteria

login

created

updated

name

Enum: "login" "created" "updated" "name"
order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
page
integer or null <int32>
Default: 1

Which page

page_size
integer or null <int32> [ 1 .. 20 ]
Default: 10

Maximum number per page

Responses
200

OK

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

Deactivate fleet user

This API allows the fleet's admin to deactivate any activated user except themselves.

Securityapi key and Authorization
Request
path Parameters
user_id
required
string
Responses
200

OK

post/V2/fleet/user/{user_id}/deactivate

Reactivate fleet user

This API allows the fleet's admin to reactivate any deactivated user except themselves.

Securityapi key and Authorization
Request
path Parameters
user_id
required
string
Responses
200

OK

post/V2/fleet/user/{user_id}/reactivate

Delete fleet user

This API allows the fleet's admin to detele any deactivated user except themselves.

Securityapi key and Authorization
Request
path Parameters
user_id
required
string
Responses
200

OK

post/V2/fleet/user/{user_id}/delete

Edit fleet user

This API allows the fleet's admin to edit any user except themselves.

All user data must be uploaded, and each upload will completely overwrite the previous data.

Securityapi key and Authorization
Request
path Parameters
user_id
required
string
Request Body schema:
email
required
string <email> non-empty

Email of user

first_name
required
string [ 1 .. 45 ] characters

First name of user

last_name
string or null [ 1 .. 45 ] characters

Last name of user

role
required
integer <int32> (FleetUserRole)

2 = Fleet_Admin

3 = Fleet_Operator

Enum: 2 3
accessable_fleet
Array of integers or null <int32>

List of accessable fleet IDs

This parameter only applies when the user's role is not Fleet_Admin.

Responses
200

OK

post/V2/fleet/user/{user_id}/edit
Request samples
{
  • "email": "user@example.com",
  • "first_name": "string",
  • "last_name": "string",
  • "role": 2,
  • "accessable_fleet": [
    ]
}

Add contract fleet

This API allows admin to add a contract fleet.

Securityapi key and Authorization
Request
Request Body schema: multipart/form-data
name
required
string

Name of fleet

countryCode
string

Country code of fleet

phoneNumber
string

Phone number of fleet

address
string

Address of fleet

notes
string

Notes of fleet

timezoneNotification
string

The timezone when the notification is received.
If not set, the default is UTC.

logo
string <byte>

Logo of fleet

Responses
200

OK

post/V2/fleet/add

Get contract fleet list

This API can get the list of contract fleets.

Securityapi key and Authorization
Request
query Parameters
keyword
string or null

By querying the fleet name with keyword,

it will return a list of fleets that match the search criteria.

sort
string (ContractFleetListSortEnum)

Sort by what criteria

updated

created

device_number

name

Enum: "updated" "created" "device_number" "name"
order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
page
integer or null <int32>
Default: 1

Which page

page_size
integer or null <int32> [ 1 .. 20 ]
Default: 10

Maximum number per page

Responses
200

OK

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

Get fleet detail

This API can get the detail of fleets.

Securityapi key and Authorization
Request
path Parameters
fleet_id
required
string
Responses
200

OK

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

Edit fleet

This API allows admin to edit information of fleet.

Only the parameters that are passed in will be updated.

Securityapi key and Authorization
Request
path Parameters
fleet_id
required
string
Request Body schema: multipart/form-data
logo
required
string <byte>

Logo of fleet

When the string 'delete' is received, the original logo will be deleted.

name
string

Name of fleet

countryCode
string

Country code of fleet

phoneNumber
string

Phone number of fleet

address
string

Address of fleet

notes
string

Notes of fleet

timezoneNotification
string

The timezone when the notification is received.
If not set, the default is UTC.

Responses
200

OK

post/V2/fleet/{fleet_id}/edit

Delete contract fleet

This API allows admin to delete a contract fleet.

Securityapi key and Authorization
Request
path Parameters
fleet_id
required
string
Responses
200

OK

post/V2/fleet/{fleet_id}/delete

Get fleet configuration

This API can get the configurations of the specified fleet.

Securityapi key and Authorization
Request
path Parameters
fleet_id
required
string
Responses
200

OK

get/V2/fleet/{fleet_id}/configurations
Response samples
application/json
{
  • "current": {
    },
  • "default": {
    },
  • "custom": {
    }
}

Update fleet configuration

This API can be used to modify the configuration of fleet,

All configuration data must be uploaded, and each upload will completely overwrite the previous data.

This configuration relies on dynamic JSON input.

Securityapi key and Authorization
Request
path Parameters
fleet_id
required
string
Request Body schema:
object (Liveview)
object (EventSetting)
Responses
200

OK

post/V2/fleet/{fleet_id}/configurations
Request samples
{
  • "liveview": {
    },
  • "event": {
    }
}

Get device list

This API can get the list of devices for fleet and all the contract fleets under it.

Securityapi key and Authorization
Request
query Parameters
keyword
string or null

By querying the serial number and name with keyword,

it will return a list of devices that match the search criteria.

model
Array of strings or null

Model of device

fleet_ids
Array of integers or null <int32>

ID of fleet

sort
string (DeviceListSortEnum)

Sort by what criteria

serial_number

activated_since

app_version

name

Enum: "serial_number" "activated_since" "app_version" "name"
order
string (Order)

Enum of order

ASC

DESC

Enum: "ASC" "DESC"
page
integer or null <int32>
Default: 1

Which page

page_size
integer or null <int32> [ 1 .. 20 ]
Default: 10

Maximum number per page

Responses
200

OK

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

Edit device's fleet

This API can edit the fleet assignment of one or more devices.

Securityapi key and Authorization
Request
Request Body schema:
fleet_id
required
integer <int32>

ID of fleet

devices
required
Array of strings non-empty

List of device's serial number

Responses
200

OK

post/V2/fleet/device/edit-fleet
Request samples
{
  • "fleet_id": 0,
  • "devices": [
    ]
}

Get available models

This API can get available models of devices under the user's fleet, including the contract fleets.

Securityapi key and Authorization
Responses
200

OK

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