Check usage status of resource file

1. API Description

This API is used to check whether the resource file is in use.

Request mode:

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

2. Input Parameters

Name Required Type Description
sourceType Yes Int Type of resource
1: Picture; 2: Video; 6: Music; 10: GFX; 11: Scene Background Image; 13: PDF; 14: Web page
id Yes Int Resource ID, which can be obtained via Get resource list

3. Output Parameters

Name Type Description
status Int Status code
message String Status description
info[used] Int The sub-parameter "used" indicates the resource usage status
0: Not used
1: Used by a presentation
2: Used by the current preview scene, cannot be deleted
3: Resource does not exist or has been deleted

4. Example

Checking the usage status of a picture file.

Input Example
{
    "id": 100,
    "sourceType": 1
}
Output Example
{
    "info": {
        "used": 3
    },
    "message": "success",
    "status": 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 ""