---
title: "自动配置Provider"
method: POST
path: "/admin/provider/auto-configure"
tags: ["管理员管理"]
---

# 自动配置Provider

`POST /admin/provider/auto-configure`

自动配置Provider，支持检查历史记录和防重复执行

## Request body

- AdminAutoConfigureRequest
  - `force` boolean — 是否强制执行（即使有正在运行的任务）
  - `providerId` integer, required
  - `showHistory` boolean — 是否显示历史记录

## Response `200`

配置响应

- object
  - `code` integer
  - `data` AdminAutoConfigureResponse
    - `canProceed` boolean
    - `historyTasks` AdminConfigurationTaskResponse[] — 历史任务
      - `completedAt` string
      - `createdAt` string
      - `duration` string — 格式化的时长，如 "2m30s"
      - `errorMessage` string
      - `executorId` integer
      - `executorName` string
      - `id` integer
      - `logSummary` string
      - `progress` integer
      - `providerId` integer
      - `providerName` string
      - `providerType` string
      - `startedAt` string
      - `status` string
      - `success` boolean
      - `taskType` string
      - `updatedAt` string
    - `message` string
    - `runningTask` AdminConfigurationTaskResponse
      - `completedAt` string
      - `createdAt` string
      - `duration` string — 格式化的时长，如 "2m30s"
      - `errorMessage` string
      - `executorId` integer
      - `executorName` string
      - `id` integer
      - `logSummary` string
      - `progress` integer
      - `providerId` integer
      - `providerName` string
      - `providerType` string
      - `startedAt` string
      - `status` string
      - `success` boolean
      - `taskType` string
      - `updatedAt` string
    - `status` string
    - `streamUrl` string — 实时流URL
    - `taskId` integer
  - `message` string
  - `msg` string

## Other responses

- `400` — 参数错误
- `403` — 权限不足
- `500` — 配置失败

---

[API](https://skmtc.net/oneclickvirt/apis/oneclickvirt-api.md) · [All operations](https://skmtc.net/oneclickvirt/apis/oneclickvirt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneclickvirt/oneclickvirt-api/versions/1f98232296de/schema)
