Get display list
Request method and path
html
POST http://localhost:[post]/openapi/app/all-displays?ticket=[OpenApiToken]
Interface function description
This interface is used to get a list of monitors that the computer is currently connected to.
Request parameter
Header Request Data
name | value | required | type | Explanation |
---|---|---|---|---|
Content-Type | application/json | Y | String | application/json |
Request parameter example
Successful Response Example
json
{
"code": "00000",
"message": "Success",
"data": {
"status": "success",
"errorCode": "",
"errorMsg": "",
"result": {
"displays": [
{
"id": 1,
"label": "内建视网膜显示器",
"scaleFactor": 2,
"size": {
"width": 1512,
"height": 982
},
"workArea": {
"x": 0,
"y": 38,
"width": 1512,
"height": 859
},
"workAreaSize": {
"width": 1512,
"height": 859
}
},
{
"id": 2,
"label": "MateView",
"scaleFactor": 2,
"size": {
"width": 1920,
"height": 1280
},
"workArea": {
"x": 0,
"y": -1255,
"width": 1920,
"height": 1255
},
"workAreaSize": {
"width": 1920,
"height": 1255
}
}
]
}
}
}
Failed to call interface
When the interface response status code is not '00000', the interface call fails.
The specific interface call Reason for error can be queried by viewing the Interface Response Status Code Information Comparison Table.
json
{
"code": "00001",
"message": "产生未知错误,请反馈给官方客服!",
"data": {}
}