/
Get time range for a single tag
Get time range for a single tag
[ 1 HTTP Request ] [ 1.1 Parameters ] [ 2 Request Example ] [ 3 Response Example ] [ 4 Sample Code ]
원하는 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의 이름. 여러개를 명시하려면 ',' 문자를 이용하여 나열할 수 있다. | &tag_name=tag1,tag2,tag3 |
date_format | string | Time값의 포멧 지정 DATE_FORMAT 혹은 timestamp 단위 ("SECOND", "MILLISECOND", "MICROSECOND", "NANOSECOND") | &date_format=YYYY-MM-DD HH24:MI:SS (default : YYYY-MM-DD HH24:MI:SS) |
separator | string | 매개변수의 tag_name, columns, and_condition들을 구분하는 구분자 | &separator=| (default : ,) |
value_return_form | int | 결과 출력 방법 차트 라이브러리에서 입력받는 방식에 따라 변경하여 사용함 | 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"]
}
}
]
}
}
Sample Code
레이블 추가
Related content
Raw Value Select
Raw Value Select
More like this
Statistics of Tag values
Statistics of Tag values
More like this
Current Value Select
Current Value Select
More like this
Pivoted Value Select
Pivoted Value Select
More like this
Calculated Tag Value Delete
Calculated Tag Value Delete
More like this
Single Tag Value Delete
Single Tag Value Delete
More like this