Delete resource

1. API Description

This API is used to delete a resource.

Request mode:

  • V2.6.0 and above: POST [ip]/mwapi/V2.0/source/delete-source
  • V2.5.0 and below: POST [ip]/mwapi/delete-source
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; 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

4. Example

Deleting the picture file with ID of 1150.

Input Example
{
    "sourceType": 1,
    "id": 1150
}
Output Example
{
     "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
40 MW_STATUS_VERIFY_FAILED The resource cannot be deleted as it is used by some presentations.

results matching ""

    No results matching ""