获取资源列表

1.接口描述

接口说明:获取设备中可用资源列表

请求方式:

  • 固件版本 V2.6.0 及以上:POST [ip]/mwapi/V2.0/source/get-sources-list
  • 固件版本 V2.5.0 及以下:POST [ip]/mwapi/get-sources-list
管理员权限 登录认证

2.输入参数

参数名称 必选 类型 描述
type Int 资源类型
0:预置资源(采集+图片+视频);1:图片;2:视频;6:音乐;7:笔记背景图片;10:GFX;11:画面背景图;12:画面背景色;13:PDF;14:网页

3.输出参数

参数名称 类型 描述
result Int 状态码
message String 状态描述
info InfoData 资源信息
InfoData
参数名称 类型 描述
sourceList Array of SourceData 资源列表
totalCount Int 资源总数
SourceData
参数名称 类型 描述
artist String 演唱者/演奏者
duration Int 资源持续时间。仅视频音乐有效。
filePath String 资源文件相对路径。可通过http访问http://[设备IP]/file/相对路径
height Int 资源高度
homeUrl String 主页地址。仅网页有效
id Int 资源ID,资源在设备中的唯一身份标识。
name String 资源名称
rotation Int 旋转角度,逆时针方向,范围[0~360]
thumbnailPath String 资源缩略图相对路径。可通过http访问http://[设备IP]/file/相对路径
totalPageNumber Int 文件页数。仅 PDF 有效
type Int 资源类型
0:预置资源(采集+图片+视频)1:图片;2:视频;6:音乐;7:笔记背景图片;10:GFX图片;11:画面背景图片;12:画面背景色;13:PDF 文件;14:网页
url String 网页地址。仅网页有效
width Int 资源宽度

4.示例

获取视频资源列表。

输入示例
{
    "type": 2
}
输出示例
{
    "info": {
        "sourceList": [
            {
                "duration": 69963,
                "filePath": "2089/2089.MOV",
                "height": 1080,
                "homeUrl": "",
                "id": 2089,
                "name": "IMG_2128",
                "rotation": 0,
                "thumbnailPath": "2089/2089.thumb.jpeg",
                "totalPageNumber": 0,
                "type": 2,
                "url": "",
                "width": 1920
            },
            {
                "artist": "Asher Monroe",
                "duration": 243000,
                "filePath": "2129/2129.mp3",
                "height": 0,
                "homeUrl": "",
                "id": 2129,
                "name": "Here With You (Dave Audé Radio Remix)",
                "rotation": 0,
                "thumbnailPath": "2129/2129.thumb.jpeg",
                "totalPageNumber": 0,
                "type": 6,
                "url": "",
                "width": 0
            },
            {
                "duration": 27500,
                "filePath": "2135/2135.mkv",
                "height": 720,
                "homeUrl": "",
                "id": 2135,
                "name": "2024-03-14 10-41-30",
                "rotation": 0,
                "thumbnailPath": "2135/2135.thumb.jpeg",
                "totalPageNumber": 0,
                "type": 2,
                "url": "",
                "width": 1280
            }
        ],
        "totalCount": 2
    },
    "message": "success",
    "result": 0
}

5.错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 定义 说明
7 MW_STATUS_INVALID_ARG 参数缺失

与“”相关结果约

    找不到与“”相关的结果