Get resource list

1. API Description

This API is used to get the list of available resources in the device.

Request mode:

  • V2.6.0 and above: POST [ip]/mwapi/V2.0/source/get-sources-list
  • V2.5.0 and below: POST [ip]/mwapi/get-sources-list
Administrator Rights Logged-in
No Yes

2. Input Parameters

Name Required Type Description
type Yes Int Resource type
0: Preset resources (capture + pictures + videos); 1: Pictures; 2: Videos; 6: Music; 7: Note background images; 10: GFX images; 11: Scene background images; 12: Scene background color; 13: PDF files; 14: Web pages

3. Output Parameters

Name Type Description
result Int Status code
message String Status description
info InfoData Resource information
InfoData
Name Type Description
sourceList Array of SourceData Resource list
totalCount Int Total counts of resources
SourceData
Name Type Description
artist String Artist
duration Int Resource duration. Only valid for video and music
filePath String Relative path of the resource file, which can be accessed via http://[Device IP]/file/relative_path
height Int Resource height
homeUrl String Home page URL. Only valid for web pages
id Int Resource ID, the unique identity of the resource on the device
name String Resource name
rotation Int Rotation angle, counterclockwise, ranging from 0 to 360
thumbnailPath String Relative path of the resource thumbnail, which can be accessed via http://[Device IP]/file/relative_path
totalPageNumber Int Number of pages in the PDF file
type Int Resource type
0: Preset resources (capture + pictures + videos); 1: Pictures; 2: Videos; 6: Music; 7: Note background images; 10: GFX images; 11: Scene background images; 12: Scene background color; 13: PDF files; 14: Web pages
url String Web page URL. Only valid for web pages
width Int Resource width

4. Example

Getting the video resource list.

Input Example
{
    "type": 2
}
Output Example
{
    "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. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
7 MW_STATUS_INVALID_ARG Missing required parameters

results matching ""

    No results matching ""