# Generated by ShowAPI OpenAPI generator
# source: market/1884
# generated-at: 2026-06-26T06:17:20.230Z
openapi: 3.0.3
info:
  title: InfluxDB接口
  description: 使用HTTP接口调用您自己的InfluxDB数据库，以完成增删查改以及数据库级别的建表、建索引、维护等所有指令，大大提升开发效率。也可以预定义查询SQL并埋入变量，调用时传入变量值进行调用。演示时默认使用的是公用测试库，数据不定期清理。用于生产环境时， 请绑定自己的InfluxDB数据。
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /1884-8:
    x-pointCode: 8
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: show-tag-keys
      description: 查看数据表的索引字段。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                                description: 列名
                                              name:
                                                type: string
                                                description: series的名称，可认为是表名。
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 字段名
                                                    "1":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 字段名
                                                    "2":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 字段名
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1884_8_POST
      parameters:
        - name: table
          in: query
          description: 表名。
          required: true
          schema:
            type: string
        - name: database
          in: query
          description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ds_id:
                  type: string
                  description: 数据源
              required:
                - ds_id
  /1884-7:
    x-pointCode: 7
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: show-field-keys
      description: 查看数据表的非索引字段。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                                description: 字段名
                                              name:
                                                type: string
                                                description: series名称，可认为是表名。
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 字段名和类型
                                                    "1":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 字段名和类型
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1884_7_POST
      parameters:
        - name: table
          in: query
          description: 表名。
          required: true
          schema:
            type: string
        - name: database
          in: query
          description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ds_id:
                  type: string
                  description: 数据源
              required:
                - ds_id
  /1884-6:
    x-pointCode: 6
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: show-database
      description: 获取数据库列表。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                              name:
                                                type: string
                                                description: 数据库名称
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 数据库名称
                                                    "1":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 数据库名称
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1884_6_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ds_id:
                  type: string
                  description: 数据源
              required:
                - ds_id
  /1884-5:
    x-pointCode: 5
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: show-users
      description: 获取用户列表。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                                description: "[用户名，是否是管理员]"
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1884_5_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ds_id:
                  type: string
                  description: 数据源
              required:
                - ds_id
  /1884-4:
    x-pointCode: 4
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: drop-table
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                            description: 成功为0。
                        description: 业务返回体
      operationId: 1884_4_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                table:
                  type: string
                  description: 删除的表
                database:
                  type: string
                  description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - table
                - database
                - ds_id
  /1884-3:
    x-pointCode: 3
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: insert
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          ret_code:
                            type: number
                            description: 成功为0。
                        description: 业务返回体
      operationId: 1884_3_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                lineList:
                  type: string
                  description: 插入的对象列表，详细节段意义点此链接
                database:
                  type: string
                  description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - lineList
                - database
                - ds_id
  /1884-2:
    x-pointCode: 2
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: list-table
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                                description: 固定值
                                              name:
                                                type: string
                                                description: 固定值
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 表名
                                                    "1":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 表名
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                        description: 业务返回体
      operationId: 1884_2_POST
      parameters:
        - name: database
          in: query
          description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ds_id:
                  type: string
                  description: 数据源
              required:
                - ds_id
  /1884-1:
    x-pointCode: 1
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: select-list
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          remark:
                            type: string
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                "0":
                                  type: object
                                  properties:
                                    series:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          "0":
                                            type: object
                                            properties:
                                              columns:
                                                type: array
                                                items:
                                                  type: string
                                                description: 字段列表
                                              name:
                                                type: string
                                                description: 表名
                                              values:
                                                type: array
                                                items:
                                                  type: object
                                                  properties:
                                                    "0":
                                                      type: array
                                                      items:
                                                        type: string
                                                      description: 对应columns的值。
                                    statement_id:
                                      type: number
                          ret_code:
                            type: number
                            description: 0为成功，其他失败。
                        description: 业务返回体
      operationId: 1884_1_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                fields:
                  type: string
                  description: " 需要返回的字段，意义和sql语句一样"
                table:
                  type: string
                  description: " 从哪张表查询，在influxdb中表概念对应measurement"
                where:
                  type: string
                  description: 例如"code"=?   and  "name"=?
                where_param:
                  type: string
                  description: 例如["12345","aaaaa"]
                order_by_time:
                  type: string
                  enum:
                    - desc
                    - asc
                  description: " 根据时间排序，枚举值 desc 或 asc"
                limit:
                  type: number
                  minimum: 1
                  maximum: 100
                  description: " 返回多少条记录。最高100条。"
                offset:
                  type: number
                  description: 偏移量，可用于分页查询。
                epoch:
                  type: string
                  description: 返回的时间格式，可选值为 空串，ns,u,µ,ms,s,m,h。如果空串则返回rfc3339_date_time_string格式（例：2020-04-20T13:52:12.79223644Z）
                database:
                  type: string
                  description: 使用本数据源中的哪一个库。如果传入本参数，将优先使用本库（而不是数据源中设定的库）。
                ds_id:
                  type: string
                  description: 数据源
              required:
                - table
                - database
                - ds_id
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
  schemas:
    ShowapiResEnvelope:
      type: object
      description: ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）
      properties:
        showapi_res_code:
          type: integer
          description: API 返回的状态码
        showapi_res_error:
          type: string
          description: API 返回的错误信息
        showapi_res_id:
          type: string
          description: API 请求的唯一标识
        showapi_fee_num:
          type: integer
          description: API 调用计费次数
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/1884?tab=book
x-apiCode: "1884"
x-is-own: false
x-is-op: true
