管理员

GET /core/v1/admin/channels/catalog

内置渠道类型与实际支持状态

身份要求

管理员. 会话/管理写操作不在公共 Playground 执行。

接口

curl --request GET 'https://api.oneaster.ai/core/v1/admin/channels/catalog' \
  --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"

参数

—

响应

200

内置渠道类型与实际支持状态

{
  "application/json": {
    "schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "success": {
          "const": true
        },
        "data": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": "integer",
                "minimum": 0
              },
              "protocol": {
                "type": "string"
              },
              "base_url": {
                "type": "string"
              },
              "category": {
                "type": "string"
              },
              "stream": {
                "type": "boolean"
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "supported": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "name",
              "number",
              "protocol",
              "base_url",
              "category",
              "stream",
              "options",
              "supported"
            ]
          }
        }
      },
      "required": [
        "success",
        "data"
      ]
    }
  }
}

default

错误代码见 core-api.md;供应商/数据库错误已隐藏。

{
  "application/json": {
    "schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "success": {
          "const": false
        },
        "error": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "type": {
              "const": "oneaster_error"
            }
          },
          "required": [
            "code",
            "message",
            "type"
          ]
        },
        "data": {
          "type": "null"
        }
      },
      "required": [
        "success",
        "error",
        "data"
      ]
    }
  }
}