API Documentation

Reference for the NevoSens API Gateway — a proxy in front of your ThingsBoard tenant for devices, assets and telemetry.

How to Authenticate

Enter your credentials below to generate a token for this session.

This calls ThingsBoard directly from your browser and stores the token in localStorage (same key the Swagger UI portal uses), so once you generate a token here it's also active on the Swagger UI page. Nothing is sent to, or stored on, this server.

Programmatic Integration

To integrate with your own system, generate a token programmatically:

POST https://my.nevosens.se/api/auth/login

{
  "username": "email",
  "password": "password"
}

The response returns a token and a refreshToken. Use the token in every request:

Authorization: Bearer <token>

Refresh Token

When the token expires, refresh it without re-entering credentials:

POST https://my.nevosens.se/api/auth/token

{
  "refreshToken": "<refresh_token>"
}
Keep this in mind: store tokens securely — never expose them in logs or client-side code. A 401 Unauthorized response means your token expired — refresh it or re-authenticate.

Devices

Paginated list of devices with their configured server attributes and latest telemetry. Each element represents one physical sensor node — fields fall into three groups: identity, data (configuration), and latest_timeseries (most recent reading).

GET /api/v1/devices Bearer required

Query Parameters

NameTypeDefaultDescription
pageinteger0Page index, zero-based.
pageSizeinteger10Number of devices per page.
textSearchstring—Filter devices by name.

Response

{
  "devices": [
    {
      "name": "SiteA_RoofNorth_00012",
      "id": "d69753b0-12dd-11f1-ac42-df1689f61705",
      "label": "S02",
      "type": "NevoWeight",
      "data": {
        "utilizationWarningThreshold": 70,
        "utilizationCriticalThreshold": 90,
        "maxAllowableLoad": 500,
        "platformDiameter": 1.25,
        "postFunctionEnabled": true,
        "isInactive": 0
      },
      "latest_timeseries": {
        "utilization_weight": 215.5,
        "temperature": 22.8,
        "battery_percentage": 98
      }
    }
  ],
  "totalPages": 1,
  "totalElements": 1,
  "hasNext": false
}
{ "error": true, "message": "Unauthorized" }
{ "error": true, "message": "Internal Server Error" }

Response Fields

FieldTypeDescription
devices[]arrayList of devices matching the query.
devices[].namestringSystem device name, format <Site>_<Group>_<Serial>. The serial suffix falls in a range that hints at sensor type — see Reference.
devices[].idstring (uuid)Device identifier.
devices[].labelstringShort human-readable label, if set. Prefix hints at type by convention (S/X/L), e.g. S02, L01.
devices[].typestringDevice type — the authoritative field; do not infer type from name/label. See Reference.
devices[].dataobjectServer attributes configured for this tenant — field-by-field breakdown in Reference.
devices[].latest_timeseriesobjectMost recent value of each configured telemetry key — see Reference for the full key list.
totalPagesintegerTotal number of pages available.
totalElementsintegerTotal number of devices matching the query.
hasNextbooleanWhether another page of results exists.

Assets

Paginated list of assets (e.g. buildings) with their configured server attributes.

GET /api/v1/assets Bearer required

Query Parameters

NameTypeDefaultDescription
pageinteger0Page index, zero-based.
pageSizeinteger10Number of assets per page.
textSearchstring—Filter assets by name.

Response

{
  "assets": [
    {
      "name": "Head Office",
      "id": "78cc2230-2c17-11f1-8007-53608c543452",
      "type": "property",
      "data": {
        "latitude": 59.3293,
        "longitude": 18.0686
      }
    }
  ],
  "totalPages": 1,
  "totalElements": 1,
  "hasNext": false
}
{ "error": true, "message": "Unauthorized" }
{ "error": true, "message": "Internal Server Error" }

Response Fields

FieldTypeDescription
assets[]arrayList of assets matching the query.
assets[].namestringAsset name (falls back to the ThingsBoard label if one is set).
assets[].idstring (uuid)Asset identifier.
assets[].typestringAsset type, e.g. property. Additional asset types may be added in the future.
assets[].dataobjectServer attributes configured for this tenant — field-by-field breakdown in Reference.
totalPagesintegerTotal number of pages available.
totalElementsintegerTotal number of assets matching the query.
hasNextbooleanWhether another page of results exists.

Timeseries

Time-range telemetry for a single device, mapped to the configured response keys.

GET /api/v1/device/timeseries Bearer required

Query Parameters

NameTypeDefaultDescription
deviceIdrequiredstring—Device UUID.
keysstringall configured keysComma-separated telemetry keys. See Reference for the full list.
startTsintegerone week agoStart timestamp in milliseconds.
endTsintegernowEnd timestamp in milliseconds.
intervalinteger—Aggregation interval in ms. Only applies when agg isn't NONE.
limitinteger1000Maximum number of records.
aggenumNONENONE, AVG, MIN, MAX, SUM, COUNT

Response

{
  "utilization_weight": [ { "ts": 1781249000000, "value": 215.5 } ],
  "temperature": [ { "ts": 1781249000000, "value": 22.8 } ],
  "battery_percentage": [ { "ts": 1781249000000, "value": 98 } ]
}
{ "error": true, "message": "deviceId is required" }
{ "error": true, "message": "Unauthorized" }
{ "error": true, "message": "Internal Server Error" }

Response Fields

FieldTypeDescription
<key>arrayOne property per requested telemetry key (e.g. utilization_weight), each holding its list of timestamped values.
<key>[].tsintegerTimestamp in epoch milliseconds.
<key>[].valuenumberTelemetry value recorded at that timestamp.

Reference

Device types, asset types, and the telemetry keys available for each. Pick a topic from the sidebar.

Timeseries Keys

Keys currently available across configured devices — usable in the keys parameter of the Timeseries endpoint, and returned in each device's latest_timeseries. See Device Fields below for which device type each key applies to.

KeyValue type
utilization_weightnumber (%)
distributed_weightnumber (kg/m²)
utilization_distancenumber (%)
utilization_distanceXnumber (%)
deflectionnumber (mm)
temperaturenumber (°C)
humiditynumber (%)
battery_percentagenumber (%)
signal_strengthstring (enum: Excellent, Good, Moderate, Poor)

Device Types

Available device types today — more may be added in the future.

  • NevoWeight
  • NevoDef
  • NevoDefX

By convention, a device's name is formatted <Site>_<Group>_<Serial>, and its numeric serial suffix falls in one of the ranges below; its label is a short prefix + number in the matching convention (e.g. S02, L01):

Suffix rangeLabel prefixTypeSensorMeasuresReports as
00001–00040 S NevoWeight Snow Sensor Load on a platform Utilization % — utilization_weight; raw kg/m² — distributed_weight
00041–00050 X NevoDefX Angle Sensor Inclination / tilt Utilization % — utilization_distanceX; raw mm — deflection
00051–00070 L NevoDef Laser Sensor Distance Utilization % — utilization_distance; raw mm — deflection

Angle and Laser sensors both measure deflection: Laser sensors report deflection utilization in utilization_distance, Angle sensors report the equivalent value in utilization_distanceX — both as a percentage of maxAllowableDeflection. The raw deflection reading in millimeters is reported separately as deflection.

The naming convention is informational only. A device's name/label suffix and prefix follow the pattern above, but they do not define its type — always read the type field from the API response (NevoWeight, NevoDef, or NevoDefX) to determine what a device actually is. Future device types are not guaranteed to follow this naming convention at all.

Device Fields

Every field configured for devices — both data (configuration) and latest_timeseries (measurements) — with which device type each is meant for.

FieldKindTypeDescriptionNevoWeightNevoDefNevoDefX
isInactivedataint (0/1)Device state. 0 = active, 1 = inactive/disabled.✓✓✓
utilizationWarningThresholddatanumber (%)Utilization level at which the device enters a warning state.✓✓✓
utilizationCriticalThresholddatanumber (%)Utilization level at which the device enters a critical state.✓✓✓
postFunctionEnableddataboolWhether server-side post-processing of the raw signal is enabled.✓✓✓
maxAllowableLoaddatanumber (kg/m²)Maximum permissible distributed load. Denominator for utilization_weight.✓✕✕
platformDiameterdatanumber (m)Diameter of the load-sensing platform, used to convert measured weight to distributed load per area.✓✕✕
maxAllowableDeflectiondatanumber (mm)Maximum permissible deflection. Denominator for utilization_distance / utilization_distanceX.✕✓✓
temperaturetimeseriesnumber (°C)Ambient temperature at the device.✓✓✓
humiditytimeseriesnumber (%)Relative humidity. Devices without a humidity element report 0.✓✓✓
battery_percentagetimeseriesnumber (%)Remaining battery charge.✓✓✓
signal_strengthtimeseriesstring (enum)Qualitative connectivity rating: Excellent, Good, Moderate, Poor.✓✓✓
utilization_weighttimeseriesnumber (%)Measured load as a percentage of maxAllowableLoad. Compared against the warning/critical thresholds.✓✕✕
distributed_weighttimeseriesnumber (kg/m²)Measured load distributed over the platform area.✓✕✕
utilization_distancetimeseriesnumber (%)Measured deflection as a percentage of maxAllowableDeflection. Compared against the warning/critical thresholds.✕✓✕
utilization_distanceXtimeseriesnumber (%)Angle equivalent of utilization_distance.✕✕✓
deflectiontimeseriesnumber (mm)Measured deflection from the reference position.✕✓✓

Every field is queried for every device; a field only appears in the response if that specific device has a value set for it in ThingsBoard. The type columns above reflect which device type each field is intended for, not an enforced filter.

Asset Fields

FieldKindTypeproperty
latitudedatafloat✓
longitudedatafloat✓

property is the only asset type defined today — this table will grow as additional asset types are added.