Versions Compared

Key

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

...

Code Block
languagejson
Status 200

// return format = 0
{
    "status": "success",
    "data": {
        "calc_mode": "raw",
        "columns": [
            {"name": "TIME", "type": 5, "length": 4096},
            {"name": "MyVal", "type": 20, "length": 17}
        ],
        "samples": [
            {
                "tag_name": "tag_01",
                "data": [
                    {"MyVal": 1234, "TIME": "2021-07-06 12:12:22"},
                    {"MyVal": 2345, "TIME": "2021-07-06 12:12:23"},
                    {"MyVal": 2346, "TIME": "2021-07-06 12:12:24"},
                    {"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_01",
                "data": {
                    "MyVal": [
                        1234,
                        2345,
                        2346,
                        1625
                    ],
                    "TIME": [
                        "2021-07-06 12:12:22",
                        "2021-07-06 12:12:23",
                        "2021-07-06 12:12:24",
                        "2021-07-06 12:12:25"
                    ]
                }
            }
        ]
    }
}

Sample Code