Rename resource

1. API Description

This API is used to rename resources (limited to media files uploaded by users, such as pictures, videos, and PDFs).

Request mode:

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

2. Input Parameters

Name Required Type Description
id Yes Int Resource ID, which can be obtained via Get resource list
name Yes String New name

3. Output Parameters

Name Type Description
status Int Status code
message String Status description

4. Example

Renaming the resource file with ID 2039 to "New Source Name".

Input Example
{
    "id":2039,
    "name":"New Source Name"
}
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
39 MW_STATUS_MISMATCH The resource does not exist

results matching ""

    No results matching ""