获取列表
最近更新:2025-04-18 19:02:56
获取列表
const getList = async () => {
const res = await bc.env.getList(1, 10);
if (res.code === 200) {
console.log(res.data.list);
} else {
console.log("获取列表失败");
}
};
请求参数
{
"page": 1,
"pageSize": 10,
"sessionIds": []
}
返回值
status 实例状态( 1:运行中 2:停止/空闲 3:启动中 4:停止中 8:已过期 9:终止删除)
{
"reqId": "b87eb34b-8d2b-42bc-875c-a56ed5d8375d",
"code": 200,
"msg": "OK",
"data": {
"list": [
{
"id": 6,
"apiKey": "7fe752d6369745e4affb4c645e4faba2",
"sessionId": "7fe752d6369745e4affb4c645e4faba2",
"sessionName": "local",
"keepalive": -1,
"keepaliveTimeout": -1,
"productId": "hztest",
"cloudId": "fcd1d3f39cba4a94b95d255c4e5efd64",
"browserUrl": "ws://192.168.0.99:8182?sessionId=7fe752d6369745e4affb4c645e4faba2&apiKey=7fe7
52d6369745e4affb4c645e4faba2",
"status": 2,
"healthy": 1,
"expiredType": 1,
"expired": 0,
"totalDuration": 14045,
"duration": 0,
"clientNum": 15,
"info": null,
"browser": {
"system": "Windows 11",
"publicIp": "127.0.0.1",
"kernel": "chrome",
"kernelVersion": "127",
"proxy": {
"protocol": "",
"host": "",
"port": 0,
"userName": "",
"password": ""
}
},
"country": "CN",
"city": "CN"
}
],
"total": 6,
"pageSize": 10,
"currentPage": 1
}
}