IoT Stadium

API Documentation

Graph

Graph - POST Graph Telemetry List

Post

{{url_iot_backend}}/ext/devices/:deviceId/history-telemetry
    {
      "key": "Content-Type",
      "value": "application/json"
    },
    {
      "key": "Authorization",
      "value": "Bearer {{token}}"
    }

Parameter

Field Type Description
deviceID Integer

The device ID of selected graph

{
    "message": "success",
    "code": 200,
    "data": {
        "widgets": [
            {
                "telemetry_key": "Distance_8dbe1356-aa20-448e-9d8a-7c58c680815f",
                "data_source_id": 27406035,
                "key_raw": null,
                "key_wording": null,
                "friendly_name": "",
                "unit": "",
                "data": [
                    {
                        "times": "2024-06-07T08:00:00Z",
                        "val": 1.22
                    }
                ]
            }
        ],
        "total": 1,
        "page": 1,
        "total_page": 1
    }
}
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "last_time",
            "message": "The last time field is required when time start / time end is not present."
        },
        {
            "field": "time_start",
            "message": "The time start field is required when last time is not present."
        },
        {
            "field": "time_end",
            "message": "The time end field is required when last time is not present."
        }
    ]
}                                                
{
    "message": "Not Allowed",
    "error": {
        "message": "Not Allowed",
        "field": "user"
    },
    "code": 403
}