note

This function is an improved method supported by Machlake. The tag name, time, and each value are sent in plain JSON format. However, since this JSON consists of an array of values, inserting data is faster and less expensive.

This function is an improved method supported by Machlake. The tag name, time, and each value are sent in plain JSON format. However, since this JSON consists of an array of values, inserting data is faster and less expensive.

HTTP Request

POST https://api.machbasecloud.com/v3/lakes/{lake_id}/values/bulk
Content-Type: application/json; charset=utf8
x-api-key: {API Key}
  
{
    "date_format"   : "{date_format}",
    "values"        : [["{tag_name1}", "{time1}", {value1}], ["(tag_name2}", "{time2}", {value2}], ... ]
}

Parameters

no parameters

Request Example

POST https://api.machbasecloud.com/v3/lakes/lake01/values/bulk
Content-Type: application/json; charset=utf8
x-api-key: {API Key}
 
{
    "date_format"   : "YYYY-MM-DD HH24:MI:SS",
    "values"        : [
        ["tag_01", "2021-07-06 12:12:25", 1625.0],
        ["tag_02", "2021-07-06 12:12:26", 1627.0],
        ["tag_02", "2021-07-06 12:12:27", 1629.0]
    ]
}

Response Example

Status 200
 
{
    "status": "success",
    "data": {
        "fail": 0,
        "success": 3
    }
}