LinDB on GitHub
  1. Api
  2. Query

Execute LinQL

Execute lin query language with rate limit, then return different response based on execution statement.

  • metric data/metadata query statement;
  • cluster metadata/state query statement;
  • database/storage/broker management statement;

For more information about LinQL.

GET|PUT|PUST /api/v1/exec

Parameters:

AttributeTypeDescription
dbstringDatabase name
sqlstringLin query language

Example request:

Terminal
curl -G http://localhost:9000/api/v1/exec?db=_internal --data-urlencode "sql=select heap_inuse from lindb.runtime.mem  where 'role' in ('Broker') group by node"

Example response:

{
  "metricName": "lindb.runtime.mem",
  "groupBy": [
    "node"
  ],
  "fields": [
    "heap_inuse"
  ],
  "startTime": 1674998900000,
  "endTime": 1675002500000,
  "interval": 10000,
  "series": [
    {
      "tags": {
        "node": "192.168.0.103:9001"
      }
    },
    {
      "tags": {
        "node": "192.168.0.108:9001"
      },
      "fields": {
        "heap_inuse": {
          "1675001910000": 23855104,
          "1675001920000": 28360704,
          "1675001930000": 29196288,
          "1675001940000": 29908992,
          "1675001950000": 30711808,
          "1675001960000": 31301632,
          "1675001970000": 31981568,
          "1675001980000": 32653312,
          "1675001990000": 33349632,
          "1675002000000": 34127872,
          "1675002010000": 34930688,
          "1675002020000": 35553280,
          "1675002030000": 29769728,
          "1675002040000": 29966336,
          "1675002050000": 30146560,
          "1675002060000": 30466048,
          "1675002070000": 30834688,
          "1675002080000": 31432704,
          "1675002090000": 31940608,
          "1675002100000": 32489472,
          "1675002110000": 33005568,
          "1675002120000": 33595392,
          "1675002130000": 34242560,
          "1675002140000": 34947072,
          "1675002160000": 25174016,
          "1675002170000": 25739264,
          "1675002180000": 26492928,
          "1675002190000": 27172864,
          "1675002200000": 27762688,
          "1675002210000": 28581888,
          "1675002220000": 29409280,
          "1675002230000": 30146560,
          "1675002240000": 30760960,
          "1675002250000": 31571968,
          "1675002260000": 32161792,
          "1675002270000": 32923648,
          "1675002280000": 33488896,
          "1675002290000": 27869184,
          "1675002300000": 28164096,
          "1675002310000": 28409856,
          "1675002320000": 28778496,
          "1675002330000": 29229056,
          "1675002340000": 29777920,
          "1675002350000": 30294016,
          "1675002360000": 30867456,
          "1675002370000": 31424512,
          "1675002380000": 32112640,
          "1675002390000": 32677888,
          "1675002400000": 33382400,
          "1675002410000": 27729920,
          "1675002420000": 28016640,
          "1675002430000": 28262400,
          "1675002440000": 28614656,
          "1675002450000": 29024256,
          "1675002460000": 29540352,
          "1675002470000": 30121984,
          "1675002480000": 31178752,
          "1675002490000": 33964032
        }
      }
    }
  ]
}
Previous
Insert
Next
State