이 API는 원하는 Tag들의 최소 시간값, 최대 시간값을 얻는 API이다.
HTTP Request
GET https://${CloudVendor}.${CountryCode}.machlake.com/lakes/${lake_id}/values/time_range 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 |
date_format | string | date format of select time | &date_format=YYYY-MM-DD HH24:MI:SS (default : YYYY-MM-DD HH24:MI:SS) |
separator | string | separator for tag_name, columns, and_condition | &separator=| (default : ,) |
value_return_form | int | result set format Optimized for various chart libraries and configured to return | 0 : separate standard (default) |
Request Example
GET https://aws1.us.machlake.com/lakes/xbacd1234/values/time_range?tag_name=tag_01,tag_02&value_return_form=0 Content-Type: application/json; charset=utf8 x-api-key: {API Key}
Response Example
Status 200 // return format = 0 { "status": "success", "data": { "columns": [ {"length": 4096, "name": "MIN", "type": 5}, {"length": 4096, "name": "MAX", "type": 5} ], "samples": [ { "tag_name": "tag_02", "data": [ { "MAX": "2021-07-06 12:12:27", "MIN": "2021-06-16 11:36:44" } ] }, { "tag_name": "tag_01", "data": [ { "MAX": "2021-07-06 12:12:25", "MIN": "2021-06-15 17:52:35" } ] } ] } } // return format = 1 { "status": "success", "data": { "columns": [ {"length": 4096, "name": "MIN", "type": 5}, {"length": 4096, "name": "MAX", "type": 5} ], "samples": [ { "tag_name": "tag_02", "data": { "MAX": ["2021-07-06 12:12:27"], "MIN": ["2021-06-16 11:36:44"] } }, { "tag_name": "tag_01", "data": { "MAX": ["2021-07-06 12:12:25"], "MIN": ["2021-06-15 17:52:35"] } } ] } }