Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Paste code macro
languagehttp
themeSunburst
GET https://api.machlake.com/v1/lakes/${lake_id}
Content-Type: application/json; charset=utf8
x-api-key: {API Key}
 
{
    "date"   : "{date}"
}

Parameters

no parameters

Request Example

Paste code macro
languagehttp
themeSunburst
GET https://api.machlake.com/v1/lakes/xbacd1234/lake01

Response Example

Paste code macro
languagejson
themeSunburst
Status 200


{
    "lake_idsuccess" : "lake01"true,
    "reason": "get lake_ info success",
    "data" : {
        "lake_nameid"    : "My Lakelake01",
        "lake_planinfo"    : "basic",{
            "lake_name"    : "My Lake",
            "lake_typeplan"    : "Nbasic",
        
            "region"             : "aws1.kor",
        
            "timezone"         : "America/Los_Angeles",
                    "create_time"   : "2021-09-30 10:30:05",
        
            "update_time"   : "2021-10-01 14:59:12"
        },
        "lake_status" : {
            "count_of_tag"   : 128,
            "count_of_value" : 123456,
            "query_call"     : 015,
            "traffic": 4743829,         "storage": 30328709120.006,
        "state"  :  "runningstorage"        }: 0.056,
    "plan_limit": {       "max_tag": 1000,state"          : "max_queryrunning": 
10000,       "max_disk": 32212254720 },
        "maxplan_concurrentlimit": 100000,
 {
    "limit_select_tag": 1000,       "limitmax_select_valuetag": 100,       "limit_append_value"   : 1001000,
      "limit_append_tag": 1000,      "max_query"         "default_tag_count": 10000,
       },     "tagmax_schemastorage" :   [   : 10,
   {         "colmax_nameconcurrent"    : "name"100000,
        "col_type"   : "varcharlimit_select_tag",  : 1000,
     "col_length" : 40     "limit_select_value": 100,
  }     ],     "limit_append_value_schema" : [100,
       {         "collimit_append_nametag"   : "time"1000,
        "col_type    "default_tag_count" :  :10000
"datetime"        },
       {
  "tag_schema" : [
      "      {
                "col_name"   : "valuename",
                "col_type"   : "doublevarchar",
        }     ] }

Sample Code

chcp
 
65001
 "col_length" :
:
 
Text
40
Encoding
 
to
 
UTF-8
 
in
 
CMD
 
::
  
Example
 
For
 
Get
 
Lake
 
View
 
API
}
by
 
using
 
curl
 
in
 
window
 
script
 
::
 
written
 
by
],
yeony
 
kim
  
set
 
API_KEY=YOUR_API_TOKEN
  
set
 
CONTENT_HEADER="Content-Type:
 
application/json" set API_HEADER="x-api-key: %API_KEY%" set LAKE_ID=YOUR_LAKE_ID set URL=https://api.machlake.com/lakes/%LAKE_ID% :: ------------------------------------------------------------------------------------------------- :: :: CASE - GET LAKE List curl -k -X GET %URL% -H %CONTENT_HEADER% -H %API_HEADER% :: Return Format :: {"data":{"access_control_list":[{"cidr":"0.0.0.0/0","name":"default"}],"lake_id":"YOUR_LAKE_ID","lake_info":{"create_date":"2021-10-14 01:20:34","lake_name":"sample_lake","lake_plan":"basic","lake_type":"Normal","region":"ap-northeast-2","timezone":"Asia/Seoul","update_date":"0"},"lake_status":{"count_of_tag":0,"count_of_value":0,"query_call":0,"state":"running","storage":7456575488,"traffic":1990097},"plan_limit":{"default_tag_count":10000,"limit_append_tag":1000,"limit_append_value":100,"limit_select_tag":1000,"limit_select_value":100,"max_concurrent":100000,"max_network":10737418240,"max_query":10000,"max_storage":21474836480,"max_tag_count":100000},"tag_schema":[{"col_length":40,"col_name":"name","col_type":"varchar"}],"value_schema":[{"col_length":0,"col_name":"time","col_type":"datetime"},{"col_length":0,"col_name":"value","col_type":"double"}]},"status":"success"}# Text Encoding to UTF-8 in CMD # Example For Get Lake View API by using curl in shell script # written by yeony kim API_KEY=YOUR_API_TOKEN CONTENT_HEADER="Content-Type:application/json" API_HEADER="x-api-key:$API_KEY" LAKE_ID=c5jpaqr95ojs72hmmh90 URL=https://api.machlake.com/lakes/$LAKE_ID # ------------------------------------------------------------------------------------------------- # # CASE - GET LAKE List curl -k -X GET $URL -H $CONTENT_HEADER -H $API_HEADER # Return Format # {"data":{"access_control_list":[{"cidr":"0.0.0.0/0","name":"default"}],"lake_id":"YOUR_LAKE_ID","lake_info":{"create_date":"2021-10-14 01:20:34","lake_name":"sample_lake","lake_plan":"basic","lake_type":"Normal","region":"ap-northeast-2","timezone":"Asia/Seoul","update_date":"0"},"lake_status":{"count_of_tag":0,"count_of_value":0,"query_call":0,"state":"running","storage":7456575488,"traffic":1990097},"plan_limit":{"default_tag_count":10000,
"value_schema" : [
            {
                "col_name"   : "time",
                "col_type"   : "datetime"
            },
            {
                "col_name"   : "value",
                "col_type"   : "double"
            }
        ]
    }
}
Expand
titlewindow(batch)

github

Code Block
Expand
titlelinux(shell)

github

Code Block

Sample Code

Expand
titlewindow(batch)

github

Code Block
chcp 65001 
:: Text Encoding to UTF-8 in CMD
:: Example For Get Lake View API by using curl in window script
:: written by yeony kim

set API_KEY=YOUR_API_KEY
set LAKE_ID=YOUR_LAKE_ID

set CONTENT_HEADER="Content-Type: application/json"
set API_HEADER="x-api-key: %API_KEY%"


set URL="https://api.machlake.com/v1/lakes/%LAKE_ID%"

:: ------------------------------------------------------------------------------------------------- ::

:: CASE - GET LAKE List

curl -k -X GET %URL% -H %CONTENT_HEADER% -H %API_HEADER%

:: Return Format
:: {
::     "success":true,
::     "reason":"get lake info success",
::     "data":{
::         "lake_id":"xbcd0001",
::         "lake_info":{
::             "lake_name":"sample_lake",
::             "lake_plan":"basic",
::             "lake_type":"N",
::             "region":"aws1.kor",
::             "timezone":"America/Los_Angeles",
::             "create_time":"2021-09-30 10:30:05",
::             "update_time":"2021-10-01 14:59:12"
::         },
::         "lake_status":{
::             "count_of_tag":128,
::             "count_of_value":123456,
::             "query_call":0,
::             "traffic":4743829,
::             "storage":3032870912,
::             "state":"running" 
::         },
::         "plan_limit":{
::             "max_tag":1000,
::             "max_query":10000,
::             "max_disk":32212254720,
::             "max_concurrent":100000,
::             "limit_select_tag":1000,
::             "limit_select_value":100,
::             "limit_append_value":100,
::             "limit_append_tag":1000,"limit_append_value":100,"limit_select_tag":1000,"limit_select_value":100,"max_concurrent":100000,"max_network":10737418240,"max_query":10000,"max_storage":21474836480,"max_tag_count":100000},"tag_schema":[{"col_length":40,
::             "default_tag_count":10000
::         },
::         "tag_schema":[
::             {
::                 "col_name":"name",
::                 "col_type":"varchar"}],"value_schema":[{"col_length":0,"col_name":"time","col_type":"datetime"},{"col_length":0,"col_name":"value","col_type":"double"}]},"status":"success"}
Expand
titlejavascript

github

Code Block
// Example For Get Lake View API by using request in nodejs
// written by yeony kim

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

const express = require('express');
const app = express();
const API_KEY = "YOUR_API_TOKEN";
const LAKE_ID = "YOUR_LAKE_ID"
const URL = "https://api.machlake.com/lakes/" + LAKE_ID

// CASE - GET LAKE view

app.get(
    '/get_lake_view', function(req, res) {,
::                 "col_length":40
::             }
::         ],
::         "value_schema":[
::             {
::                 "col_name":"time",
::                 "col_type":"datetime"
::             },
::           var request = require('request');{
::         var option = {        "col_name":"value",
::     url: URL,             headers"col_type":"double"
:: {            }
::    'Content-Type': 'application/json',    ]
::     }
:: }
Expand
titlelinux(shell)

github

Code Block
# Text Encoding to 'x-api-key': API_KEY
            },
        };
        request.get( option, function(error, response, body) {
            if (!error) {
                res.writeHead(200);
                res.end(body);
         UTF-8 in CMD
# Example For Get Lake View API by using curl in shell script

API_KEY=$YOUR_API_KEY
LAKE_ID=$YOUR_LAKE_ID

CONTENT_HEADER="Content-Type:application/json"
API_HEADER="x-api-key:$API_KEY"

URL=https://api.machlake.com/v1/lakes/$LAKE_ID

# ------------------------------------------------------------------------------------------------- #

# CASE - GET LAKE List

curl -k -X GET $URL -H $CONTENT_HEADER -H $API_HEADER

# Return Format
# {
#     "success":true,
#     "reason":"get lake info success",
#     "data":{
#       console.log(body) // {"data":{"access_control_list":[{"cidr":"0.0.0.0/0","name":"default"}],"lake_id":"YOUR_LAKE_ID","lake_info":{"create_date":"2021-10-14 01:20:34","lake_name":"sample_lake","lake_"lake_id":"xbcd0001",
#         "lake_info":{
#             "lake_name":"sample_lake",
#             "lake_plan":"basic",
#             "lake_type":"Normal","region":"ap-northeast-2",N",
#             "region":"aws1.kor",
#             "timezone":"AsiaAmerica/SeoulLos_Angeles","update_date":"0"},"
#             "create_time":"2021-09-30 10:30:05",
#             "update_time":"2021-10-01 14:59:12"
#         },
#         "lake_status":{
#             "count_of_tag":0,128,
#             "count_of_value":0,123456,
#             "query_call":0,"state":"running",
#             "traffic":4743829,
#             "storage":7456575488,"traffic":1990097},3032870912,
#             "state":"running" 
#         },
#         "plan_limit":{"default
#             "max_tag_count":10000,"limit_append_tag":1000,"limit_append_value":100,"limit_select_tag":1000,"limit_select_value":100,1000,
#             "max_query":10000,
#             "max_disk":32212254720,
#             "max_concurrent":100000,"max_network":10737418240,"max_query":10000,"max_storage":21474836480,"max_tag_count":100000},"tag_schema":[{"col_length":40,"col_name":"name","col_type":"varchar"}],"value_schema":[{"col_length":0,"col_name":"time","col_type":"datetime"},{"col_length":0,"col_name":"value","col_type":"double"}]},"status":"success"}
            } else {
                console.log(error)
            }
        })
    }
)

app.listen(8888, function() {
    console.log('http://127.0.0.1:8888/get_lake_view is result for get LAKE view')
})
Expand
titlepython

github

Code Block
"""
Example For Get Lake View API by using request in python
written by yeony kim
"""

import requests

API_KEY = "YOUR_API_TOKEN"
LAKE_ID = "YOUR_LAKE_ID"
URL = f"https://api.machlake.com/lakes/{LAKE_ID}"

# CASE - GET LAKE view

headers = {
    'Content-Type': 'application/json',
    'x-api-key': API_KEY
}

response = requests.get(URL, headers=headers, verify=False)
print(response.content.decode('utf-8'))  # {"data":{"access_control_list":[{"cidr":"0.0.0.0/0","name":"default"}],"lake_id":"YOUR_LAKE_ID","lake_info":{"create_date":"2021-10-14 01:20:34","lake_name":"sample_lake","lake_plan":"basic","lake_type":"Normal","region":"ap-northeast-2","timezone":"Asia/Seoul","update_date":"0"},"lake_status":{"count_of_tag":0,"count_of_value":0,"query_call":0,"state":"running","storage":7456575488,"traffic":1990097},"plan_limit":{"default_tag_count":10000,"limit_append_tag":1000,"limit_append_value":100,"limit_select_tag":1000,"limit_select_value":100,"max_concurrent":100000,"max_network":10737418240,"max_query":10000,"max_storage":21474836480,"max_tag_count":100000},"tag_schema":[{"col_length":40,"col_name":"name","col_type":"varchar"}],"value_schema":[{"col_length":0,"col_name":"time","col_type":"datetime"},{"col_length":0,"col_name":"value","col_type":"double"}]},"status":"success"}
#             "limit_select_tag":1000,
#             "limit_select_value":100,
#             "limit_append_value":100,
#             "limit_append_tag":1000,
#             "default_tag_count":10000
#         },
#         "tag_schema":[
#             {
#                 "col_name":"name",
#                 "col_type":"varchar",
#                 "col_length":40
#             }
#         ],
#         "value_schema":[
#             {
#                 "col_name":"time",
#                 "col_type":"datetime"
#             },
#             {
#                 "col_name":"value",
#                 "col_type":"double"
#             }
#         ]
#     }
# }
Expand
titlejavascript

github

Code Block
languagejs
// Example For Get Lake View API by using request in nodejs
// written by yeony kim

// process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

const API_KEY = "YOUR_API_TOKEN";
const LAKE_ID = "YOUR_LAKE_ID";
const URL = `https://api.machlake.com/v1/lakes/${LAKE_ID}`;

var request = require('request');

/* ------------------------------------------------------------------------------------------------- */

// CASE - GET LAKE view

request.get({
    url: URL, 
    headers: {
        "Content-Type": "application/json",
        "x-api-key": API_KEY
    }}, 
    function(error, response, body) {
        console.log(body);
        // Return Format
        // {
        //     "success":true,
        //     "reason":"get lake info success",
        //     "data":{
        //         "lake_id":"{lake_id}",
        //         "lake_info":{
        //             "lake_name":"sample_lake",
        //             "lake_plan":"basic",
        //             "lake_type":"N",
        //             "region":"aws1.kor",
        //             "timezone":"America/Los_Angeles",
        //             "create_time":"2021-09-30 10:30:05",
        //             "update_time":"2021-10-01 14:59:12"
        //         },
        //         "lake_status":{
        //             "count_of_tag":128,
        //             "count_of_value":123456,
        //             "query_call":0,
        //             "traffic":4743829,
        //             "storage":3032870912,
        //             "state":"running" 
        //         },
        //         "plan_limit":{
        //             "max_tag":1000,
        //             "max_query":10000,
        //             "max_disk":32212254720,
        //             "max_concurrent":100000,
        //             "limit_select_tag":1000,
        //             "limit_select_value":100,
        //             "limit_append_value":100,
        //             "limit_append_tag":1000,
        //             "default_tag_count":10000
        //         },
        //         "tag_schema":[
        //             {
        //                 "col_name":"name",
        //                 "col_type":"varchar",
        //                 "col_length":40
        //             }
        //         ],
        //         "value_schema":[
        //             {
        //                 "col_name":"time",
        //                 "col_type":"datetime"
        //             },
        //             {
        //                 "col_name":"value",
        //                 "col_type":"double"
        //             }
        //         ]
        //     }
        // }
    });
Expand
titlepython

github

Code Block
languagepy
"""
Example For Get Lake View API by using request in python
written by yeony kim
"""

import requests

API_KEY = "YOUR_API_TOKEN"
LAKE_ID = "YOUR_LAKE_ID"

URL = f"https://api.machlake.com/v1/lakes/{LAKE_ID}"

headers = {
    "Content-Type": "application/json",
    "x-api-key": API_KEY
}


# ------------------------------------------------------------------------------------------------- #

# CASE - GET LAKE List

response = requests.get(URL, headers=headers, verify=False)
print(response.content.decode("utf-8"))

# Return Format
# {
#     "success":true,
#     "reason":"get lake info success",
#     "data":{
#         "lake_id":"xbcd0001",
#         "lake_info":{
#             "lake_name":"sample_lake",
#             "lake_plan":"basic",
#             "lake_type":"N",
#             "region":"aws1.kor",
#             "timezone":"America/Los_Angeles",
#             "create_time":"2021-09-30 10:30:05",
#             "update_time":"2021-10-01 14:59:12"
#         },
#         "lake_status":{
#             "count_of_tag":128,
#             "count_of_value":123456,
#             "query_call":0,
#             "traffic":4743829,
#             "storage":3032870912,
#             "state":"running" 
#         },
#         "plan_limit":{
#             "max_tag":1000,
#             "max_query":10000,
#             "max_disk":32212254720,
#             "max_concurrent":100000,
#             "limit_select_tag":1000,
#             "limit_select_value":100,
#             "limit_append_value":100,
#             "limit_append_tag":1000,
#             "default_tag_count":10000
#         },
#         "tag_schema":[
#             {
#                 "col_name":"name",
#                 "col_type":"varchar",
#                 "col_length":40
#             }
#         ],
#         "value_schema":[
#             {
#                 "col_name":"time",
#                 "col_type":"datetime"
#             },
#             {
#                 "col_name":"value",
#                 "col_type":"double"
#             }
#         ]
#     }
# }