Skip to content

4.容器

1. 创建容器

接口地址:/v2/instance/create

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.18.0

callbackUrl 由 v1.19.0 版本提供

接口描述:

调度到已申请的板卡上创建容器,创建数量代表板卡数量,实际创建容器数量=板卡数量*开数 单次最大创建数量环境依据配置而定,默认为200;60 分钟内创建完成

环境变量格式要求:支持的字符包含字母(大写和小写)、数字和下划线_,且必须以字母或下划线开头。最长为100字符。 业务规则: 1、 支持以AIC_开头的环境变量, 创建容器时以docker create参数带进去此环境变量,容器启动时发现以AIC_开头的环境变量,则会转化为属性。 特别说明: 1)Android 系统中属性键(key)的最大长度是 32 个字符。这是系统硬编码的限制,超过该长度的键将无法正常设置属性。 2) 属性值(value)的最大长度是 92 个字符。同样,这也是系统硬编码的限制,若设置的值超过该长度,系统会截断超出部分。 2、系统保留环境变量,不允许设置。 3、以AIC_开头的保留环境变量,不允许配置。

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目Id body false string 默认当前用户的默认项目
nodeUuid 节点 uuid body true string
armCardOfferingUuid 板卡计算规格 uuid body true string 通过 获取板卡计算规格 接口获取
os 系统 body true string 例如:Android
osVersion 系统版本 body true string 例如 "10"
createType 创建策略 body false integer 1:随机调度 2:指定板卡 [默认 随机调度]
snList 板卡 SN列表 body false list 列表长度不能超过200。当createType=2时,列表不能为空
offeringUuid 容器计算规格 uuid body true string 容器规格默认有分辨率、横竖屏、刷新率和屏幕密度,通过容器计算规格获取
layoutUuid 屏幕布局UUID body false string 通过 容器屏幕布局列表 接口获取。不为空时,替换容器规格对应的分辨率、横竖屏、刷新率和屏幕密度
imageId 镜像 id body true string
networkUuid 业务网络 uuid body false string 支持多个业务网络,多个用,隔开,networkUuid 与subnetUuid不可同时指定,不填则由系统随机选择。
subnetUuid 业务子网 uuid body false string 支持多个子网 , 多个用,隔开,networkUuid 与subnetUuid不可同时指定,不填则由系统随机选择。
num 创建板卡数量 body true integer 最大200。且满足:1. num <= [4.12 获取可创建容器的板卡数量]; 2. num * 开数 <= [4.13 获取可用的ip数量]
tagIds 标签 body false List<integer>
environment 环境变量 body false object 键值对。总个数不超过20,键值长度不超过100
root 是否 root body false integer 0:否 1:是 [默认 否]
stopStatus 创建后是否关机,默认不关机 body false boolean true为关机,false为不关机
instanceLimit 容器数量超额(0:不超额,1:超额,默认不超额) body false integer 当超额为“1”,表示该容器所在板卡上创建的容器总数>开数,此时容器启动数量将受限,不得超过板卡允许的最大数量(即开数)当超额为“0”,表示该容器所在板卡上创建的容器总数=开数。
instanceLimitNum 板卡创建容器数量 body false integer 当instanceLimit为限额时,此字段必填,需大于容器规格开数level,小于等于板卡规格最大容器数量instanceLimitMax
storeType 存储类型 body false integer 存储类型:1.本地盘,2.云盘 (默认选中本地盘 存储类型为云盘的容器,需要挂载云盘后,才可启动)
idGenerateType 容器ID生成规则 body false integer 默认:节点-16位uuid;1.节点-16位uuid;2.32位uuid,3.前缀-16位uuid
prefix 容器ID前缀 body false string 当idGenerateType为3时,此字段必填,最多10个字符,只支持:数字、字母、短横线-、下划线_
callbackUrl 通知回调地址 body false string POST请求

请求示例:

POST "/openapi/v2/instance/create"
body:
{
    "projectId":"7b5a664173f526309e43faf775f09d1d",
    "nodeUuid":"81f62329436eed8f36d0595bf81b63db",
    "armCardOfferingUuid":"f64a987692a711ef9b070242ac12000d",
    "os":"Android",
    "osVersion":"10",
    "createType":1,
    "snList":["ORG2M32QC2J231400077"],
    "offeringUuid":"6d6e456aecdb9d4a89c1712e8f7fc759",
    "layoutUuid":"6197fc3d5e1140028cb18159b096247a",
    "imageId":"192.168.130.241:3734/7b5a664173f526309e43faf775f09d1d/img-1728651639344:latest",
    "networkUuid":"943da341eede495282278cd06ccd1623",
    "num":1,
    "tagIds":[200,257],
    "root":0,
    "stopStatus":true,
    "idGenerateType":3,
    "prefix":"abc",
    "callbackUrl": "http://127.0.0.1/notice"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 list<object>
  jobs 任务结果 list<object>
    jobId 任务ID string
    code 任务提交状态码 integer 对应响应状态码表
    message 任务提交描述 string
    uuid 板卡 uuid string
    sn 板卡 SN string
    projectId 项目id string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "e1d8895789114132a568a85873f35625",
                "code": 200,
                "sn": "OR65T31QC2D221000072",
                "message": "success",
                "uuid": "0b4294e92763a79283def0e83bb9303a",
                "projectId": "7b5a664173f526309e43faf775f09d1d"
            }
        ]
    },
    "timestamp": 1734679127799,
    "traceId": "E20241220151847733892"
}

2. 删除容器

接口地址:/v1/arm/card/apply/destroy/container

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.18.0

callbackUrl 由 v1.19.0 版本提供

接口描述:

删除板卡的容器

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
nodeUuid 节点 uuid body true string
batchMap 板卡uuid/板卡名称 键值对 body true object
uuids 板卡uuid列表 body false List
callbackUrl 通知回调地址 body false string POST请求

请求示例

POST "/openapi/v1/arm/card/apply/destroy/container"
body:
{
    "batchMap":{
        "a438e3d6a5d57083385fb6ee21c267fc":"fjz-api-1"
    },
    "uuids": ["a438e3d6a5d57083385fb6ee21c267fc"],
    "nodeUuid":"81f62329436eed8f36d0595bf81b63db",
    "callbackUrl": "http://127.0.0.1/notice"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 object
  jobs 任务结果 list<object>
    jobId 任务ID string
    code 任务提交状态码 integer 对应响应状态码表
    message 任务提交描述 string
    uuid 容器 uuid string
    sn 板卡 SN string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "9bc83f3703f245d2a8f98f39f560dbae",
                "code": 200,
                "sn": "OR65T31QC2D221000019",
                "message": "success",
                "uuid": "95b0cd8b672235f49224679a298f7bc8"
            }
        ]
    },
    "timestamp": 1730188041492,
    "traceId": "E20241029154721445265"
}

3. 容器分页列表

接口地址:/v2/instance/page/list

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

接口描述:

分页查询容器,返回容器镜像,分辨率等数据

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目Id body false string 默认当前用户的默认项目
nodeUuids 节点uuid列表 body false List<String>
armCardSns 板卡 SN body false List<String> 指定板卡 SN查询,最多200个
instanceUuids 容器uuid列表 body false List<String>
hardModels 计算型号 --计划下线 body false List<String>
imageNames 镜像名称 body false List<String>
levels 开数 body false List 1 - 40
instanceOfferingUuids 容器规格uuid body false List 指定容器规格进行筛选,5.1接口获取
tagNames 标签名称 body false string 多个用逗号隔开
instanceLimits 容器数量超额 body false List 当超额为“1”,表示该容器所在板卡上创建的容器总数>开数,此时容器启动数量将受限,不得超过板卡允许的最大数量(即开数)当超额为“0”,表示该容器所在板卡上创建的容器总数=开数。
storeTypes 存储类型 body false List 存储类型:1.本地盘、2.云盘
pageNum 当前页码 body false integer 默认 1
pageSize 当前页面数据量 body false integer 默认 10

请求示例,实际请求请替换参数值:

POST "/openapi/v2/instance/page/list"
body:
{
    "instanceUuids": [
        "132322",
        "132322"
    ],
    "pageNum": 1,
    "pageSize": 10,
    "projectId": "project_admin"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 IPage<object>
  records 当前页的数据列表 list<object>
    uuid 计算容器 uuid string
    name 容器名称 string
    armCardUuid 板卡 uuid string
    armCardSn 板卡 SN string
    armCardIp 板卡 IP string
    imageId 镜像ID string 初始化镜像ID
    imageUuid 镜像UUID string
    imageName 镜像名称 string
    cceImage 容器当前镜像 string 当前容器实际镜像
    ip IP string 容器ip
    mac mac地址 string
    dns DNS string
    gateway 网关 string
    businessStatus 业务状态 integer
    status 容器状态 integer 详见1.9.1
    enableStatus 可用状态 boolean false:不可用 true:可用
    delStatus 删除状态 boolean false:正常 true:已删除
    resolution 分辨率 string 720x1280
    orientation 旋转方向 integer 0:竖屏 1:横屏
    refreshRate 刷新率 integer 30~60之间整数
    root 是否root integer 0:否 1:是
    networkMode 网络模式 string
    envVariable 环境变量 string
    cceId 容器ID string 64位字符串
    ccePorts 暴露端口组 string 板卡ip:端口映射到容器内端口
    cceStatus cce 运行状态 string 运行中:Up 已退出:Exit 未知:UnKnow
    level 开数 integer 1 - 40 开
    osVersion 容器镜像的操作系统 string Android 10 Android 13
    gameImageId 游戏镜像id string
    properties 属性 string
    areaUuid 区域 uuid string
    areaName 区域名称 string
    nodeUuid 节点 uuid string
    nodeName 节点名称 string
    nodeIp 节点ip string
    nodePort 节点端口 string
    armServerUuid 服务器 uuid string
    armServerName 服务器名称 sting
    hostIp 宿主 IP 地址 string
    hostUuid 宿主 UUID string
    projectId 项目id string
    remark 备注 string
    instanceOffering 计算规格对象 object
      uuid 计算规格 uuid integer
hardwareCode 容器计算规格 --计划下线 string 例如:Orion865_3C_4G
      name 名称 string
      level 开数 integer 1 - 40 开
      remark 备注 string
instanceOfferingName 容器规格 string 例如:一开-限存储 - 8vCPU - 12GB内存 - 175GB
    tagNames 标签 list
    dnat DNAT IP列表 list
      ip 内网IP string
      port 内网端口号 integer
      publicIp 公网IP string
      publicPort 公网端口号 integer
      protocol 协议 string
      isp 运营商 string
      idc 机房 string
    snat SNAT IP 列表 list
      publicIp 公网IP string
      isp 运营商 string
    createTime 创建时间 string
    updateTime 更新时间 string
    instanceLimit 容器数量超额 integer 当超额为“1”,表示该容器所在板卡上创建的容器总数>开数,此时容器启动数量将受限,不得超过板卡允许的最大数量(即开数)当超额为“0”,表示该容器所在板卡上创建的容器总数=开数。
    stopStatus 容器停止状态 boolean true:停止,false:启动
    natType NAT类型 integer 1-全锥型, 2-DNAT, 3-全锥型+DNAT, 0-未配置
    storeType 存储类型 integer 存储类型:1.本地盘、2.云盘
    displayLayout 屏幕布局 string
  total 总记录数 integer
  current 当前页码 integer
  pages 总页数 integer
  size 每页显示条数 integer
traceId 请求处理ID string
timestamp 时间戳 integer(int64)

响应示例:

{
    "message": "操作成功!",
    "code": 200,
    "result": {
        "records": [
            {
                "uuid": "nashan1-edzbbck35fbfp942",
                "areaUuid": "a8a4c72bb116e765d079e93c174e5b03",
                "areaName": "sz",
                "armServerName": "sz_nashan1_s-eb95057e3f1cb4aad656a9fb6492963f",
                "armServerUuid": "s-eb95057e3f1cb4aad656a9fb6492963f",
                "armCardUuid": "fa9ce25ee8c6f457ba8cfc29ac5689b5",
                "armCardId": "OR65Q61QC2D240402561",
                "armCardSn": "OR65Q61QC2D240402561",
                "nodeUuid": "1ddf1365dac9137cf77d6d0142ff7251",
                "nodeName": "nashan1",
                "armCardIp": "172.31.1.29",
                "name": "ZQtest_Auto-3-i3",
                "level": 3,
                "ip": "10.255.1.99",
                "cceId": "3051536e6c6714f72850cb8b0d7468a80e9077b5e77a7a1a49cbfbaa06614177",
                "cceImage": "orion865-android_10:img-1732526889678",
                "ccePorts": "",
                "cceStatus": "Up",
                "status": 2,
                "enableStatus": true,
                "delStatus": false,
                "createTime": "2025-07-03 16:37:34",
                "updateTime": "2025-07-03 16:37:34",
                "imageId": "orion865-android_10:img-1732526889678",
                "imageUuid": "ba9d06f249dd4cd39b56c81ac1ef60da",
                "imageName": "865_A10",
                "resolution": "1080x1920",
                "orientation": 0,
                "refreshRate": 60,
                "root": null,
                "networkMode": "macvlan",
                "envVariable": null,
                "remark": null,
                "hostIp": "172.31.1.29",
                "hostUuid": "fa9ce25ee8c6f457ba8cfc29ac5689b5",
                "mac": "06:8a:90:0a:6b:f3",
                "dns": null,
                "gateway": "10.255.0.1",
                "nodeIp": "192.168.40.88",
                "nodePort": "80",
                "gameImageId": null,
                "projectId": null,
                "businessStatus": 2,
                "osVersion": "Android 10",
                "properties": null,
                "instanceOffering": {
                    "uuid": "86e93b78d47f11efa27fd67956f2361b",
                    "name": "Orion865",
                    "remark": "三开-限存储",
                    "level": 3,
                    "hardwareCode": "Orion865_3C_4G",
                    "instanceOfferingName": "一开-限存储 | 8vCPU |12GB内存 | 175GB"
                },
                "tagNames": [
                    "电信公网IP"
                ],
                "dnat": [
                    {
                        "ip": "10.255.1.99",
                        "port": 10101,
                        "publicIp": "14.17.100.66",
                        "publicPort": 20512,
                        "protocol": "udp",
                        "isp": "电信",
                        "idc": "广州机房"
                    }
                ],
                "snat": [
                    {
                    "publicIp": "192.168.3.99",
                    "isp": "电信"
                    }
                ],
                "instanceLimit": 1,
                "stopStatus": false,
                "natType": 0,
                "storeType": 1,
                "displayLayout": "{\"height\":1920,\"pixelDensity\":320,\"refreshRate\":60,\"uuid\":\"cdd2c57c45a111f0bfdd0242ac12000d\",\"weight\":1080}"
            }
        ],
        "total": 1,
        "current": 1,
        "pages": 1,
        "size": 10
    },
    "timestamp": 1751597826079,
    "traceId": "C20250704105706079185"
}

4. 容器详情

接口地址:/v2/instance/details/{uuid}

请求方式:GET

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

接口描述:

查询单个容器详情,含容器镜像,分辨率,暴露端口等

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
uuid 容器 uuid path true string 单个容器

请求示例,实际请求请替换参数值:

POST "/openapi/v2/instance/details/qs-253-pqbe87m5fbzvutie"

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 object
  uuid 容器 uuid string
  name 容器名称 string
  ip ip string
  mac mac地址 string
  dns dns string
  gateway 网关 string
  tagNames 标签 List<string>
  armServerUuid 服务器 uuid string
  armServerName 服务器名称 string
  areaUuid 区域 uuid string
  areaName 区域名称 string
  nodeUuid 节点 uuid string
  nodeName 节点名称 string
  armCardUuid 板卡 uuid string
  armCardSn 板卡 SN string
  armCardIp 板卡 IP string
  level 计算规格 integer 1 - 40 开
  envVariable 环境变量 string
  ports 端口组 string
  resolution 分辨率 string 720x1280
  orientation 旋转方向 integer 0:竖屏 1:横屏
  refreshRate 刷新率 integer 30~60之间整数
  networkMode 网络模式 string bridge;macvlan
  imageId 镜像ID string
  imageName 镜像名称 string
  cceId 容器ID string
  cceImage docker创建使用镜像 string
  cceStatus cce 运行状态 string 运行中:Up;已退出:Exit;未知:UnKnow
  createStatus 创建状态 integer 0:待创建 1:创建成功,2:创建失败
  enableStatus 启用状态 boolean false:停用 true:启用
  status 容器状态 integer 详见1.9.1
  createTime 创建时间 string
  updateTime 最后修改时间 string
  remark 备注 string
  osVersion 容器镜像的操作系统 string Android 10 Android 13
  instanceOffering 计算规格对象 object
    uuid 计算规格uuid string
    name 名称 string
instanceOfferingName 容器规格 string 例如:一开-限存储 - 8vCPU - 12GB内存 - 175GB
hardwareCode 容器计算规格 --计划下线 string
    remark 备注 string
    level 计算规格 integer 1 - 40 开
  dnat DNAT IP列表 list
    ip 内网IP string
    port 内网端口号 integer
    publicIp 公网IP string
    publicPort 公网端口号 integer
    protocol 协议 string
    isp 运营商 string
  snat SNAT IP列表 list
    publicIp 公网IP string
    isp 运营商 string
  instanceLimit 容器数量超额 integer 当超额为“1”,表示该容器所在板卡上创建的容器总数>开数,此时容器启动数量将受限,不得超过板卡允许的最大数量(即开数)当超额为“0”,表示该容器所在板卡上创建的容器总数=开数。
  natType NAT类型 integer 1-全锥型, 2-DNAT, 3-全锥型+DNAT, 0-未配置
  storeType 存储类型 integer 存储类型:1.本地盘、2.云盘
  displayLayout 屏幕布局 string
  mounts 云盘挂载信息 list
    cloudDriveUuid 云盘uuid string
traceId 请求处理ID string
timestamp 时间戳 integer(int64)

响应示例:

{
  "message": "操作成功",
  "code": 200,
  "result": {
    "armServerUuid": "s-8c2c9cca5853789031ac60d332a2bdfd",
    "uuid": "qs-fs-pre-bmjf5xy6ieq9fvuw",
    "resolution": "720x1280",
    "dnat": null,
    "areaName": "华南",
    "refreshRate": 30,
    "instanceOffering": {
      "level": 4,
      "hardwareCode": "Orion865_2C_4G",
      "name": "Orion865",
      "remark": "四开-限存储",
      "uuid": "86e9f4a3d47f11efa27fd67956f2361b",
      "instanceOfferingName": "一开-限存储 | 8vCPU |12GB内存 | 175GB"
    },
    "armCardSn": "OR65M62QC2D242400557",
    "networkMode": "macvlan",
    "cceId": "f7930793fa41fa89ec2eaa8f9132cfe3e826a5495c54cd5dceff6752f154403a",
    "imageId": "img-1743489439031:latest",
    "imageName": "20250401-api",
    "level": 4,
    "ip": "10.20.2.37",
    "dns": null,
    "nodeUuid": "beb95a81559b894a92c9f1bb13c7aeba",
    "name": "hf_auto_test-9-i4",
    "envVariable": null,
    "armCardUuid": "0511f641304a4c82f4ab67bfa4cc5a74",
    "enableStatus": true,
    "status": 2,
    "nodeName": "qs-fs-pre",
    "cceStatus": "Up",
    "remark": null,
    "mac": "ec:ad:be:c0:b8:cc",
    "tagNames": [
      "HF自动化测试专用-勿动"
    ],
    "armCardIp": "172.30.0.36",
    "osVersion": "Android 10",
    "areaUuid": "f2a584df5e91724a94a31a4a68b5dcd0",
    "orientation": 0,
    "updateTime": "2025-08-21 16:27:52",
    "armServerName": "华南_qs-fs-pre_s-01cde1e2894191fd5bc05764f5318a19",
    "createTime": "2025-08-21 16:27:52",
    "cceImage": "img-1743489439031:latest",
    "snat": [
      {
        "isp": "电信",
        "publicIp": "192.168.4.110"
      }
    ],
    "gateway": "10.20.2.1",
    "instanceLimit": 0,
    "natType": 0,
    "storeType": 1,
    "displayLayout": "{\"height\":1920,\"pixelDensity\":320,\"refreshRate\":60,\"uuid\":\"cdd2c57c45a111f0bfdd0242ac12000d\",\"weight\":1080}",
    "mounts": [
            {
                "cloudDriveUuid": "3e25ec2f7103483b8abc8e3cde49ebca"
            },
            {
                "cloudDriveUuid": "088234e7fbd149b0945d6428913577be"
            }
        ]
  },
  "timestamp": 1755765048991,
  "traceId": "E20250821163048991023"
}

5. 重启容器

接口地址:/v2/instance/restart

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

callbackUrl 由 v1.7.4 版本提供

接口描述:

批量重启容器接口

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
instanceUuids 容器 uuid body true list 单条或多条容器数据
callbackUrl 通知回调地址 body false string POST请求

请求示例:

POST "/openapi/v2/instance/restart"
body:
{
    "instanceUuids": ["348504568b904b7eb64264e488a2f79d","ae674f4546c74bf48c00c211334f214a"]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 List
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  message 任务提交描述 string
  uuid 容器uuid string
  command 指令 string
  nodeUuid 节点UUID string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": [
        {
            "jobId": "fb3e172cbbc847e6ba18bdd991b79e72",
            "code": 200,
            "message": "success",
            "uuid": "348504568b904b7eb64264e488a2f79d",
            "command": "restartInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        },
        {
            "jobId": "1e3388fddf3e4c1496fa109986c05383",
            "code": 200,
            "message": "success",
            "uuid": "ae674f4546c74bf48c00c211334f214a",
            "command": "restartInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        }
    ],
    "timestamp": 1691369821823,
    "traceId": "E75320230807085701790"
}

6. 启动容器

接口地址:/v2/instance/start

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

callbackUrl 由 v1.7.4 版本提供

接口描述:

批量启动容器接口(启动容器会新增校验板卡上启动的容器数量是否超过开数)

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
instanceUuids 容器 uuid body true list 单条或多条容器数据
callbackUrl 通知回调地址 body false string POST请求

请求示例:

POST "/openapi/v2/instance/start"
body:
{
    "instanceUuids": ["21f8ec0beadc46b0bd0a437e7a74ea14","2256ed29c9f7464aaac65cacb2843e12"]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 List
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  message 任务提交描述 string
  uuid 容器uuid string
  command 指令 string
  nodeUuid 节点UUID string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": [
        {
            "jobId": "f07e77c4dcd04359b56730dbd7d1162e",
            "code": 200,
            "message": "success",
            "uuid": "21f8ec0beadc46b0bd0a437e7a74ea14",
            "command": "startInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        },
        {
            "jobId": "610d31b12f58487b884775078682427c",
            "code": 200,
            "message": "success",
            "uuid": "2256ed29c9f7464aaac65cacb2843e12",
            "command": "startInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        }
    ],
    "timestamp": 1691369668713,
    "traceId": "E75020230807085428674"
}

7. 停止容器

接口地址:/v2/instance/stop

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

callbackUrl 由 v1.7.4 版本提供

接口描述:

批量停止容器接口

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
instanceUuids 容器 uuid body true list 单条或多条容器数据
callbackUrl 通知回调地址 body false string POST请求

请求示例:

POST "/openapi/v2/instance/stop"
body:
{
    "instanceUuids": ["f4d2fccea3e341dcba0bf0d6ec40455e"]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 List
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  message 任务提交描述 string
  uuid 容器 uuid string
  command 指令 string
  nodeUuid 节点UUID string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": [
        {
            "jobId": "406f1720dc7b4fbda540ad48206628ee",
            "code": 200,
            "message": "success",
            "uuid": "f4d2fccea3e341dcba0bf0d6ec40455e",
            "command": "stopInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        }
    ],
    "timestamp": 1691372308394,
    "traceId": "E76220230807093828363"
}

8. 重置容器

接口地址:/v2/instance/reset

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

callbackUrl 由 v1.7.4 版本提供

接口描述:

批量重置容器接口,清空data分区

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
instanceUuids 容器 uuid body true list 单条或多条容器数据
appPersistedType 预安装应用保留策略,默认0 body false integer 0: 全部清理, 1: 保留应用, 清理应用数据
callbackUrl 通知回调地址 body false string POST请求
请求示例:
POST "/openapi/v2/instance/reset"
body:
{
    "instanceUuids": ["348504568b904b7eb64264e488a2f79d","ae674f4546c74bf48c00c211334f214a"]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 List
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  message 任务提交描述 string
  uuid 容器uuid string
  command 指令 string
  nodeUuid 节点UUID string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "code": 0,
    "message": "操作成功",
    "result":[
        {
            "jobId": "b59b5f35f7d743d3ad740b8df05277bf",
            "code": 200,
            "message": "success",
            "uuid": "ae674f4546c74bf48c00c211334f214a",
            "command": "resetInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        },
        {
            "jobId": "b59b5f35f7d743d3ad740b8df05274f3",
            "code": 50003,
            "message": "容器未找到",
            "uuid": "348504568b904b7eb64264e488a2f79d",
            "command": "resetInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        }  
    ],
    "timestamp": 1749452586155,
    "traceId": "C20250609150306154764"
}

9. 容器镜像升级

接口地址:/v2/instance/upgradeImage

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.1.1

callbackUrl 由 v1.7.4 版本提供

接口描述:

批量容器镜像升级

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
instanceUuids 容器 uuid body true list 单条或多条容器数据
imageId 镜像ID body true string
wipeData 是否清除容器数据(data分区) body true boolean true清除;false不清除
callbackUrl 通知回调地址 body false string POST请求
statusStartType 容器启动类型 body false integer 0:启动(默认选项)1:保持原(启动/停止)状态

请求示例:

POST "/openapi/v2/instance/upgradeImage"
body:
{
    "imageId": "qsandroid:1.0.78",
    "wipeData": false,
    "instanceUuids": [
        "f4d2fccea3e341dcba0bf0d6ec40455e","ae674f4546c74bf48c00c211334f214a"
    ]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 object
jobs 任务结果 list<object>
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  message 任务提交描述 string
  uuid 容器 uuid string
  command 指令 string
  nodeUuid 节点 uuid string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "code": 0,
    "message": "操作成功",
    "result": [
        {
            "jobId": "b59b5f35f7d743d3ad740b8df05277bf",
            "code": 200,
            "message": "success",
            "uuid": "ae674f4546c74bf48c00c211334f214a",
            "command": "upgradeImageInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        },
        {
            "jobId": "b59b5f35f7d743d3ad740b8df05274f3",
            "code": 50003,
            "message": "容器未找到",
            "uuid": "f4d2fccea3e341dcba0bf0d6ec40455e",
            "command": "upgradeImageInstance",
            "nodeUuid": "7a3eacab1939fefec0c1998e37d87ae2"
        }  
    ],
    "timestamp": 1749452601305,
    "traceId": "C20250609150321303778"
}

10. 设置限速

接口地址: /v1/arm/card/apply/network/limit

请求方式: POST

请求数据类型: application/json

响应数据类型: */*,application/json

支持版本: v1.19.0

接口描述:

批量设置板卡/容器限速

请求参数

参数名称 参数说明 位置 是否必须 数据类型 描述
uuids 板卡或容器 uuid 集合 body true list 批量操作
type 类型 body true integer 1:板卡;2:容器
txLimit 上行带宽(Mbps) body false integer 范围:0~10000。0或不传参数为不限速
rxLimit 下行带宽(Mbps) body false integer 范围:0~10000。0或不传参数为不限速
callbackUrl 通知回调地址 body false string

请求示例,实际请求请替换参数值:

POST "/openapi/v1/arm/card/apply/network/limit"
body:
{
    "callbackUrl": "https://baidu.com",
    "rxLimit": 0,
    "txLimit": 50,
    "type": 1,
    "uuids": [
        "35cdb073f6b143c27193cda1b1f5223f"
    ]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 object
jobs 任务结果 list<object>
  jobId 任务ID string
  code 任务提交状态码 integer 对应响应状态码表
  sn 板卡sn string
  message 任务提交描述 string
  uuid 资源 uuid string 板卡uuid或者容器uuid
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "jobs": [
            {
                "jobId": "d33cf1faf04d46118e6863d67d4a5790",
                "code": 200,
                "sn": "OR65M22QC2D221101036",
                "message": "success",
                "uuid": "35cdb073f6b143c27193cda1b1f5223f"
            }
        ]
    },
    "timestamp": 1735635597561,
    "traceId": "C20241231165957548043"
}

11. 查询限速

接口地址: /v1/arm/card/apply/query/network/limit

请求方式: POST

请求数据类型: application/json

响应数据类型: */*,application/json

支持版本: v1.19.0

接口描述:

批量查询板卡/容器限速

请求参数

参数名称 参数说明 位置 是否必须 数据类型 描述
uuids 板卡或容器 uuid 集合 body true list 批量操作
type 类型 body true integer 1:板卡;2:容器

请求示例,实际请求请替换参数值:

POST "/openapi/v1/arm/card/apply/query/network/limit"
body:
{
    "type": 1,
    "uuids": [
        "35cdb073f6b143c27193cda1b1f5223f"
    ]
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 object
  list 任务结果 list<object>
    uuid uuid string
      txLimit 上行带宽(Mbps) integer
      rxLimit 下行带宽(Mbps) integer
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "list": {
            "2de6e9a68cd46c09a600a6e4ea70f6cb": {
                "rxLimit": 0,
                "txLimit": 0
            }
        }
    },
    "timestamp": 1736494048934,
    "traceId": "C20250110152728934900"
}

12. 增量同步容器列表

接口地址:/v2/instance/sync

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v2.0.0

接口描述:

根据时间基线与id基线,指定数量同步容器数据变更记录

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目Id body true string 指定项目id同步数据
timeLine 时间基线,大于等于该时间的数据才会返回 body true long
uuid uuid基线,由于存在相同时间的数据,按照uuid排序用于跳过已经同步的数据 body false string
ticketId 请求单号 body true string 会在返回内容里面带上
pageSize 批量大小 body false integer 单次返回最大请求数据量,默认10

请求示例:

POST "/openapi/v2/instance/sync"
body:
{
  "timeLine":1742288362249,
  "pageSize":3,
  "uuid": "nashan-ggca3oneqdqkr2vv",
  "ticketId":"xxxxxx",
  "projectId":"7b5a664173f526309e43faf775f09d1d",
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
success 成功标志 boolean
result 返回数据对象 list<object>
  records 当前页的数据列表 list<object>
    uuid 计算容器 uuid string
    name 容器名称 string
    armCardId 板卡 SN string
    armCardSn 板卡 SN string
    armCardIp 板卡 IP string
    imageId 镜像ID string 创建容器的初始化镜像
    imageUuid 镜像UUID string
    cceImage 容器当前镜像 string 有镜像升级该值会变为当前镜像
    ip ip string
    mac mac地址 string
    dns dns string
    gateway 网关 string
    businessStatus 业务状态 integer
    status 容器状态 integer 详见1.9.1
    enableStatus 可用状态 boolean false:不可用 true:可用
    delStatus 删除状态 boolean false:正常 true:已删除
    resolution 分辨率 string 720x1280
    orientation 旋转方向 integer 0:竖屏 1:横屏
    refreshRate 刷新率 integer 30~60之间整数
    root 是否root integer 0:否 1:是
    networkMode 网络模式 string
    envVariable 环境变量 string
    cceId 容器ID string 64位字符串
    ccePorts 暴露端口组 string 板卡ip:端口映射到容器内端口
    cceStatus cce 运行状态 string 运行中:Up 已退出:Exit 未知:UnKnow
    level 计算规格 integer 1 - 7 开
    areaUuid 区域 uuid string
    areaName 区域名称 string
    nodeUuid 节点 uuid string
    nodeName 节点名称 string
    armServerUuid 服务器 uuid string
    armServerName 服务器名称 sting
    armCardUuid 板卡 uuid string
    hostIp 宿主 IP 地址 string
    hostUuid 宿主 UUID string
    remark 备注 string
    osVersion 容器镜像的操作系统 string Android 10 Android 13
    tagNames 标签 List<string>
    dnat DNAT IP列表 list
      ip 内网IP string
      port 内网端口号 integer
      publicIp 公网IP string
      publicPort 公网端口号 integer
      protocol 协议 string
      isp 运营商 string
      idc 机房 string
    createTime 创建时间 string
    instanceOffering 计算规格对象 object
      uuid 计算规格 uuid integer
      name 名称 string
      remark 备注 string
instanceOfferingName 容器规格 string 例如:一开-限存储 - 8vCPU - 12GB内存 - 175GB
hardwareCode 容器计算规格 --计划下线 string
      level 计算规格 integer 1 - 7 开
    updateTime 更新时间 string
    nodeIp 节点ip string
    nodePort 节点端口 string
    gameImageId 游戏镜像id string
    properties 属性 string
    instanceLimit 容器数量超额 integer 当超额为“1”,表示该容器所在板卡上创建的容器总数>开数,此时容器启动数量将受限,不得超过板卡允许的最大数量(即开数)当超额为“0”,表示该容器所在板卡上创建的容器总数=开数。
    stopStatus 容器停止状态 boolean true:停止,false:启动
    natType NAT类型 integer 1-全锥型, 2-DNAT, 3-全锥型+DNAT, 0-未配置
    storeType 存储类型 integer 存储类型:1.本地盘、2.云盘
    displayLayout 屏幕布局 string
  timeLine 本批数据最大时间 long
  uuid 本批数据最后的容器UUID string
  ticketId 请求单号 string
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
  "message": "操作成功!",
  "code": 200,
  "result": {
    "records": [
      {
        "uuid": "qs-fs-pre-s9rf5snjhh97b8a1",
        "areaUuid": "f2a584df5e91724a94a31a4a68b5dcd0",
        "areaName": "华南",
        "armServerName": "华南_qs-fs-pre_s-8c2c9cca5853789031ac60d332a2bdfd",
        "armServerUuid": "s-8c2c9cca5853789031ac60d332a2bdfd",
        "armCardUuid": "46b635c9669ee824db9f19d64cca8c4e",
        "armCardId": "OR65M62QC2D242406460",
        "armCardSn": "OR65M62QC2D242406460",
        "nodeUuid": "beb95a81559b894a92c9f1bb13c7aeba",
        "nodeName": "qs-fs-pre",
        "armCardIp": "172.30.0.57",
        "name": "hf_auto_test-10-i2",
        "level": 4,
        "ip": "10.20.2.67",
        "cceId": "7d3632807bbd004f4086e76b9210f8da1c24e22343e945b7bac558ac2aae2efd",
        "cceImage": "img-1743489439031",
        "imageName": "20250401-api",
        "ccePorts": "",
        "cceStatus": "Up",
        "status": 6,
        "enableStatus": true,
        "delStatus": false,
        "createTime": "2025-08-21 16:27:54",
        "updateTime": "2025-08-21 16:31:25",
        "imageId": "img-1743489439031:latest",
        "imageUuid": "bf78f87b27d64cc88ad70b0cbe4dda16",
        "resolution": "720x1280",
        "orientation": 0,
        "refreshRate": 30,
        "root": null,
        "networkMode": "macvlan",
        "envVariable": null,
        "remark": null,
        "hostIp": "172.30.0.57",
        "hostUuid": "46b635c9669ee824db9f19d64cca8c4e",
        "mac": "48:17:8f:bb:de:8d",
        "dns": null,
        "gateway": "10.20.2.1",
        "nodeIp": "10.21.0.10",
        "nodePort": "80",
        "gameImageId": "",
        "projectId": null,
        "businessStatus": 6,
        "osVersion": "Android 10",
        "properties": null,
        "instanceLimit": 1,
        "stopStatus": false,
        "natType":1,
        "storeType":1,
        "displayLayout": "{\"height\":1920,\"pixelDensity\":320,\"refreshRate\":60,\"uuid\":\"cdd2c57c45a111f0bfdd0242ac12000d\",\"weight\":1080}",
        "instanceOffering": {
          "uuid": "86e9f4a3d47f11efa27fd67956f2361b",
          "name": "Orion865",
          "remark": "四开-限存储",
          "level": 4,
          "hardwareCode": "Orion865_2C_4G",
          "instanceOfferingName": "一开-限存储 | 8vCPU |12GB内存 | 175GB"
        },
        "tagNames": [
          "HF自动化测试专用-勿动"
        ],
        "dnat": [
          {
            "ip": "10.255.1.99",
            "port": 10101,
            "publicIp": "14.17.100.66",
            "publicPort": 20512,
            "protocol": "udp",
            "isp": "电信",
            "idc": "广州机房"
          }
        ],
        "snat": [
          {
            "publicIp": "192.168.4.110",
            "isp": "电信"
          }
        ]
      }
    ],
    "timeLine": 1755765085287,
    "uuid": "qs-fs-pre-s9rf5snjhh97b8a1",
    "ticketId": "1755765046889"
  },
  "timestamp": 1755765088019,
  "traceId": "C20250821163128019156"
}

13. 容器ssh连接信息

接口地址: /v2/instance/ssh-info

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.19.0

接口描述:

获取容器ssh连接信息

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
uuid 容器uuid body true string 容器uuid
liveTime 连接有效时间 body true integer 连接有效时间,单位:秒,范围:[1, 86400]

请求示例,实际请求请替换参数值:

POST "/openapi/v2/instance/ssh-info"
body:
{
  "uuid":1742288362249,
  "liveTime":86400
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer
message 返回处理消息 string
result 返回数据对象 list<object>
  type 连接目标操作系统 integer 1为android,2为debain
  uuid 容器uuid string integer android容器uuid
  sshCommand 连接命令 string
  host 连接地址 string
  port 连接端口 integer
  username 连接用户名 string
  sshPwd 连接密码 string
  expireTime 过期时间戳 long 单位ms
timestamp 时间戳 integer
traceId 请求处理ID string

响应示例:

{
  "message": "操作成功!",
  "code": 200,
  "result": {
    "type": 1,
    "uuid": "nashan1-0i5thpnoliqyjnwy",
    "sshCommand": "ssh 10.255.1.13_22_1_1752133964400@192.168.40.86 -p 2226",
    "sshPwd": "eyJtZXRhIjoiZXlKdVlXMWxJam9pWVdSdGFXNGlMQ0owZVhCbElqb2lNVEFpZlE9PSIsInNpZ24iOiJ3VXFMcHRFRmFaVFQ0TmVZRHBiclJBPT0ifQ==",
    "expireTime": 1752133964400,
    "host": "192.168.40.86",
    "port": 2226,
    "username": "10.255.1.13_22_1_1752133964400"
  },
  "timestamp": 1752047564479,
  "traceId": "C20250709155244479102"
}

14. 可创建容器的板卡数量(创建容器使用)

接口地址: /v1/arm/card/apply/available/apply/num

请求方式: POST

请求数据类型: application/json

响应数据类型: */*,application/json

支持版本: v1.18.0

接口描述:

获取可创建容器的板卡数量

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目id body false string 默认当前用户的默认项目
nodeUuid 节点 uuid body true string
offeringUuid 板卡规格uuid body true string 通过 获取板卡计算规格 接口获取
snList 板卡 SN列表 body false list
storageIsolation 是否需要存储隔离 body false boolean 默认false,即不需要存储隔离支持

请求示例

POST "/openapi/v1/arm/card/apply/available/apply/num"
body:
{
    "nodeUuid":"81f62329436eed8f36d0595bf81b63db",
    "projectId":"7b5a664173f526309e43faf775f09d1d",
    "offeringUuid":"f64a987692a711ef9b070242ac12000d"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 object
  applyNum 可创建容器的板卡数 integer(int32)
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "applyNum": 5
    },
    "timestamp": 1730201010116,
    "traceId": "E20241029192330116567"
}

15. 可用的ip数量(创建容器使用) 计划下线

接口地址: /v1/arm/card/apply/available/ip/num

请求方式: POST

请求数据类型: application/json

响应数据类型: */*,application/json

支持版本: v1.18.0

接口描述:

获取可创建容器的ip数量

用于创建容器时判断ip池是否满足容器数量

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
nodeUuid 节点 uuid body true string
subnetUuid 子网uuid body true string 支持多个网段,用逗号隔开

请求示例

POST "/openapi/v1/arm/card/apply/available/ip/num"
body:
{
    "nodeUuid":"81f62329436eed8f36d0595bf81b63db",
    "subnetUuid":"943da341eede495282278cd06ccd1623"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 object
  ipNum 可用ip数 integer(int32)
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
    "message": "操作成功",
    "code": 200,
    "result": {
        "ipNum": 5
    },
    "timestamp": 1730201010116,
    "traceId": "E20241029192330116567"
}

16. 获取业务网络与子网(创建容器使用)

接口地址: /v1/network/list

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v1.7.4

接口描述:

获取项目下指定节点的业务网络及其子网

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目Id body false string 默认当前用户的默认项目
nodeUuid 节点 uuid body true string 查询节点下网络

请求示例,实际请求请替换参数值:

POST "/openapi/v1/network/list"
body:
{
    "nodeUuid":"161d73a7470b797fec133df3b5bbf20b"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 list<object>
  networkUuid 网络 uuid string
  name 网络名称 string
  ipv4 ipv4 string
  cidr cidr前缀长度 string
  ipv4Cidr ipv4Cidr string
  dns1 dns1 string
  dns2 dns2 string
  gateway 网关 string
  vlan vlan integer
  subnetCount 子网数量 integer 网络下所创建的子网数量
  availableIpTotal 业务网子网可用 IP 总量 integer 业务网子网可用 IP 总量
  natType NAT类型 integer 1-全锥型, 2-DNAT, 3-全锥型+DNAT, 0-未配置
  subnets 子网列表 list<object>
    subnetUuid 子网 uuid string
    ipv4 ipv4 string
    cidr cidr前缀长度 string 网段类型时有值
    ipv4Cidr ipv4Cidr string 网段类型时有值
    startIp startIp string ip范围类型时有值
    endIp endIp string ip范围类型时有值
    gateway 网关地址 string
    availableNum 子网可用 IP 数量 integer
timestamp 时间戳 integer(int64)
traceId 请求处理ID string

响应示例:

{
  "message": "操作成功!",
  "code": 200,
  "result": [
    {
      "networkUuid": "3c81e61a35de401bv076bdb0d6675ee3",
      "name": "business1",
      "ipv4": "10.255.0.0",
      "cidr": "25",
      "ipv4Cidr": "10.255.0.0/25",
      "dns1": "8.8.8.8",
      "dns2": "114.114.114.114",
      "vlan": 101,
      "gateway": "10.255.0.1",
      "subnetCount": 3,
      "availableIpTotal": 8,
      "natType":1,
      "subnets": [
        {
          "subnetUuid": "943da341eede495282278cd06ccd1623",
          "ipv4": "10.255.0.0",
          "cidr": "29",
          "ipv4Cidr": "10.255.0.0/29",
          "gateway": "10.255.0.1",
          "availableNum": 3,
          "startIp": null,
          "endIp": null
        },
        {
          "subnetUuid": "64e261771e8a43edb27e70f7185c9702",
          "ipv4": "10.255.0.10",
          "cidr": null,
          "ipv4Cidr": null,
          "gateway": "10.255.0.1",
          "availableNum": 2,
          "startIp": "10.255.0.10",
          "endIp": "10.255.0.69"
        },
        {
          "subnetUuid": "091e0e26816945029c00adf463f8e73d",
          "ipv4": "10.255.0.70",
          "cidr": null,
          "ipv4Cidr": null,
          "gateway": "10.255.0.1",
          "availableNum": 3,
          "startIp": "10.255.0.70",
          "endIp": "10.255.0.127"
        }
      ]
    }
  ],
  "timestamp": 1736499769597,
  "traceId": "C20250110170249597948"
}

17. 容器屏幕布局列表

接口地址:/v1/layout/page/list

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v2.4.0

接口描述:

容器屏幕布局列表

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
projectId 项目Id body false string 默认当前用户的默认项目

请求示例:

POST "/openapi/v1/layout/page/list"
body:
{
    "projectId": "b4302f88b4f46b5e434b999eda2483db"
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 IPage«区域信息»
  records 当前页的数据列表 list<object>
    uuid 布局UUID string
    name 布局名称 string
    weight 宽度 integer 单位:px
    height 高度 integer 单位:px
    pixelDensity 像素密度 integer 单位:dpi
    refreshRate 屏幕刷新率 integer 单位:fps
    projectId 项目Id string project_pubilc:默认布局
其他:自定义布局
    createTime 创建时间 string
    updateTime 更新时间 string
  total 总记录数 integer
  current 当前页码 integer
  pages 总页数 integer
  size 每页显示条数 integer
timestamp 时间戳 integer(int64)
traceId 请求处理ID boolean

响应示例:

{
    "message": "操作成功!",
    "code": 200,
    "result": {
        "records": [
            {
                "uuid": "c0e226e745a111f0bfdd0242ac12000d",
                "name": "ID1",
                "projectId": "project_public",
                "createTime": "2025-06-13 12:58:16",
                "updateTime": "2025-06-13 12:58:16",
                "weight": 720,
                "height": 1280,
                "pixelDensity": 320,
                "refreshRate": 30
            },
            {
                "uuid": "c9a17ece45a111f0bfdd0242ac12000d",
                "name": "ID2",
                "projectId": "project_public",
                "createTime": "2025-06-13 12:58:16",
                "updateTime": "2025-06-13 12:58:16",
                "weight": 1280,
                "height": 720,
                "pixelDensity": 320,
                "refreshRate": 30
            },
            {
                "uuid": "cdd2c57c45a111f0bfdd0242ac12000d",
                "name": "ID3",
                "projectId": "project_public",
                "createTime": "2025-06-13 12:58:16",
                "updateTime": "2025-06-13 12:58:16",
                "weight": 1080,
                "height": 1920,
                "pixelDensity": 320,
                "refreshRate": 60
            },
            {
                "uuid": "cfa7b8c745a111f0bfdd0242ac12000d",
                "name": "ID4",
                "projectId": "project_public",
                "createTime": "2025-06-13 12:58:16",
                "updateTime": "2025-06-13 12:58:16",
                "weight": 1920,
                "height": 1080,
                "pixelDensity": 320,
                "refreshRate": 60
            }
        ],
        "total": 4,
        "current": 1,
        "pages": 1,
        "size": 10
    },
    "timestamp": 1750044687220,
    "traceId": "C20250616113127220345"
}

18. 板卡上容器启停状态列表

接口地址:/v2/instance/stopStatus/list

请求方式:POST

请求数据类型:application/json

响应数据类型:*/*,application/json

支持版本:v2.7.0

接口描述:

分页查询容器启停状态,返回容器对应启停状态

请求参数:

参数名称 参数说明 位置 是否必须 数据类型 描述
armCardSns 板卡 SN body false List<String> 指定板卡 SN查询,最多200个
pageNum 当前页码 body false integer 默认 1
pageSize 当前页面数据量 body false integer 默认 10

请求示例,实际请求请替换参数值:

POST "/openapi/v2/instance/stopStatus/list"
body:
{
    "armCardSns": [
        "132322",
        "132322"
    ],
    "pageNum": 1,
    "pageSize": 10
}

响应参数:

参数名称 参数说明 类型 描述
code 返回代码 integer(int32)
message 返回处理消息 string
result 返回数据对象 IPage<object>
  records 当前页的数据列表 list<object>
    sn 板卡sn string
    uuid 计算容器 uuid string
    stopStatus 容器停止状态 boolean true:停止,false:启动
  total 总记录数 integer
  current 当前页码 integer
  pages 总页数 integer
  size 每页显示条数 integer
traceId 请求处理ID string
timestamp 时间戳 integer(int64)

响应示例:

{
    "message": "操作成功!",
    "code": 200,
    "result": {
        "records": [
            {
                "sn": "OR65Q61QC2D240402563",
                "uuid": "c0e226e745a111f0bfdd0242ac12000a",
                "stopStatus": true
            },
            {
                "sn": "OR65Q61QC2D240402564",
                "uuid": "c0e226e745a111f0bfdd0242ac12000c",
                "stopStatus": true
            }
        ],
        "total": 1,
        "current": 1,
        "pages": 1,
        "size": 10
    },
    "timestamp": 1751597826079,
    "traceId": "C20250704105706079185"
}