Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Current »

원하는 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의 이름. 여러개를 명시하려면 ',' 문자를 이용하여 나열할 수 있다.

&tag_name=tag1,tag2,tag3

separator

string

매개변수의 tag_name, columns, and_condition들을 구분하는 구분자

&separator=

value_return_form

int

결과 출력 방법
차트 라이브러리에서 입력받는 방식에 따라 변경하여 사용함

0 : separate standard (default) or 1 : merged standard

date_format

string

Time값의 포멧 지정 DATE_FORMAT 혹은 timestamp 단위("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

검색후 건너뛸 데이터의 수

&offset=500

limit

int

출력할 데이터의 수

&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

같은 tag값을 갖는 결과 중 가장 큰 시간값

MAX_VALUE

같은 tag값을 갖는 결과 중 가장 큰 값

MAX_VALUE_TIME

같은 tag값을 갖는 결과 중 가장 큰 값이 입력되었을 때의 시간값

MIN_TIME

같은 tag값을 갖는 결과 중 시간이 가장 작은 시간

MIN_VALUE

같은 tag값을 갖는 결과 중 가장 작은 값

MIN_VALUE_TIME

같은 tag값을 갖는 결과 중 가장 작은 값이 입력되었을 때의 시간값

RECENT_ROW_TIME

가장 최근에 입력된 시간 값

ROW_COUNT

레코드의 수

  • No labels