---
title: "管理员执行实例操作"
method: POST
path: "/admin/instances/{id}/action"
tags: ["管理员管理"]
---

# 管理员执行实例操作

`POST /admin/instances/{id}/action`

管理员对实例执行启动、停止、重启等操作

## Path parameters

- `id` string, required

## Request body

- AdminInstanceActionRequest
  - `action` string, required
  - `image` string

## Response `200`

操作成功

- CommonResponse
  - `code` integer
  - `data` unknown
  - `message` string
  - `msg` string

## Other responses

- `400` — 请求参数错误
- `403` — 权限不足
- `404` — 实例不存在
- `500` — 服务器内部错误

## Changes

- **2026-08-22** `b4b4298192a4` — 1 breaking, 2 info
  - added the new path request parameter `id`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
- **2026-07-30** `3159de825a90` — 1 warning, 2 info
  - deleted the `path` request parameter `id`
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`

[Change history](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api/changes/admin/instances/:id/action/post.md)

---

[API](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api.md) · [All operations](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/oneclickvirt/oneclickvirt-api/revisions/2d2db1776645/schema)
