跳转到内容

动作接口

说明

本页由企业版 OpenAPI 文档整理,模块:自动化接口/动作

开关小白点

POST /openapi/setAssistiveTouch

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"open": false
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"open": False
}
r = requests.post("http://127.0.0.1:8019/openapi/setAssistiveTouch", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» openbodybooleantrue 代表打开小白点 false代表关闭小白点

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

模拟打字输入

POST /openapi/typingText

EC IOS 6.1.0

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"content": "hello"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"content": "hello"
}
r = requests.post("http://127.0.0.1:8019/openapi/typingText", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» contentbodystring内容

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

点击坐标

POST /openapi/clickPoint

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"x":300,
"y":100
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"x": 300,
"y": 100
}
r = requests.post("http://127.0.0.1:8019/openapi/clickPoint", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备id
» xbodyintegerx坐标
» ybodyintegery坐标

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

双击坐标

POST /openapi/doubleClickPoint

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"x":300,
"y":100
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"x": 300,
"y": 100
}
r = requests.post("http://127.0.0.1:8019/openapi/doubleClickPoint", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备id
» xbodyintegerx坐标
» ybodyintegery坐标

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

长按坐标

POST /openapi/longClickPoint

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"x":300,
"y":100,
"duration":1000
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"x": 300,
"y": 100,
"duration": 1000
}
r = requests.post("http://127.0.0.1:8019/openapi/longClickPoint", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备id
» xbodyintegerx坐标
» ybodyintegery坐标
» durationbodyinteger持续时长 单位 毫秒

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

滑动

POST /openapi/swipeToPoint

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"startX":300,
"startY":700,
"endX":300,
"endY":10,
"duration":1000
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"startX": 300,
"startY": 700,
"endX": 300,
"endY": 10,
"duration": 1000
}
r = requests.post("http://127.0.0.1:8019/openapi/swipeToPoint", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» startXbodyinteger起始X坐标
» startYbodyinteger起始Y坐标
» endXbodyinteger终点X坐标
» endYbodyinteger终点Y坐标
» durationbodyinteger持续时长 单位毫秒

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

长按

POST /openapi/press

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"x":300,
"y":100,
"duration":1000
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"x": 300,
"y": 100,
"duration": 1000
}
r = requests.post("http://127.0.0.1:8019/openapi/press", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» xbodyintegerx坐标
» ybodyintegerY坐标
» durationbodyinteger持续时长 单位毫秒

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

多点触摸

POST /openapi/multiTouch

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"finger1": [
{
"action": 0,
"x": 500,
"y": 200,
"pointer": 1,
"delay": 1
}, {
"action": 2,
"x": 500,
"y": 200,
"pointer": 1,
"delay": 20
}, {
"action": 2,
"x": 500,
"y": 300,
"pointer": 1,
"delay": 20
}
],
"finger2": [
{
"action": 0,
"x": 500,
"y": 200,
"pointer": 2,
"delay": 1
}, {
"action": 2,
"x": 500,
"y": 200,
"pointer": 2,
"delay": 20
}, {
"action": 2,
"x": 500,
"y": 300,
"pointer": 2,
"delay": 20
}
],
"finger3": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 3,
"delay": 1
}, {
"action": 2,
"x": 300,
"y": 200,
"pointer": 3,
"delay": 201
}, {
"action": 2,
"x": 400,
"y": 300,
"pointer": 3,
"delay": 201
}
],
"finger4": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 4,
"delay": 1
}, {
"action": 2,
"x": 300,
"y": 200,
"pointer": 4,
"delay": 201
}, {
"action": 2,
"x": 400,
"y": 300,
"pointer": 4,
"delay": 201
}
],
"finger5": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 5,
"delay": 1
}, {
"action": 2,
"x": 300,
"y": 200,
"pointer": 5,
"delay": 201
}, {
"action": 2,
"x": 400,
"y": 300,
"pointer": 5,
"delay": 201
}
]
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"finger1": [
{
"action": 0,
"x": 500,
"y": 200,
"pointer": 1,
"delay": 1
},
{
"action": 2,
"x": 500,
"y": 200,
"pointer": 1,
"delay": 20
},
{
"action": 2,
"x": 500,
"y": 300,
"pointer": 1,
"delay": 20
}
],
"finger2": [
{
"action": 0,
"x": 500,
"y": 200,
"pointer": 2,
"delay": 1
},
{
"action": 2,
"x": 500,
"y": 200,
"pointer": 2,
"delay": 20
},
{
"action": 2,
"x": 500,
"y": 300,
"pointer": 2,
"delay": 20
}
],
"finger3": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 3,
"delay": 1
},
{
"action": 2,
"x": 300,
"y": 200,
"pointer": 3,
"delay": 201
},
{
"action": 2,
"x": 400,
"y": 300,
"pointer": 3,
"delay": 201
}
],
"finger4": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 4,
"delay": 1
},
{
"action": 2,
"x": 300,
"y": 200,
"pointer": 4,
"delay": 201
},
{
"action": 2,
"x": 400,
"y": 300,
"pointer": 4,
"delay": 201
}
],
"finger5": [
{
"action": 0,
"x": 200,
"y": 200,
"pointer": 5,
"delay": 1
},
{
"action": 2,
"x": 300,
"y": 200,
"pointer": 5,
"delay": 201
},
{
"action": 2,
"x": 400,
"y": 300,
"pointer": 5,
"delay": 201
}
]
}
r = requests.post("http://127.0.0.1:8019/openapi/multiTouch", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» finger1body[object]手指1
»» actionbodyinteger按下为0,弹起为1,移动为2
»» xbodyintegerX坐标
»» ybodyintegerY坐标
»» pointerbodyinteger设置第几个手指触摸点,分别是 1,2,3等,代表第n个手指
»» delaybodyinteger该动作延迟多少毫秒执行,这个是值当前这个事件先延迟后执行
» finger2body[object]手指2
»» actionbodyintegernone
»» xbodyintegernone
»» ybodyintegernone
»» pointerbodyintegernone
»» delaybodyintegernone
» finger3body[object]手指3
»» actionbodyintegernone
»» xbodyintegernone
»» ybodyintegernone
»» pointerbodyintegernone
»» delaybodyintegernone
» finger4body[object]手指4
»» actionbodyintegernone
»» xbodyintegernone
»» ybodyintegernone
»» pointerbodyintegernone
»» delaybodyintegernone
» finger5body[object]手指5
»» actionbodyintegernone
»» xbodyintegernone
»» ybodyintegernone
»» pointerbodyintegernone
»» delaybodyintegernone

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

输入文本

POST /openapi/inputText

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"content":"6a290cdc0b6db0565955355b157acc090e33f76e",
"duration":1000
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"content": "6a290cdc0b6db0565955355b157acc090e33f76e",
"duration": 1000
}
r = requests.post("http://127.0.0.1:8019/openapi/inputText", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» contentbodystring内容
» durationbodyinteger持续时间单位毫秒

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

模拟键盘

POST /openapi/ioHIDEvent

模拟人机交互,例如键盘输入和快捷键,具体健值请看 http://ieasyclick.com/iosdocs/#/zh-cn/advance/keyboard

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"eventPageID": "0x0C",
"delay": 0.2,
"eventUsageID": "0x40"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"eventPageID": "0x0C",
"delay": 0.2,
"eventUsageID": "0x40"
}
r = requests.post("http://127.0.0.1:8019/openapi/ioHIDEvent", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» eventPageIDbodystring人机交互类型
» eventUsageIDbodystring人机交互值
» delaybodynumber持续时间单位毫秒

返回示例

200 Response

{"code":0,"data":true}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» databooleantruenonenone

运行App

POST /openapi/appLaunch

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"rn.notes.best"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "rn.notes.best"
}
r = requests.post("http://127.0.0.1:8019/openapi/appLaunch", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» bundleIdbodystring包名

返回示例

200 Response

{
"code": 0,
"data": 312,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» dataintegertruenone进程pid
» msgstringtruenone错误消息

打开App

POST /openapi/openApp

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"rn.notes.best"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "rn.notes.best"
}
r = requests.post("http://127.0.0.1:8019/openapi/openApp", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» bundleIdbodystring包名

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

安装App

POST /openapi/installApp

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"com.cctv.yangshipin.app.iphone",
"path":"/Users/ub/Downloads/央视频_2.4.3.ipa"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "com.cctv.yangshipin.app.iphone",
"path": "/Users/ub/Downloads/央视频_2.4.3.ipa"
}
r = requests.post("http://127.0.0.1:8019/openapi/installApp", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» bundleIdbodystring包名
» pathbodystring要安装的ipa本机路径

返回示例

200 Response

{
"code": 0,
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» datastringtruenoneok 代表成功

卸载App

POST /openapi/uninstallApp

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"com.cctv.yangshipin.app.iphone"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "com.cctv.yangshipin.app.iphone"
}
r = requests.post("http://127.0.0.1:8019/openapi/uninstallApp", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» bundleIdbodystring包名

返回示例

200 Response

{
"code": 0,
"data": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» datastringtruenoneok 代表成功

关闭App

POST /openapi/stopApp

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"rn.notes.best"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "rn.notes.best"
}
r = requests.post("http://127.0.0.1:8019/openapi/stopApp", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» bundleIdbodystring包名

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

杀死进程

POST /openapi/appKillByBundleId

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId":"rn.notes.best"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"bundleId": "rn.notes.best"
}
r = requests.post("http://127.0.0.1:8019/openapi/appKillByBundleId", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystringnone
» bundleIdbodystringnone

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

主页

POST /openapi/home

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/home", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

重启设备

POST /openapi/reboot

适合版本 EC iOS 3.5.0+

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/reboot", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

强制进入主页

POST /openapi/homeScreen

适配版本EC iOS中控 3.0.0+,包含解锁屏幕功能

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/homeScreen", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

屏幕是否锁定

POST /openapi/isLocked

适配版本EC iOS中控 3.0.0+

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/isLocked", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

锁定屏幕

POST /openapi/lockScreen

适配版本EC iOS中控 3.0.0+

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/lockScreen", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

解锁屏幕

POST /openapi/unlockScreen

适配版本EC iOS中控 3.0.0+, 不能设置屏幕有密码、手势等

请求 Body

{
"deviceId":"6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/unlockScreen", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

设置屏幕方向

POST /openapi/setOrientation

支持EC iOS中控 3.0.0+

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"orientation": 1
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"orientation": 1
}
r = requests.post("http://127.0.0.1:8019/openapi/setOrientation", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» orientationbodyinteger方向 1 正常的竖屏,2 向右旋转90度(顺时针)

返回示例

200 Response

{
"code": 0,
"data": true,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» databooleantruenonetrue 成功 false 失败
» msgstringtruenone错误消息

获取屏幕方向

POST /openapi/getOrientation

支持EC iOS中控 3.0.0+

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e"
}
r = requests.post("http://127.0.0.1:8019/openapi/getOrientation", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID

返回示例

200 Response

{
"code": 0,
"data": 0,
"msg": "string"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone0 成功 其他失败
» dataintegertruenone方向 1 正常的竖屏,2 向右旋转90度(顺时针)
» msgstringtruenone错误消息

校正屏幕坐标系

POST /openapi/adjustScreenOrientation

支持EC iOS中控 3.0.0+

请求 Body

{
"deviceId": "51",
"orientation": 37
}

请求示例

import requests
body = {
"deviceId": "51",
"orientation": 37
}
r = requests.post("http://127.0.0.1:8019/openapi/adjustScreenOrientation", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» orientationbodyinteger0 自动校正坐标系 1 强制竖屏坐标系,2 强制向右旋转90度(顺时针)坐标系

返回示例

200 Response

{"code":0,"data":{"orientation":1,"screenWidth":750,"screenHeight":1334}}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenonenone
» dataobjecttruenonenone
»» orientationintegertruenone1 强制竖屏坐标系,2 强制向右旋转90度(顺时针)坐标系
»» screenWidthintegertruenone当前屏幕宽度
»» screenHeightintegertruenone当前屏幕高度

抓取节点

POST /openapi/dumpXml

支持EC iOS中控 3.0.0+

请求 Body

{
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"visibleFilter": "1",
"labelFilter": "1",
"maxDepth": "50",
"excludedAttributes": "visible,enabled"
}

请求示例

import requests
body = {
"deviceId": "6a290cdc0b6db0565955355b157acc090e33f76e",
"visibleFilter": "1",
"labelFilter": "1",
"maxDepth": "50",
"excludedAttributes": "visible,enabled"
}
r = requests.post("http://127.0.0.1:8019/openapi/dumpXml", json=body, timeout=30)
print(r.json())

请求参数

名称位置类型必选中文名说明
bodybodyobjectnone
» deviceIdbodystring设备ID
» visibleFilterbodystring1 代表不管visible是true还是false都获取,2 代表只获取 visible=true的节点
» labelFilterbodystring1 代表不管label是否有值都获取,2 代表只获取label有值的节点
» maxDepthbodystringmaxDepth 代表要获取节点的层级,越少速度越快,建议 1 - 500
» excludedAttributesbodystring不包含的属性节点,多个用英文逗号隔开

返回示例

200 Response

<?xml version="1.0" encoding="UTF-8" ?>

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构