This API gets the result by rotating the output data in Row format in Column format.
This API gets the result by rotating the output data in Row format in Column format.
GET https://${CloudVendor}.${CountryCode}.machlake.com/v1/lakes/${lake_id}/values Content-Type: application/json; charset=utf8 x-api-key: {API Key} |
Optional | Type | Description | Example |
---|---|---|---|
type | string | select type | &type=pivot |
tag_name | string | tag name with , separator | &tag_name=tag1,tag2,tag3 |
calc_mode | string | min,max,cnt,avg,sum | &calc_mode=min (default : avg) |
date_format | string | date format of select time | &date_format=YYYY-MM-DD HH24:MI:SS (default : YYYY-MM-DD HH24:MI:SS) |
start_time | string | start time of select (MUST be less than end_time!) type 1 : time string format
type 2 : timestamp (second or millisecond)
| &start_time=2018-01-16 14:40:05 000
|
end_time | string | end time of select (MUST be more than start_time!)
| same as start_time |
interval_type | string | sec,min,hour,day (or s,m,h,d) | &interval_type=hour (default : sec) |
interval_value | int | duration value | &interval_value=10 (default : 1) |
limit | int | count of display | &limit=1000 (default : Restricted by 'lake tier' by lake tier) |
offset | int | count of skip | &offset=500 |
direction | int | ascend or descent by time | &direction=0 |
GET https://aws1.us.machlake.com/v1/lakes/xbacd1234/values?type=pivot&tag_name=tag01&calc_mode=avg&date_format=YYYY-MM-DD HH24:MI:SS&start_time=2021-06-16 11:35:00&end_time=2021-07-06 12:12:28&interval_type=min&limit=1000 Content-Type: application/json; charset=utf8 x-api-key: {API Key} |
Status 200 { "success": true, "reason": "success", "data": { "columns": [ { "name": "TIME", "type": 5, "length": 4096 }, { "name": "tag01", "type": 20, "length": 17 } ], "rows": [ [ "2023-01-03 10:12:00", 1625.333 ], [ "2023-01-03 10:12:05", 1622.5 ] ] } } |
|
|
|
|