Skip to content

Generic

Generic Model Access.


Create

Endpoint

1
POST /generic/create

Authorized Role/Capability

1
anyone

JSON Body Fields

Field Type Required Notes
_type string yes Database model type
deviceId string Device ID owning the item
* any Optional item attributes to create

Response

Query Path

Field Type Notes
filter string Simple filter string to filter
next object Pagination token for the next page
prev object Pagination token for the previous page
limit number Number of items to retrieve. Defaults to 1.
where string Where clause to filter

Get

Get a data item from a database table.

Endpoint

1
POST /generic/get

Authorized Role/Capability

1
anyone

JSON Body Fields

Field Type Required Notes
_type string yes Database model type
deviceId string Device ID owning the item
* any Optional item attributes to filter the selected item

Response


Find

Find data items from a database table.

Endpoint

1
POST /generic/find

Authorized Role/Capability

1
anyone

JSON Body Fields

Field Type Required Notes
_type string yes Database model type
deviceId string Device ID owning the item
* any Optional item attributes to filter selected items

Response

An array of data items.

Query Path

Field Type Notes
filter string Simple filter string to filter
next object Pagination token for the next page
prev object Pagination token for the previous page
limit number Number of items to retrieve. Defaults to 1.
where string Where clause to filter

Remove

Remove a data item.

Endpoint

1
POST /generic/remove

Authorized Role/Capability

1
anyone

JSON Body Fields

Field Type Required Notes
_type string yes Database model type
deviceId string Device ID owning the item
* any Other item attributes sufficient to identify the item

Update

Update a data item.

Endpoint

1
POST /generic/update

Authorized Role/Capability

1
anyone

JSON Body Fields

Field Type Required Notes
_type string yes Database model type
deviceId string Device ID owning the item
* any Other item attributes sufficient to identify the item

Response

The updated data item.