This API is used to query the list of meters created in Fracttal. This API allows you to filter to get only the meters you need: by asset code and/or by meter serial.
To get the meters that belong to a specific asset, you need to send the parameter "code" (asset code).
To get the information of a specific meter, it is necessary to send the parameters "code" (asset code) and "serial" (meter serial).
EndPoint
https://app.fracttal.com/api/meters_list/:code
Parameters Input
Parameter | Field type | Required | Description |
code | Text | Optional | Code of the asset associated with the meter. |
serial | Text | Optional | Serial of the meter to be consulted. |
start | int | Optional | Field used to make the pagination of records. It is the number where the paging starts. By default it is 0 |
limit | int | Optional | Number of records (items) you want the API to return. Default is 100 (cannot be higher than this value). |
Output parameters
Parameter | Field type | Description |
description | text | Meter Description |
serial | Text | Meter Serial |
is_counter | Text | Value that tells you if the meter is a counter type. |
counter_offset_value | Text | Accumulated Value |
counter_value | Text | Current meter value |
last_data | Text | Information about the last reading added to the meter: "date": date, "value": value, "accumulated_value": accumulated value |
monthly_average_data | Text | Monthly average value |
units_description | Text | Description of the meter unit |
units_code | Text | Meter Unit Code |
items_description | Text | Description of the asset to which the meter belongs |
parent_description | Text | Location to which the asset belongs |
monthly_average_auto | Boolean | Value indicating whether the monthly average will be calculated by the system or manually entered by the user |
min_value | Number | Minimum meter value |
max_value | Number | Maximum meter value |
code | Text | Asset code |
Example:
Example Request:
https://app.fracttal.com/api/meters_list/?code=12345&serial=4789
Example Response:
{
"success": true,
"message": "200",
"data": [
{
"description": " LEVEL SENSOR ",
"serial": "12345",
"is_counter": false,
"counter_offset_value": 0,
"counter_value": 2100,
"last_data": {
"date": "2017-06-07T02:00:00+00:00",
"value": 2100,
"accumulated_value": 2100
},
"monthly_average_data": 1,
"units_description": "Celcius",
"units_code": "C",
"items_description": "Mental Health { ITEM-001 }",
"parent_description": "\/\/ Cl\u00ednica Universidad de los Andes\/ ",
"monthly_average_auto": false,
"min_value": 2050,
"max_value": 2100,
"code": "ITEM-001",
"id_company": 69
}
],
"total": 1
}