ArmCloud OpenAPI 3.1 规范(AI工具专用)
ArmCloud 云手机/ARM云计算平台 OpenAPI 3.1 标准规范文件
提示
📥 下载 OpenAPI 规范文件 - 适合 Postman、Swagger Editor、AI 工具等直接导入
获取方式:
- 浏览器下载:点击上方链接或访问
https://docs.armcloud.net/openapi.yaml - 命令行获取:
curl https://docs.armcloud.net/openapi.yaml -o armcloud-openapi.yaml - 直接引用:在工具中使用 URL
https://docs.armcloud.net/openapi.yaml直接导入
openapi: 3.1.0
info:
title: ArmCloud OpenAPI
version: 2.0.0
description: |
ArmCloud 云手机/ARM云计算平台 OpenAPI 接口规范
## 认证方式
本API使用V2.0签名验证方案,每个请求必须包含以下请求头:
- authver: 鉴权版本,固定值 "2.0"
- x-ak: 访问密钥ID(AccessKey)
- x-timestamp: 请求时间戳(毫秒)
- x-sign: HMAC-SHA256签名(小写)
## 签名计算公式
```
待签名字符串 = timestamp + path + body
签名 = HMAC-SHA256(待签名字符串, SecretKey).toLowerCase()
```
## 限流说明
- 测试用户: 200次/秒
- 付费用户: 2000次/秒
contact:
name: ArmCloud API Support
url: https://www.xiaosuanyun.com
license:
name: Proprietary
servers:
- url: https://api.xiaosuanyun.com
description: 国内生产环境
- url: https://openapi-hk.armcloud.net
description: 海外生产环境
security:
- ArmCloudV2Auth: []
tags:
- name: SDK Token
description: SDK临时Token管理
- name: 板卡管理
description: 物理板卡资源管理
- name: 网存2.0
description: 网存2.0实例与存储二合一管理
- name: 网存1.0
description: 网存1.0传统存储管理
- name: 实例管理
description: 云手机实例生命周期管理
- name: 回调管理
description: 异步任务回调配置
- name: 文件管理
description: 文件上传、下载、云盘管理
- name: 应用管理
description: APK应用安装、卸载、启停
- name: 应用安全策略
description: 应用黑白名单策略管理
- name: 镜像管理
description: 系统镜像查询与管理
- name: 账户管理
description: 主账户与子账户管理
paths:
# ==================== SDK Token签发 ====================
/openapi/open/token/stsToken:
get:
tags: [SDK Token]
summary: 获取SDK临时Token
description: 获取SDK通信用临时Token
operationId: getStsToken
responses:
'200':
$ref: '#/components/responses/StsTokenResponse'
default:
$ref: '#/components/responses/ErrorResponse'
/openapi/open/token/stsTokenByPadCode:
post:
tags: [SDK Token]
summary: 获取SDK临时Token(通过实例Code)
description: 根据实例编码获取SDK临时Token
operationId: getStsTokenByPadCode
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCode]
properties:
padCode:
type: string
description: 实例编码
example: "AC32010210001"
responses:
'200':
$ref: '#/components/responses/StsTokenResponse'
default:
$ref: '#/components/responses/ErrorResponse'
/openapi/open/token/clearStsToken:
post:
tags: [SDK Token]
summary: 清除SDK授权Token
description: 清除指定的SDK授权Token
operationId: clearStsToken
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [token]
properties:
token:
type: string
description: 待清除的Token
responses:
'200':
$ref: '#/components/responses/SuccessResponse'
default:
$ref: '#/components/responses/ErrorResponse'
/openapi/open/token/clearStsTokenByPadCode:
post:
tags: [SDK Token]
summary: 清除SDK临时Token(通过实例Code)
description: 根据实例编码清除SDK临时Token
operationId: clearStsTokenByPadCode
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCode]
properties:
padCode:
type: string
description: 实例编码
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
traceId:
type: string
description: 链路追踪ID
# ==================== 板卡管理 ====================
/openapi/open/device/list:
post:
tags: [板卡管理]
summary: 板卡列表
description: 分页查询板卡列表
operationId: getDeviceList
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PaginationRequest'
- type: object
properties:
padAllocationStatus:
type: integer
description: 实例分配状态 (-2删除失败, -1分配失败, 0未分配, 1分配中, 2已分配, 3删除中)
enum: [-2, -1, 0, 1, 2, 3]
deviceStatus:
type: integer
description: 物理机状态 (0离线, 1在线)
enum: [0, 1]
armServerCode:
type: string
description: 服务器code
deviceCode:
type: string
description: 板卡code
deviceIp:
type: string
description: 板卡IP
armServerStatus:
type: integer
description: 服务器状态 (0离线, 1在线)
enum: [0, 1]
idc:
type: string
description: 机房ID
deviceIpList:
type: array
description: 板卡IP列表
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
page:
type: integer
description: 当前页
rows:
type: integer
description: 每页数量
size:
type: integer
description: 当前页数量
total:
type: integer
description: 总记录数
totalPage:
type: integer
description: 总页数
pageData:
type: array
description: 板卡列表
items:
$ref: '#/components/schemas/Device'
/openapi/open/device/computeUsage:
post:
tags: [板卡管理]
summary: 查询算力使用情况
description: 查询账户算力使用情况
operationId: getComputeUsage
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
queryRange:
type: integer
description: 查询范围 (0主账号及全部子账号, 1仅自身(默认), 2指定子账号列表)
enum: [0, 1, 2]
default: 1
subCustomerIds:
type: array
description: 子账号ID列表 (queryRange=2时必填)
items:
type: integer
format: int64
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 账户算力使用列表
items:
$ref: '#/components/schemas/ComputeUsage'
/openapi/open/device/restartDevice:
post:
tags: [板卡管理]
summary: 板卡重启
description: 重启指定的物理板卡
operationId: restartDevice
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [deviceIpList, type]
properties:
deviceIpList:
type: array
description: 物理设备IP列表
items:
type: string
type:
type: integer
description: 重启类型 (1硬重启, 2断电重启)
enum: [1, 2]
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 任务结果列表
items:
$ref: '#/components/schemas/DeviceRestartTask'
/openapi/open/device/resetDevice:
post:
tags: [板卡管理]
summary: 重置板卡
description: 重置指定的物理板卡
operationId: resetDevice
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [remark, deviceIps]
properties:
remark:
type: string
description: 重置备注信息
deviceIps:
type: array
description: 物理机IP列表 (最少1个, 最大128个)
minItems: 1
maxItems: 128
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: string
description: 消息内容
/openapi/open/device/getLatestWarmupSuccessImages:
get:
tags: [板卡管理]
summary: 查询最新预热成功镜像
description: 获取最新预热成功的镜像列表(最多3个)
operationId: getLatestWarmupImages
parameters:
- name: customerId
in: query
description: 客户ID (管理员可查询指定客户镜像)
schema:
type: integer
format: int64
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 最新预热成功镜像信息列表
maxItems: 3
items:
$ref: '#/components/schemas/WarmupImage'
# ==================== 网存2.0 ====================
/openapi/open/pad/v2/net/storage/res/create:
post:
tags: [网存2.0]
summary: 创建网存实例
description: 创建网存2.0实例,实例与存储二合一
operationId: createNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateNetStorageV2Request'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 创建结果列表
items:
$ref: '#/components/schemas/NetStorageInstance'
/openapi/open/pad/v2/net/storage/batch/boot/on:
post:
tags: [网存2.0]
summary: 网存实例批量开机
description: 批量开机网存2.0实例
operationId: batchBootOnNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BatchBootOnRequest'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/BatchOperationResult'
/openapi/open/pad/v2/net/storage/batch/off:
post:
tags: [网存2.0]
summary: 网存实例批量关机
description: 批量关机网存2.0实例
operationId: batchOffNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 需要关机的实例编码列表 (1-200个)
minItems: 1
maxItems: 200
items:
type: string
timeout:
type: integer
description: 超时时间(秒)
minimum: 300
maximum: 7200
forceDel:
type: boolean
description: 强制删除,直接关机并删除实例不保留数据 (CBS版本2.3.5以上支持)
default: false
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/BatchOperationResult'
/openapi/open/pad/v2/net/storage/batch/delete:
post:
tags: [网存2.0]
summary: 网存实例批量删除
description: 批量删除网存2.0实例
operationId: batchDeleteNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 需要删除的实例编码列表 (1-200个)
minItems: 1
maxItems: 200
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/BatchOperationResult'
/openapi/open/pad/v2/net/storage/batch/backup:
post:
tags: [网存2.0]
summary: 网存实例批量备份
description: |
批量备份网存2.0实例
⚠️ 注意:接口可能未实现(测试返回null)
operationId: batchBackupNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 需要备份的实例编码列表 (1-200个)
minItems: 1
maxItems: 200
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/BatchOperationResult'
/openapi/open/pad/v2/net/storage/clone:
post:
tags: [网存2.0]
summary: 网存实例克隆
description: 克隆网存2.0实例
operationId: cloneNetStorageV2
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCode, number]
properties:
padCode:
type: string
description: 需要克隆的原始实例编码
number:
type: integer
description: 克隆数量
minimum: 1
maximum: 100
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/BatchOperationResult'
/openapi/open/pad/v2/net/storage/detail:
post:
tags: [网存2.0]
summary: 网存实例详情查询
description: |
查询网存2.0实例详情
⚠️ 注意:接口可能未实现(测试返回null)
operationId: getNetStorageV2Detail
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 实例编码列表
items:
type: string
deviceCode:
type: string
description: 板卡编号
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 实例详情列表
items:
$ref: '#/components/schemas/NetStorageDetail'
# ==================== 实例管理 (部分核心接口) ====================
/openapi/open/pad/setWifiList:
post:
tags: [实例管理]
summary: 修改实例WIFI列表
description: 设置实例的WiFi网络配置
operationId: setWifiList
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes, wifiJsonList]
properties:
padCodes:
type: array
description: 实例编码列表
items:
type: string
wifiJsonList:
type: array
description: WIFI配置列表
items:
$ref: '#/components/schemas/WifiConfig'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TaskResult'
/openapi/open/pad/padDetails:
post:
tags: [实例管理]
summary: 实例详情
description: 分页查询实例详情
operationId: getPadDetails
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PaginationRequest'
- type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 实例编码列表
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/PaginationResponse'
/openapi/open/pad/restart:
post:
tags: [实例管理]
summary: 实例重启
description: 重启指定实例
operationId: restartPad
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes, type]
properties:
padCodes:
type: array
description: 实例编码列表
items:
type: string
type:
type: integer
description: 重启类型 (1硬重启, 2断电重启)
enum: [1, 2]
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 重启任务列表
items:
type: object
properties:
taskId:
type: integer
format: int64
description: 任务ID
padCode:
type: string
description: 实例编码
/openapi/open/pad/updatePadAndroidProp:
post:
tags: [实例管理]
summary: 修改实例安卓改机属性
description: |
静态设置安卓改机属性,需要重启实例才能生效。
设置后属性数据会持久化存储,重启或重置实例无需再调用该接口。
operationId: updatePadAndroidProp
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [props]
properties:
padCode:
type: string
description: 实例id (padCode和padCodes二选一)
padCodes:
type: array
description: 实例id列表 (padCode和padCodes二选一)
items:
type: string
restart:
type: boolean
description: 设置完成后自动重启
default: false
props:
type: object
description: 系统属性 (key-value键值对,不是数组)
additionalProperties:
type: string
example:
ro.product.vendor.name: "OP52D1L1"
ro.product.brand: "Samsung"
ro.product.model: "Galaxy S21"
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/TaskResult'
/rtc/open/room/batchApplyToken:
post:
tags: [实例管理]
summary: 批量申请RTC连接Token
description: 为实例批量申请RTC推流连接Token
operationId: batchApplyRtcToken
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [userId, pads]
properties:
userId:
type: string
description: 业务方自定义用户ID
expire:
type: integer
description: token有效期(秒)
default: 86400
pads:
type: array
description: 实例列表
items:
type: object
required: [padCode]
properties:
padCode:
type: string
description: 实例编号
videoStream:
$ref: '#/components/schemas/VideoStreamConfig'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: Token列表
items:
$ref: '#/components/schemas/RtcToken'
# ==================== 文件管理 ====================
/openapi/open/file/uploadToDisk:
post:
tags: [文件管理]
summary: 文件上传到云盘
description: 上传文件到云盘
operationId: uploadFileToDisk
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
file:
type: string
format: binary
description: 文件
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/FileInfo'
/openapi/open/file/disk/list:
post:
tags: [文件管理]
summary: 文件列表
description: 分页查询云盘文件列表
operationId: getFileDiskList
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PaginationRequest'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
total:
type: integer
description: 总数
list:
type: array
description: 文件列表
items:
$ref: '#/components/schemas/FileInfo'
# ==================== 应用管理 ====================
/openapi/open/app/upload:
post:
tags: [应用管理]
summary: 应用上传
description: 上传APK应用文件
operationId: uploadApp
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
file:
type: string
format: binary
description: APK文件
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
$ref: '#/components/schemas/AppInfo'
/openapi/open/app/list:
post:
tags: [应用管理]
summary: 应用列表
description: 分页查询应用列表
operationId: getAppList
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PaginationRequest'
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
total:
type: integer
description: 总数
list:
type: array
description: 应用列表
items:
$ref: '#/components/schemas/AppInfo'
/openapi/open/pad/installApp:
post:
tags: [应用管理]
summary: 应用安装
description: 在实例上安装应用
operationId: installApp
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [apps]
properties:
apps:
type: array
description: 应用列表
items:
type: object
required: [appId, padCodes]
properties:
appId:
type: integer
format: int64
description: 应用ID
appName:
type: string
description: 应用名称
pkgName:
type: string
description: 应用包名
isGrantAllPerm:
type: boolean
description: 是否授予全部权限
default: true
padCodes:
type: array
description: 实例编码列表
items:
type: string
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 安装任务列表
items:
$ref: '#/components/schemas/AppOperationTask'
/openapi/open/pad/startApp:
post:
tags: [应用管理]
summary: 应用启动
description: 启动实例上的应用
operationId: startApp
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [padCodes, pkgName]
properties:
padCodes:
type: array
description: 实例编码列表
items:
type: string
pkgName:
type: string
description: 应用包名
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 启动任务列表
items:
$ref: '#/components/schemas/AppOperationTask'
# ==================== 回调管理 ====================
/openapi/open/config/selectList:
get:
tags: [回调管理]
summary: 查询支持的回调类型
description: 获取系统支持的所有回调类型
operationId: getCallbackTypes
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 回调类型列表
items:
$ref: '#/components/schemas/CallbackType'
/openapi/open/config/insertCallback:
post:
tags: [回调管理]
summary: 新增回调地址配置
description: 配置接收异步任务回调的URL
operationId: insertCallback
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [callbackIdList, callbackUrl]
properties:
callbackIdList:
type: array
description: 回调类型ID集合(从查询支持的回调类型接口获取)
items:
type: integer
format: int64
callbackUrl:
type: string
description: 接收任务回调配置URL
format: uri
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: integer
description: 配置成功type数量
# ==================== 镜像管理 ====================
/openapi/open/image/queryImageList:
post:
tags: [镜像管理]
summary: 获取镜像列表
description: 分页查询系统镜像列表
operationId: getImageList
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [pageNum, pageSize]
properties:
pageNum:
type: integer
description: 页码
minimum: 1
pageSize:
type: integer
description: 每页条数
minimum: 1
maximum: 100
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
total:
type: integer
description: 总数
records:
type: array
description: 镜像列表
items:
$ref: '#/components/schemas/ImageInfo'
# ==================== 账户管理 ====================
/openapi/open/subCustomer/batchAdd:
post:
tags: [账户管理]
summary: 批量新增子账户
description: 批量创建子账户 (1-30个)
operationId: batchAddSubCustomer
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [addDTOList]
properties:
addDTOList:
type: array
description: 子账号参数列表
minItems: 1
maxItems: 30
items:
type: object
required: [customerAccount, customerName, customerTel]
properties:
customerAccount:
type: string
description: 账号
customerName:
type: string
description: 名称
customerTel:
type: string
description: 联系电话
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: array
description: 子账户信息列表
items:
$ref: '#/components/schemas/SubCustomerInfo'
/openapi/open/subCustomer/pageList:
post:
tags: [账户管理]
summary: 子账户列表分页查询
description: 分页查询子账户列表
operationId: getSubCustomerList
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PaginationRequest'
- type: object
properties:
status:
type: integer
description: 启用状态 (0禁用, 1启用)
enum: [0, 1]
customerAccount:
type: string
description: 客户账号
customerTel:
type: string
description: 客户电话
responses:
'200':
description: 成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
allOf:
- $ref: '#/components/schemas/PaginationResponse'
- type: object
properties:
pageData:
type: array
items:
$ref: '#/components/schemas/SubCustomerInfo'
# ==================== Components ====================
components:
securitySchemes:
ArmCloudV2Auth:
type: apiKey
in: header
name: x-sign
description: |
ArmCloud V2.0 签名验证
每个请求必须包含以下请求头:
- authver: "2.0"
- x-ak: 您的AccessKey
- x-timestamp: 毫秒时间戳
- x-sign: HMAC-SHA256签名(小写)
签名计算: HMAC-SHA256(timestamp + path + body, SecretKey).toLowerCase()
schemas:
# ==================== 通用响应结构 ====================
StandardResponse:
type: object
required: [code, msg, ts]
properties:
code:
type: integer
description: 状态码 (200表示成功)
example: 200
msg:
type: string
description: 响应消息
example: "success"
ts:
type: integer
format: int64
description: 时间戳
example: 1704067200000
description: 标准响应结构
PaginationRequest:
type: object
required: [page, rows]
properties:
page:
type: integer
description: 页码
minimum: 1
example: 1
rows:
type: integer
description: 每页条数
minimum: 1
maximum: 1000
example: 10
description: 分页请求参数
PaginationResponse:
type: object
properties:
page:
type: integer
description: 当前页
rows:
type: integer
description: 每页数量
total:
type: integer
description: 总记录数
pageData:
type: array
description: 数据列表
items:
type: object
description: 分页响应结构
# ==================== 板卡相关 ====================
Device:
type: object
properties:
id:
type: integer
description: 板卡ID
deviceLevel:
type: string
description: 云机实例级别
deviceCode:
type: string
description: 物理机编号
deviceOutCode:
type: string
description: 外部物理机编码
deviceStatus:
type: integer
description: 物理机状态 (0离线, 1在线)
enum: [0, 1]
deviceIp:
type: string
description: 物理机IP
idc:
type: integer
description: 外部机房编码
armServerCode:
type: string
description: ARM服务器编码
createBy:
type: string
description: 创建者
createTime:
type: string
description: 创建时间
padAllocationStatus:
type: integer
description: 实例分配状态
clusterCode:
type: string
description: 集群code
macAddress:
type: string
description: MAC地址
initStatus:
type: string
description: 初始化状态 (0失败, 1成功, 2中)
cbsInfo:
type: string
description: 板卡CBS信息
nodeId:
type: string
description: 刀片ID
position:
type: string
description: 卡槽位置
gateway:
type: string
description: 板卡网关
description: 板卡信息
ComputeUsage:
type: object
properties:
customerId:
type: integer
format: int64
description: 客户ID
customerAccount:
type: string
description: 客户账号
usedCompute:
type: integer
format: int64
description: 已使用算力数量
totalCompute:
type: integer
format: int64
description: 总算力数量
description: 算力使用情况
DeviceRestartTask:
type: object
properties:
taskId:
type: integer
description: 任务ID
deviceIp:
type: string
description: 物理设备IP
errorMsg:
type: string
description: 失败原因
deviceOutCode:
type: string
description: 云机编号
description: 板卡重启任务
WarmupImage:
type: object
properties:
customerId:
type: integer
format: int64
description: 客户ID
customerAccount:
type: string
description: 客户账号
customerName:
type: string
description: 客户名称
imageId:
type: string
description: 镜像ID
imageVersion:
type: string
description: 镜像版本
imageDesc:
type: string
description: 镜像描述
supportF2fs:
type: integer
description: 是否支持f2fs (1支持, 0不支持)
enum: [0, 1]
fileTag:
type: integer
description: 文件标签 (1可删除, 0不能删除)
enum: [0, 1]
androidVersion:
type: integer
description: 安卓版本
description: 预热镜像信息
# ==================== 网存2.0相关 ====================
CreateNetStorageV2Request:
type: object
required: [clusterCode, specificationCode, imageId, screenLayoutCode, number, storageSize]
properties:
clusterCode:
type: string
description: 集群代码
specificationCode:
type: string
description: 规格代码
imageId:
type: string
description: 镜像ID
screenLayoutCode:
type: string
description: 屏幕布局代码
number:
type: integer
description: 实例数量
minimum: 1
maximum: 100
storageSize:
type: integer
description: 存储大小(GB)
enum: [4, 8, 16, 32, 64, 128, 256]
dns:
type: string
description: DNS服务器地址
randomADITemplates:
type: boolean
description: 是否随机ADI模板
excludeRealPhoneTemplateIds:
type: array
description: 随机ADI时排除的模板ID列表
items:
type: integer
format: int64
realPhoneTemplateId:
type: integer
description: ADI模板ID
groupId:
type: integer
description: 分组ID (默认公共池)
description: 创建网存2.0实例请求
NetStorageInstance:
type: object
properties:
padCode:
type: string
description: 实例编号
screenLayoutCode:
type: string
description: 屏幕布局编号
netStorageResId:
type: string
description: 网存code
deviceLevel:
type: string
description: 实例规格
clusterCode:
type: string
description: 集群编号
description: 网存实例信息
BatchBootOnRequest:
type: object
required: [padCodes]
properties:
padCodes:
type: array
description: 需要开机的实例编码列表 (1-200个)
minItems: 1
maxItems: 200
items:
type: string
dns:
type: string
description: DNS配置
countryCode:
type: string
description: 国家编码 (仅首次开机生效,默认SG)
default: "SG"
androidProp:
type: object
description: 安卓改机属性 (时区/语言/国家目前不生效)
additionalProperties: true
timeout:
type: integer
description: 超时时间(秒)
minimum: 300
maximum: 7200
imageId:
type: string
description: 镜像ID (支持开机时更换,仅支持同版本镜像)
description: 批量开机请求
BatchOperationResult:
type: object
properties:
successList:
type: array
description: 操作成功列表 (异步回调结果需等待回调)
items:
type: object
properties:
taskId:
type: integer
description: 任务ID
padCode:
type: string
description: 实例编码
vmStatus:
type: integer
description: 实例状态
failList:
type: array
description: 操作失败列表 (业务校验不通过)
items:
type: object
properties:
padCode:
type: string
description: 实例编码
errCode:
type: string
description: 错误码
errMsg:
type: string
description: 失败原因
description: 批量操作结果
NetStorageDetail:
type: object
properties:
padCode:
type: string
description: 实例编码
deviceCode:
type: string
description: 板卡编号
deviceLevel:
type: string
description: 实例规格
clusterCode:
type: string
description: 集群code
vmStatus:
type: integer
description: 实例状态 (0离线, 1在线)
enum: [0, 1]
imageId:
type: string
description: 镜像ID
imageVersion:
type: string
description: 镜像版本
storageSize:
type: integer
description: 存储大小(GB)
screenLayoutCode:
type: string
description: 屏幕布局code
netStorageResId:
type: string
description: 网存code
taskId:
type: integer
description: 任务ID
groupId:
type: integer
description: 分组ID
description: 网存实例详情
# ==================== 实例管理相关 ====================
WifiConfig:
type: object
properties:
SSID:
type: string
description: WiFi名称
BSSID:
type: string
description: 接入点MAC地址
MAC:
type: string
description: WiFi网卡MAC地址
IP:
type: string
description: WiFi网络IP
gateway:
type: string
description: WiFi网关
description: WiFi配置信息
TaskResult:
type: object
properties:
taskId:
type: integer
format: int64
description: 任务ID
padCode:
type: string
description: 实例编码
vmStatus:
type: integer
description: 实例状态
taskStatus:
type: integer
description: 任务状态
description: 任务结果
VideoStreamConfig:
type: object
properties:
resolution:
type: string
description: 分辨率
example: "1920x1080"
frameRate:
type: string
description: 帧率
example: "30"
bitrate:
type: string
description: 码率
example: "2000"
description: 视频流配置
RtcToken:
type: object
properties:
padCode:
type: string
description: 实例ID
roomToken:
type: string
description: Token
roomCode:
type: string
description: 房间号
appId:
type: string
description: 应用ID
signalServer:
type: string
description: 信令地址(AES GCM模式解密)
stuns:
type: string
description: stuns地址(AES GCM模式解密)
turns:
type: string
description: turns地址(AES GCM模式解密)
msg:
type: string
description: 错误信息
description: RTC Token信息
# ==================== 文件管理相关 ====================
FileInfo:
type: object
properties:
fileUniqueId:
type: string
description: 文件唯一ID
fileName:
type: string
description: 文件名
fileSize:
type: integer
format: int64
description: 文件大小(字节)
description: 文件信息
# ==================== 应用管理相关 ====================
AppInfo:
type: object
properties:
id:
type: integer
format: int64
description: 应用ID
appId:
type: integer
format: int64
description: 应用ID
appName:
type: string
description: 应用名称
packageName:
type: string
description: 应用包名
versionName:
type: string
description: 版本名称
versionCode:
type: string
description: 版本号
description: 应用信息
AppOperationTask:
type: object
properties:
taskId:
type: integer
format: int64
description: 任务ID
padCode:
type: string
description: 实例编码
vmStatus:
type: integer
description: 实例状态
taskStatus:
type: integer
description: 任务状态
description: 应用操作任务
# ==================== 回调管理相关 ====================
CallbackType:
type: object
properties:
id:
type: integer
format: int64
description: 回调类型ID
callbackType:
type: string
description: 回调类型
callbackName:
type: string
description: 回调类型名称
description: 回调类型信息
# ==================== 镜像管理相关 ====================
ImageInfo:
type: object
properties:
imageId:
type: string
description: 镜像ID
imageVersion:
type: string
description: 镜像版本
imageDesc:
type: string
description: 镜像描述
androidVersion:
type: integer
description: 安卓版本
description: 镜像信息
# ==================== 账户管理相关 ====================
SubCustomerInfo:
type: object
properties:
id:
type: integer
format: int64
description: 子账户主键ID
customerAccount:
type: string
description: 子账户登录账号
customerName:
type: string
description: 子账户名称
customerTel:
type: string
description: 子账户电话
password:
type: string
description: 子账户登录密码
accessKeyId:
type: string
description: 子账户AK
secretAccessKey:
type: string
description: 子账户SK
status:
type: integer
description: 启用状态 (0禁用, 1启用)
enum: [0, 1]
errorMsg:
type: string
description: 错误信息
description: 子账户信息
# ==================== 通用响应 ====================
responses:
SuccessResponse:
description: 操作成功
content:
application/json:
schema:
$ref: '#/components/schemas/StandardResponse'
ErrorResponse:
description: 错误响应
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
code:
type: integer
description: 错误码
example: 110028
msg:
type: string
description: 错误信息
example: "实例不存在"
StsTokenResponse:
description: SDK Token响应
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/StandardResponse'
- type: object
properties:
data:
type: object
properties:
token:
type: string
description: SDK通信token