원하는 Tag의 통계정보를 얻는 API이다.
HTTP Request
GET https://${CloudVendor}.${CountryCode}.machlake.com/lakes/${lake_id}/values/stat Content-Type: application/json; charset=utf8 x-api-key: {API Key}
Parameters
Optional | Type | Description | Example |
---|---|---|---|
tag_name | String | tag name with , separator | &tag_name=tag1,tag2,tag3 |
separator | string | separator for tag_name, columns, and_condition | &separator= |
value_return_form | int | result set format | 0 : separate standard (default) or 1 : merged standard |
date_format | string | date format of select time or timestamp type ("SECOND", "MILLISECOND", "MICROSECOND", "NANOSECOND") | &date_format=YYYY-MM-DD HH24:MI:SS or &date_format=MILLISECOND (default : YYYY-MM-DD HH24:MI:SS) |
offset | int | count of skip | &offset=500 |
limit | int | count of display | &limit=1000 (default : Restricted by 'lake tier' by lake tier) |
Request Example
GET https://aws1.us.machlake.com/lakes/xbacd1234/values/stat?tag_name=tag01 Content-Type: application/json; charset=utf8 x-api-key: {API Key}
Response Example
Status 200 { "data": { "calc_mode": "raw", "columns": [ { "length": 20, "name": "ROW_COUNT", "type": 112 }, { "length": 17, "name": "MIN_VALUE", "type": 20 }, { "length": 17, "name": "MAX_VALUE", "type": 20 }, { "length": 4096, "name": "MIN_TIME", "type": 5 }, { "length": 4096, "name": "MAX_TIME", "type": 5 }, { "length": 4096, "name": "MIN_VALUE_TIME", "type": 5 }, { "length": 4096, "name": "MAX_VALUE_TIME", "type": 5 }, { "length": 4096, "name": "RECENT_ROW_TIME", "type": 5 } ], "samples": [ { "data": [ { "MAX_TIME": "2022-04-15 10:14:58", "MAX_VALUE": 1625, "MAX_VALUE_TIME": "2022-04-13 10:12:00", "MIN_TIME": "2022-04-13 10:12:00", "MIN_VALUE": 1625, "MIN_VALUE_TIME": "2022-04-13 10:12:00", "RECENT_ROW_TIME": "2022-04-15 10:14:58", "ROW_COUNT": 270 } ], "tag_name": "tag01" } ] }, "status": "success" }
Name of Value | Value Description |
---|---|
MAX_TIME | Maximum time value among records of the tag |
MAX_VALUE | Maximum value among records in that tag |
MAX_VALUE_TIME | The time value of the record with the maximum value entered |
MIN_TIME | Minimum time value among records of that tag |
MIN_VALUE | Minimum value among records in that tag |
MIN_VALUE_TIME | The time value of the record with the minimum value entered |
RECENT_ROW_TIME | Time value of the most recently entered data |
ROW_COUNT | Number of records |