GPTHub

GPTHub · GPT アクション

GPT App Table API

通过API查询想要的App信息, 并且可以上传和修改App信息

  • GET /gptsRead all rows with optional filtering
  • POST /gptsInsert a row
  • PATCH /gptsUpdate matching rows
元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "GPT App Table API",
    "version": "1.0.0",
    "description": "通过API查询想要的App信息, 并且可以上传和修改App信息"
  },
  "servers": [
    {
      "url": "https://zwtvkmsxdpcrkxhtxsjl.supabase.co/rest/v1"
    }
  ],
  "paths": {
    "/gpts": {
      "get": {
        "summary": "Read all rows with optional filtering",
        "operationId": "readRows",
        "tags": [
          "gpts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GptRecord"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      },
      "post": {
        "summary": "Insert a row",
        "operationId": "insertRow",
        "tags": [
          "gpts"
        ],
        "requestBody": {
          "description": "Row to insert",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GptRecord"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Row inserted"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Update matching rows",
        "operationId": "updateRows",
        "tags": [
          "gpts"
        ],
        "parameters": [
          {
            "name": "some_column",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Column to match for update"
          }
        ],
        "requestBody": {
          "description": "Data for updating the row",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GptRecord"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rows updated"
          }
        },
        "security": [
          {
            "apiKeyAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "GptRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string",
            "description": "应用的名称"
          },
          "desc": {
            "type": "string",
            "description": "应用自带的表述"
          },
          "features": {
            "type": "string",
            "description": "应用的功能点, 由上传者提供"
          },
          "app_url": {
            "type": "string",
            "description": "应用的链接"
          },
          "views": {
            "type": "integer",
            "format": "int64",
            "description": "访问次数"
          },
          "creator": {
            "type": "string",
            "description": "开发者存留信息"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "apikey"
      }
    }
  }
}