Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
POST /api/v1/batch/{LibraryId}/{SpaceId}?move&access_token={AccessToken}&user_id={UserId}
Request parameters. | Description | Type | Required or Not |
LibraryId | Media Library ID, obtained after creating a media library in the Media Hosting console. See Create Media Library | String | Yes |
SpaceId | Space ID. If the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameter. For retrieval, see Create Tenant Space | String | Yes |
AccessToken | Access token. For retrieval, see Generate Access Token | String | Yes |
UserId | User identity recognition. When the access token corresponds to admin permission and the user identity recognition during token application is empty, it is used to temporarily designate user identity. For details, see Generate Access Token | String | No |
[{"fromSpaceId":"spaceNJsnjdiq","from": "foo/bar_old","to": "foo/bar"},{"from": "foo/1.jpg","to": "bar/1.jpg"},{"from": "foo/2.jpg","to": "bar/2.jpg","conflictResolutionStrategy": "overwrite"}]
Request parameters. | Description | Type | Required or Not |
fromSpaceId | Specify the space where the source directory or file is located when moving across spaces. Do not specify this field when moving within the same space. | String | No |
from | The source directory, album, or file path to be renamed or moved. | String | Yes |
to | Target directory, album, or file path | String | Yes |
conflictResolutionStrategy | Handling method for filename conflicts, default is rename ask: Returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when conflicts with rename: automatically rename file when conflicts with overwrite: If the target is a directory or album, it defaults to ask and does not support overwrite If the target is a file, overwrite the existing file When a file exists in the target space with an earlier version, do not support moving overwrite | String | No |
moveAuthority | Whether to allow moving | Boolean | No |
{"result": [{"status": 204,"moveAuthority":false,"from": [ "foo", "bar_old" ],"to": [ "foo", "bar" ]},{"status": 200,"path": [ "bar", "1 (1).jpg" ],"from": [ "foo", "1.jpg" ],"to": [ "bar", "1.jpg" ]},{"status": 204,"from": [ "foo", "2.jpg" ],"to": [ "bar", "2.jpg" ]}]}
{ "taskId": 17 }
[{"taskId": 17,"status": 200,"result": [{"status": 204,"moveAuthority":false,"from": [ "foo", "bar_old" ],"to": [ "foo", "bar" ]},{"status": 200,"path": [ "bar", "1 (1).jpg" ],"from": [ "foo", "1.jpg" ],"to": [ "bar", "1.jpg" ]},{"status": 204,"from": [ "foo", "2.jpg" ],"to": [ "bar", "2.jpg" ]}]}]
Response Parameters | Description | Type |
result.status | Rename or move result of individual item: 200: Renamed or moved successfully when conflictResolutionStrategy is rename. 204: Renamed or moved successfully when conflictResolutionStrategy is ask or overwrite. 403/404/409/500: Rename or move failure | String |
result.moveAuthority | Whether to allow moving | Boolean |
result.path | The final path may differ from the specified path during rename or move operations because automatic renaming may exist. | String Array |
result.from and result.to | The corresponding path passed in when making a request in array format | Array |
taskId | The task ID for rename or move operations performed asynchronously can be used to query task status via the Query Task API. | String |
Response Parameters | Description | Type |
status | Query task status. 202: Task in progress 200: All executed successfully 207: Part or all failed to execute | String |
フィードバック