Oracle 数据助理

Oracle 数据助理 · GPT-Aktionen

Oracle 查询 API

用于在Oracle数据库上执行查询的API。

  • POST /oracle_queryoracleQuery

    在Oracle数据库上执行查询。

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Oracle 查询 API",
    "description": "用于在Oracle数据库上执行查询的API。",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://aichatexp.com"
    }
  ],
  "paths": {
    "/oracle_query": {
      "post": {
        "description": "在Oracle数据库上执行查询。",
        "operationId": "oracleQuery",
        "requestBody": {
          "description": "连接信息和要执行的查询",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OracleQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "查询成功执行",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "无效的请求"
          },
          "500": {
            "description": "服务器错误"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OracleQueryRequest": {
        "type": "object",
        "properties": {
          "oracle_conn_info": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string"
              },
              "port": {
                "type": "integer"
              },
              "service_name": {
                "type": "string"
              },
              "user": {
                "type": "string"
              },
              "password": {
                "type": "string"
              }
            },
            "required": [
              "host",
              "port",
              "service_name",
              "user",
              "password"
            ]
          },
          "query": {
            "type": "string"
          }
        },
        "required": [
          "oracle_conn_info",
          "query"
        ]
      }
    }
  }
}