跳转到主要内容
基础设施相关接口/安装器
POSTInstaller起始版本 1.0同步需要认证

测试安装器软件仓库连接

测试连通性已配置软件仓库返回结果。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

请求体字段

  • configObject必填

    配置信息。

    • modeString

      软件仓库访问模式在线上游目录本地目录。

      示例: online

    • tokenString

      令牌。

      示例: ****

    • baseUrlString

      上游软件仓库服务。

      示例: https://depot.example.com

    • localDirString

      本地目录路径模式目录。

      示例: /opt/packages

    • channelString

      可选渠道过滤软件包列表。

      示例: stable

    • httpProxyString

      可选HTTP代理地址软件仓库访问。

      示例: http://proxy.example.com:3128

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • connectedBoolean

    已连接。

    示例: true

  • connectedAtString

    已连接时间。

    示例: 2026-01-15T08:00:00Z

请求地址

POST/api/v1/installer/depot/test-connection

/api/v1/installer/depot/test-connection

操作 ID

TestInstallerDepotConnection

永久链接

请求示例

curl -X POST '{host}/api/v1/installer/depot/test-connection' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"config":{"mode":"online","token":"****","baseUrl":"https://depot.example.com","localDir":"/opt/packages","channel":"stable","httpProxy":"http://proxy.example.com:3128"}}'

响应示例

200
{
  "connected": true,
  "connectedAt": "example"
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史