/
Current Value Select
Current Value Select
[ 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/current
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) |
columns | string | 표시할 컬럼의 이름 | &columns=value,value2 (default : value) |
separator | string | 매개변수의 tag_name, columns, and_condition들을 구분하는 구분자 | &separator=| (default : ,) |
aliases | string | 별명으로 표시할 칼럼의 이름 | &aliases=myvalue,myvalu2 |
value_return_form | int | 결과 출력 방법 차트 라이브러리에서 입력받는 방식에 따라 변경하여 사용함 | 0 : separate standard (default) |
Request Example
GET https://aws1.us.machlake.com/lakes/xbacd1234/values/current?tag_name=tag_01,tag_02&columns=VALUE&aliases=MyVal&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": {
"calc_mode": "raw",
"columns": [
{"name": "TIME", "type": 5, "length": 4096},
{"name": "MyVal", "type": 20, "length": 17}
],
"samples": [
{
"tag_name": "tag_02",
"data": [{"MyVal": 1629,"TIME": "2021-07-06 12:12:27"}]
},
{
"tag_name": "tag_01",
"data": [{"MyVal": 1625,"TIME": "2021-07-06 12:12:25"}]
}
]
}
}
// return format = 1
{
"status": "success",
"data": {
"calc_mode": "raw",
"columns": [
{"name": "TIME", "type": 5, "length": 4096},
{"name": "MyVal", "type": 20, "length": 17}
],
"samples": [
{
"tag_name": "tag_02",
"data": {
"MyVal": [1629],
"TIME": ["2021-07-06 12:12:27"]
}
},
{
"tag_name": "tag_01",
"data": {
"MyVal": [1625],
"TIME": ["2021-07-06 12:12:25"]
}
}
]
}
}
Sample Code
Related content
Raw Value Select
Raw Value Select
More like this
Calculated Value Select
Calculated Value Select
More like this
Pivoted Value Select
Pivoted Value Select
More like this
List Tag
More like this
Statistics of Tag values
Statistics of Tag values
Read with this
Create Lake
Create Lake
More like this