Skip to content

GET /trucks

GET
/trucks

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
[
{
"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

GET /trucks/count

GET
/trucks/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 /trucks/findOne

GET
/trucks/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
{
"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

GET /trucks/{id}

GET
/trucks/{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
{
"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

GET /trucks/{id}/currentPlant

GET
/trucks/{id}/currentPlant

Fetches belongsTo relation currentPlant.

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 /trucks/{id}/device

GET
/trucks/{id}/device

Fetches hasOne relation device.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

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 /trucks/{id}/division

GET
/trucks/{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 /trucks/{id}/exists

GET
/trucks/{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 /trucks/{id}/plant

GET
/trucks/{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 /trucks/{id}/sensor

GET
/trucks/{id}/sensor

Fetches hasOne relation sensor.

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 /trucks/{id}/truckMetrics

GET
/trucks/{id}/truckMetrics

Fetches hasOne relation truckMetrics.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"course": 0,
"speed": 0,
"metricsDate": "string",
"id": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python