Versions Compared

Key

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

...

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

Parameters

no parameters

Request Example

...

Paste code macro
languagejson
themeSunburst
Status 200

{
    "status": "success",
    "data" : {
        "lake": [
            {
                "lake_id": "lake01",
                "lake_info": {
                    "lake_name": "My Lake1",
                    "lake_plan": "basic",
                    "region"   : "aws1.kor",
                    "timezone" : "America/Los_Angeles"
                }
            },
            {
                "lake_id": "lake02",
                "lake_info": {
                    "lake_name": "My Lake2",
                    "lake_plan": "enterprise",
                    "region"   : "aws1.kor",
                    "timezone" : "Asia/Seoul"
                }
            }
        ]
    }
}

Sample Code

Expand
titlewindow(batch)

github

Code Block
chcp 65001 
:: Text Encoding to UTF-8 in CMD
:: Example For Get Lake List 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 URL=https://api.machlake.com/lakes

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

:: CASE - GET LAKE List

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

:: Return Format
:: {"data":{"lake":[{"lake_id":"YOUR_LAKE_ID","lake_info":{"lake_name":"sample_lake","lake_plan":"basic","region":"ap-northeast-2","timezone":"Asia/Seoul"}}],"mount":[],"share":[]},"status":"success"}

...