| # |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| openapi: 3.0.0 |
| info: |
| title: iotdb_rest_v2 |
| description: IoTDB Rest API for Grafana, Prometheus, etc.. |
| license: |
| name: Apache 2.0 |
| url: https://www.apache.org/licenses/LICENSE-2.0.html |
| version: 1.0.0 |
| servers: |
| - url: http://127.0.0.1:18080/ |
| description: api |
| security: |
| - basic: [] |
| paths: |
| /rest/v2/insertTablet: |
| post: |
| summary: insertTablet |
| description: insertTablet |
| operationId: insertTablet |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/InsertTabletRequest' |
| responses: |
| "200": |
| description: ExecutionStatus |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/ExecutionStatus' |
| |
| /rest/v2/insertRecords: |
| post: |
| summary: insertRecords |
| description: insertRecords |
| operationId: insertRecords |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/InsertRecordsRequest' |
| responses: |
| "200": |
| description: ExecutionStatus |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/ExecutionStatus' |
| |
| /rest/v2/nonQuery: |
| post: |
| summary: executeNonQueryStatement |
| description: executeNonQueryStatement |
| operationId: executeNonQueryStatement |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/SQL' |
| responses: |
| "200": |
| description: ExecutionStatus |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/ExecutionStatus' |
| |
| /rest/v2/query: |
| post: |
| summary: executeQueryStatement |
| description: executeQueryStatement |
| operationId: executeQueryStatement |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/SQL' |
| responses: |
| "200": |
| description: QueryDataSet |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/QueryDataSet' |
| /rest/v2/fastLastQuery: |
| post: |
| summary: executeFastLastQueryStatement |
| description: executeFastLastQueryStatement |
| operationId: executeFastLastQueryStatement |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/PrefixPathList' |
| responses: |
| "200": |
| description: QueryDataSet |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/QueryDataSet' |
| |
| /grafana/v2/login: |
| get: |
| responses: |
| "200": |
| description: ExecutionStatus |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/ExecutionStatus' |
| operationId: login |
| |
| /grafana/v2/query/expression: |
| post: |
| summary: expression |
| description: expression |
| operationId: expression |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/ExpressionRequest' |
| responses: |
| "200": |
| description: QueryDataSet |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/QueryDataSet' |
| |
| /grafana/v2/variable: |
| post: |
| summary: variables |
| description: variables |
| operationId: variables |
| requestBody: |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/SQL' |
| responses: |
| "200": |
| description: VariablesResult |
| content: |
| application/json: |
| schema: |
| $ref: '#/components/schemas/VariablesResult' |
| |
| /grafana/v2/node: |
| post: |
| summary: node |
| description: node |
| operationId: node |
| requestBody: |
| content: |
| application/json: |
| schema: |
| type: array |
| description: node name (e.g., "root.a.b.c") |
| items: |
| type: string |
| responses: |
| "200": |
| description: NodesResult |
| content: |
| application/json: |
| schema: |
| type: array |
| items: |
| type: string |
| |
| components: |
| schemas: |
| SQL: |
| title: SQL |
| type: object |
| properties: |
| sql: |
| type: string |
| row_limit: |
| type: integer |
| format: int32 |
| |
| PrefixPathList: |
| title: PrefixPathList |
| type: object |
| properties: |
| prefix_paths: |
| type: array |
| items: |
| type: string |
| InsertTabletRequest: |
| title: InsertTabletRequest |
| type: object |
| properties: |
| timestamps: |
| type: array |
| items: |
| type: integer |
| format: int64 |
| measurements: |
| type: array |
| items: |
| type: string |
| data_types: |
| type: array |
| items: |
| type: string |
| values: |
| type: array |
| items: |
| type: array |
| items: |
| type: object |
| is_aligned: |
| type: boolean |
| device: |
| type: string |
| |
| InsertRecordsRequest: |
| title: InsertRecordsRequest |
| type: object |
| properties: |
| timestamps: |
| type: array |
| items: |
| type: integer |
| format: int64 |
| measurements_list: |
| type: array |
| items: |
| type: array |
| items: |
| type: string |
| data_types_list: |
| type: array |
| items: |
| type: array |
| items: |
| type: string |
| values_list: |
| type: array |
| items: |
| type: array |
| items: |
| type: object |
| is_aligned: |
| type: boolean |
| devices: |
| type: array |
| items: |
| type: string |
| |
| ExecutionStatus: |
| type: object |
| properties: |
| code: |
| type: integer |
| format: int32 |
| message: |
| type: string |
| |
| QueryDataSet: |
| type: object |
| properties: |
| expressions: |
| type: array |
| items: |
| type: string |
| column_names: |
| type: array |
| items: |
| type: string |
| data_types: |
| type: array |
| items: |
| type: string |
| timestamps: |
| type: array |
| items: |
| type: integer |
| format: int64 |
| values: |
| type: array |
| items: |
| type: array |
| items: |
| type: object |
| |
| ExpressionRequest: |
| type: object |
| properties: |
| expression: |
| type: array |
| items: |
| type: string |
| prefix_path: |
| type: array |
| items: |
| type: string |
| condition: |
| type: string |
| control: |
| type: string |
| start_time: |
| type: number |
| end_time: |
| type: number |
| |
| VariablesResult: |
| type: array |
| items: |
| type: object |
| |
| securitySchemes: |
| basic: |
| type: http |
| scheme: basic |
| APIKey: |
| type: apiKey |
| name: API Key |
| in: header |