--- sidebar_label: OpenTSDB JSON Protocol title: Schemaless - OpenTSDB JSON Protocol description: Insert data in OpenTSDB JSON Protocol --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; In this section we will explain how to write into TDengine cloud service using schemaless OpenTSDB JSON protocols over REST interface. ## Config Run this command in your terminal to save the TDengine cloud token and URL as variables: ```bash export TDENGINE_CLOUD_TOKEN="" export TDENGINE_CLOUD_URL="" ``` ```bash set TDENGINE_CLOUD_TOKEN="" set TDENGINE_CLOUD_URL="" ``` ```powershell $env:TDENGINE_CLOUD_TOKEN="" $env:TDENGINE_CLOUD_URL="" ``` ### Insert You can use any client that supports the http protocol to access the RESTful interface address `/opentsdb/v1/put` to write data in OpenTSDB compatible format to TDengine. The EndPoint is as follows: ```text /opentsdb/v1/put/json/?token= ``` ### Insert Example - curl --request POST http://127.0.0.1:6041/opentsdb/v1/put/json/test --user "root:taosdata" --data-binary "{\"metric\":\"meter_current\",\"timestamp\":1646846400,\"value\":10.3,\"tags\":{\"groupid\":2,\"location\":\"Beijing\",\"id\":\"d1001\"}}" ### Query Example with SQL - select * from meter_current where groupid=2 and location="Beijing" and id="d1001"