...
Paste code macro | ||||
---|---|---|---|---|
| ||||
GET https://${CloudVendor}.${CountryCode}.machlake.com/v1/lakes/${lake_id}/values/current Content-Type: application/json; charset=utf8 x-api-key: {API Key} |
...
Optional | Type | Description | Example |
---|---|---|---|
type | string | select type | &type=current |
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) |
columns | string | columns to filter out | &columns=value,value2 (default : value) |
separator | string | separator for tag_name, columns, and_condition | &separator=| (default : ,) |
aliases | string | columns to be aliased (If Empty orthe columns is incorrect, an error will occur) | &aliases=myvalue,myvalu2 |
value_return_form | int | result set format Optimized for various chart libraries and configured to return | 0 : separate standard (default) |
Request Example
Paste code macro | ||||
---|---|---|---|---|
| ||||
GET https://aws1.us.machlake.com/v1/lakes/xbacd1234/values/?type=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} |
...
Paste code macro | ||||
---|---|---|---|---|
| ||||
Status 200 // return format = 0 { "statussuccess": "success"true, "datareason": "success", "data": { "calc_modecolumns": "raw",[ "columns{"name": "NAME", "type": 5, "length": [80}, {"name": "TIME", "type": 5, "length": 4096}, {"name": "MyVal", "type": 20, "length": 17} ], "samples": [ { ["tag_01","2021-07-06 12:12:27", 1629], "tag_name": "["tag_02", "data": [{"MyVal": 1629,"TIME": "2021-07-06 12:12:27"}] }, 25", 1625] ] { } "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
Expand | ||
---|---|---|
| ||
|
...