/filerepository/transfer/Resources
Moves a single resource or a list of resources, such as stories and models, from their current location to a destination folder on your SAP Analytics Cloud tenant. This action mimics the Move To action available in the Files repository. To move a resource, you need the following permissions: Read, Update, Delete, and Share.
POST /api/v1/filerepository/transfer/Resources
Moves a single resource or a list of resources, such as stories and models, from their current location to a destination folder. To move a resource, you need the following permissions: Read, Update, Delete, and Share.
After you move a resource, its original sharing permissions are removed. The resource then inherits the sharing permissions of the destination folder.
When you move a resource to a destination folder that already contains a resource with the same name, you can use a parameter to either abort the transfer or instruct the system to rename the resource. The system appends a numeric index to the name. For example, if you have a folder named Sales with a story called Key Metrics and you move it to a destination folder named Operations that also has a story with the same name, the system renames the file to Key Metrics (1).
URL Parameters
-
(Optional) applyManagePrivilege=true or applyManagePrivilege=false: Checks whether the user has the Manage permission for Private Files and Public Files. If this parameter is missing, the default value is false.
-
When the API is called with a specific user context and the parameter is set to true: If the user has the Manage permission, the system will bypass the resource access control list checks before moving the resource to the destination folder (based on the Files repository System view).
-
When the API is called with a specific user context and the parameter is set to false: Regardless if the user has the Manage permission, the system will always check the resource access control list before moving the file to the destination folder (based on the Files repository My Files view).
-
Sample Request
POST /api/v1/filerepository/transfer/Resources?applyManagePrivilege=true HTTP/1.1
X-Csrf-Token: {tokenidentification}
Request Body Parameters
|
Parameter |
Description |
Possible Values |
|---|---|---|
|
action |
The action the API will perform. |
"move" |
|
resouceIds |
The list of resource IDs to be moved. This can be a single resource ID or multiple resource IDs separated by commas. |
["resource_ID"] ["resource_ID_1", "resource_ID_2", …] |
|
destinationFolderId |
The resource ID of the destination folder. |
["destination_folder_resource_ID"] |
|
duplicateResolution |
Instructions that determine what happens when a resource ID name is duplicated in the destination folder. |
|
Sample Request Body
{
"action": "move",
"resourceIds": ["D8F00085B81AE7959BEDDE79C236C40E"],
"destinationFolderId": "6BC80C0224E12E09B60E9A2C78D11CD2",
"duplicateResolution": "INDEX"
}
Responses
|
HTTP Status Code |
Returns |
|---|---|
|
202 |
Returns an operation ID that can be used for checking the status of the move request later. Moving resources can take some time. You can check the status of the move operation, by running the operations API (see /filerepository/operations). |
|
400 |
Bad Request
One of the following issues occurred:
|
|
403 |
Forbidden
One of the following issues occurred:
|
|
404 |
Not Found The resource is not found when fetching the resource ID. Check for mistakes in the resource ID |
|
500 |
Internal Server Error A server-side error occurred. Verify that the resources were not moved and try the API call again. |