Skip to content

GET /devices

GET
/devices

Find all instances of the model matched by filter from the data source.

Parameters

Query Parameters

filter

Filter defining fields, where, include, order, offset, and limit

Typestring

Responses

Request was successful

application/json
JSON
[
{
"uniqueId": "string",
"pushId": "string",
"name": "string",
"type": "string",
"model": "string",
"appVersion": "string",
"phoneNumber": "string",
"active": true,
"features": {
},
"location": "string",
"locationData": {
},
"speed": 0,
"course": 0,
"metricsDate": "string",
"lastAccess": "string",
"id": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string",
"divisionId": "string",
"settingsDivisionId": "string",
"truckId": "string",
"plantId": "string",
"employeeId": "string",
"sensor": "string"
}
]

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/count

GET
/devices/count

Count instances of the model matched by where from the data source.

Parameters

Query Parameters

where

Criteria to match model instances

Typestring

Responses

Request was successful

application/json
JSON
{
"count": 0
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/findOne

GET
/devices/findOne

Find first instance of the model matched by filter from the data source.

Parameters

Query Parameters

filter

Filter defining fields, where, include, order, offset, and limit

Typestring

Responses

Request was successful

application/json
JSON
{
"uniqueId": "string",
"pushId": "string",
"name": "string",
"type": "string",
"model": "string",
"appVersion": "string",
"phoneNumber": "string",
"active": true,
"features": {
},
"location": "string",
"locationData": {
},
"speed": 0,
"course": 0,
"metricsDate": "string",
"lastAccess": "string",
"id": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string",
"divisionId": "string",
"settingsDivisionId": "string",
"truckId": "string",
"plantId": "string",
"employeeId": "string",
"sensor": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}

GET
/devices/{id}

Find a model instance by {{id}} from the data source.

Parameters

Path Parameters

id*

Model id

Typestring
Required

Query Parameters

filter

Filter defining fields and include

Typestring

Responses

Request was successful

application/json
JSON
{
"uniqueId": "string",
"pushId": "string",
"name": "string",
"type": "string",
"model": "string",
"appVersion": "string",
"phoneNumber": "string",
"active": true,
"features": {
},
"location": "string",
"locationData": {
},
"speed": 0,
"course": 0,
"metricsDate": "string",
"lastAccess": "string",
"id": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string",
"divisionId": "string",
"settingsDivisionId": "string",
"truckId": "string",
"plantId": "string",
"employeeId": "string",
"sensor": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/deviceSensor

GET
/devices/{id}/deviceSensor

Fetches hasOne relation deviceSensor.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"name": "string",
"lastAccess": "string",
"firmwareVersion": "string",
"id": "string",
"companyId": "string",
"truckId": "string",
"sensorFirmwareId": "string",
"createdAt": "string",
"updatedAt": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/division

GET
/devices/{id}/division

Fetches belongsTo relation division.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"name": "string",
"code": "string",
"externalId": "string",
"id": "string",
"parentId": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/employee

GET
/devices/{id}/employee

Fetches belongsTo relation employee.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"name": "string",
"number": "string",
"email": "string",
"phoneNumber": "string",
"type": "regular",
"clockInAllowedAt": "string",
"hireDate": "string",
"active": true,
"externalId": "string",
"receivesLateClockInNotifications": true,
"id": "string",
"companyId": "string",
"divisionId": "string",
"plantId": "string",
"truckId": "string",
"createdAt": "string",
"updatedAt": "string",
"typeId": "string",
"timeCategoryIds": [
"string"
],
"defaultTimeCategoryId": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/exists

GET
/devices/{id}/exists

Check whether a model instance exists in the data source.

Parameters

Path Parameters

id*

Model id

Typestring
Required

Responses

Request was successful

application/json
JSON
{
"exists": true
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/plant

GET
/devices/{id}/plant

Fetches belongsTo relation plant.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"number": "string",
"description": "string",
"address": "string",
"region": {
},
"location": "string",
"radius": 100,
"dvirEmails": [
"string"
],
"timeZone": "string",
"id": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string",
"plantRegionId": "string",
"addressDetails": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/settingsDivision

GET
/devices/{id}/settingsDivision

Fetches belongsTo relation settingsDivision.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"name": "string",
"code": "string",
"externalId": "string",
"id": "string",
"parentId": "string",
"companyId": "string",
"createdAt": "string",
"updatedAt": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /devices/{id}/truck

GET
/devices/{id}/truck

Fetches belongsTo relation truck.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"number": "string",
"description": "string",
"location": "string",
"locationData": {
},
"inService": false,
"inYard": false,
"deadhead": "string",
"endOfDay": false,
"lastAccess": "string",
"externalId": "string",
"id": "string",
"companyId": "string",
"divisionId": "string",
"createdAt": "string",
"updatedAt": "string",
"plantId": "string",
"currentPlantId": "string",
"metrics": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python