Skip to content

GET /plants

GET
/plants

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",
"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 /plants/count

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

GET
/plants/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",
"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 /plants/{id}

GET
/plants/{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",
"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 /plants/{id}/divisions

GET
/plants/{id}/divisions

Queries divisions of Plant.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

filter
Typestring

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 /plants/{id}/divisions/count

GET
/plants/{id}/divisions/count

Counts divisions of Plant.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

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 /plants/{id}/divisions/{fk}

GET
/plants/{id}/divisions/{fk}

Find a related item by id for divisions.

Parameters

Path Parameters

fk*

Foreign key for divisions

Typestring
Required
id*

PersistedModel id

Typestring
Required

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 /plants/{id}/employeeManagers

GET
/plants/{id}/employeeManagers

Queries employeeManagers of Plant.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

filter
Typestring

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 /plants/{id}/employeeManagers/count

GET
/plants/{id}/employeeManagers/count

Counts employeeManagers of Plant.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

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 /plants/{id}/employeeManagers/{fk}

GET
/plants/{id}/employeeManagers/{fk}

Find a related item by id for employeeManagers.

Parameters

Path Parameters

fk*

Foreign key for employeeManagers

Typestring
Required
id*

PersistedModel id

Typestring
Required

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

GET
/plants/{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 /plants/{id}/plantAddressDetails

GET
/plants/{id}/plantAddressDetails

Fetches hasOne relation plantAddressDetails.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"streetAddress": "string",
"city": "string",
"state": "string",
"zipcode": "string",
"id": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

GET /plants/{id}/plantRegion

GET
/plants/{id}/plantRegion

Fetches belongsTo relation plantRegion.

Parameters

Path Parameters

id*

PersistedModel id

Typestring
Required

Query Parameters

refresh
Typeboolean

Responses

Request was successful

application/json
JSON
{
"name": "string",
"description": "string",
"id": "string",
"companyId": "string",
"plantIds": [
"string"
],
"createdAt": "string",
"updatedAt": "string"
}

Playground

Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python