flespi Assets API

Assets are virtual entities in flespi that represent physical objects or resources that can be monitored by different tracking devices over time. An asset maintains a historical record of its associations with devices, enabling seamless aggregation of telemetry data even when the monitoring device changes. Key features: * Can be linked with one or multiple devices sequentially * Automatically tracks intervals of device associations * Maintains history of which device was linked to the asset at any given time * Can be assigned to calculators to provide access to this history from their expressions * Facilitates transition from device-centric to asset-centric data architecture The primary advantage of assets is their ability to maintain continuous monitoring history regardless of device changes. For example, a trailer asset can aggregate trip data from different trucks that pulled it, driver asset can aggregate trip data from different assigned devices or a vehicle asset can combine telemetry from both its main GPS tracker and a backup beacon device. ###### Asset intervals Asset can be assigned to the specific device on a certain temporal interval by creating corresponding interval using **POST /gw/assets/{assets.selector}/intervals** call. When assignment to the interval is registered, asset automatically merges this assignment into all previously registered intervals and update or delete them accordingly. At certain cases it can even split previously registered intervals onto new smaller parts. Asset maintain a history of such assignments which can be retrieved with **GET /gw/assets/{assets.selector}/intervals**. Each asset interval contains these properties: * **timestamp** - interval registration timestamp; * **begin** - interval begin time; * **end** - interval ending time, may be zero to indicate this interval as unlimited; * **device_id** - device ID connected to this interval, zero device ID is possible and can be interpreted in your application as unassignment; * **meta** - any custom data connected to this interval, maximum 8 KiB of JSON size allowed; Once new asset interval is registered the system automatically in real-time recalculates current intervals and issue interval create, update or delete events to maintain uninterrupted and actual timeline of interval assignments. Such events are published into asset logs and additionally you may track them via MQTT in the corresponding real-time only topics: * **flespi/interval/gw/assets/{asset_id}/created** - asset interval was created; * **flespi/interval/gw/assets/{asset_id}/updated** - asset interval was updated; * **flespi/interval/gw/assets/{asset_id}/deleted** - asset interval was deleted; Last interval registered into the asset is automatically published into retain topic **flespi/state/gw/assets/{asset_id}/last**. You can subscribe to this topic to stay current with the latest device to asset assignment. Interval that is registered into the asset and is active according to current time is automatically published into retain topic **flespi/state/gw/assets/{asset_id}/active**. You can subscribe to this topic to stay current with the currently active device to asset assignment. When active interval is finished MQTT message with null payload is published in the topic. Messages posted in asset MQTT topics contain 'trace' user property which you may use to link actual interval modification event with REST API call that was responsible for it. There is no possibility to delete interval assignment once it is registered but it is possible to replace it with a new interval with zero device_id which your application can correspondingly interpret. When retrieving intervals you may even skip such intervals by using `device_id != 0` filter. ###### Asset logs Table with the list of existing log event codes (event_code property in log record) for asset: Event code | Description -----|------ 1|asset was created via REST API 2|asset was updated via REST API 3|asset was deleted via REST API 4|asset was removed from account(moved to account) 5|asset was restored from recycle bin via REST API 20|asset was blocked, see [customer](/docs/#/platform/customer) for more information 21|asset was unblocked, see [customer](/docs/#/platform/customer) for more information 1600|asset was added to calculator 1601|asset was removed from calculator 1602|asset was added to group 1603|asset was removed from group 1604|posted asset interval registration 1605|asset interval was created 1606|asset interval was updated 1607|asset interval was deleted

GitHub OpenAPI

Operations 17

POST /assets Create new asset #
DELETE /assets/{assets.selector} Delete selected assets #
GET /assets/{assets.selector} List available assets #
PATCH /assets/{assets.selector} Patch item properties #
PUT /assets/{assets.selector} Modify asset properties #
GET /assets/{assets.selector}/intervals List asset intervals #
POST /assets/{assets.selector}/intervals Register asset intervals #
GET /assets/{assets.selector}/logs Retrieve asset logs #
GET /assets/{assets.selector}/logs/calculate Calculate intervals from asset logs #
POST /assets/{assets.selector}/logs/calculate Calculate intervals from asset logs #
DELETE /calcs/{calcs.selector}/assets/{calc.assets.selector} Unassign assets from calc #
GET /calcs/{calcs.selector}/assets/{calc.assets.selector} Retrieve assets in calc #
POST /calcs/{calcs.selector}/assets/{calc.assets.selector} Assign assets to calc #
PUT /calcs/{calcs.selector}/assets/{calc.assets.selector} Modify asset data for calc #
DELETE /groups/{groups.selector}/assets/{group.assets.selector} Unassign assets from group #
GET /groups/{groups.selector}/assets/{group.assets.selector} Retrieve assets in group #
POST /groups/{groups.selector}/assets/{group.assets.selector} Assign assets to group #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/flespi:flespi-assets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

flespi-assets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'This API (full-stack API for telematics devices) provides methods to create and manage the following instances of the flespi telematics hub that jointly provide the end-to-end communication between the GPS trackers and your target application:

    * **channels** - inbound protocol-specific pipes where the raw data from the trackers get parsed and saved in the unified JSON format in the buffer for further consumption.

    * **devices** - virtual representations of the physical trackers on the flespi platform. Allow organizing messages storage by device (ident), remote device configuration, dedicated long-term storage, video telematics functionality, access to telemetry and much more.

    * **streams** - outbound data flows preformatted to forward the telematics data to specific target platforms (e.g. Google Pub/Sub, Amazon AWS IoT, Microsoft Azure IoT, and more).

    * **calculators** - sets of rules for detecting intervals and computing the associated values for them; integral prt of the flespi analytics engine.

    * **plugins** - allow extending the standard set of device parameters with additional ones required by specific platforms or applications, including copy of message into other devices, cancelling message registration and even enriching message parameters from your system via webhook.

    * **modems** - instance connecting the flespi platform with an SMS service provider for sending configurational text messages to change device settings.

    * **protocols** - access to the list of protocols, device types, available message parameters and commands.


    To identify each REST request flespi token has to be passed in the HTTP call via the header: **Authorization: FlespiToken XXXXXXXXXX**.

    The limit of URI component is 64 KiB.

    A request fails with 503 Service Unavailable when the server sends no response data for 300 seconds.


    All changes to the gateway items are recorded in the common logs subsystem.'
  title: flespi Telematics Hub REST Assets API
  version: '1.0'
servers:
- url: https://flespi.io/gw
- url: http://flespi.io/gw
tags:


# --- truncated at 32 KB (140 KB total) ---
# Full source: https://artifacts.apis.io/flespi/openapi/flespi-assets-api-openapi.yml