HTTP API

HTTP API

The machbase-neo provides two main functions via HTTP API. One is query that can execute any type of SQL statements, the other is write that is equivalent INSERT INTO... SQL statement.

General purpose of HTTP API is exposing functionalities that access the data stored in machbase database for the user’s service applications and data analytics tools, while sensors and things are storing data into machbase via MQTT and HTTP.

Endpoints

Applications and sensors can read/write data via HTTP API.

Database Query

MethodPathDescription
GET/db/queryexecute query with q param
POST/db/queryexecute query with JSON and form data

Database Write

MethodPathDescription
POST/db/writewrite data in JSON and CSV formats
POST/metrics/writewrite data in ILP (influx line protocol)

TQL Endpoints

MethodPathDescription
GET/db/tql/{tql_file_path}execute the tql file that specified by path
POST/db/tql/{tql_file_path}execute the tql file with the payload of the request
POST/db/tqlexecute the tql which is passed as the payload of the request
POST/db/tql?$={tql_script}execute the tql which is passed in query param $ with the payload of the request Since v8.0.17

In this chapter

Last updated on