Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Feb 10, 2020 15:22

Moves a file in the media repository specified by the repository key. Used for renaming repository files.

Request syntax

https://mycloud.perfectomobile.com/services/repositories/media/<repositoryItemKey>?operation=move& securityToken=value&repositoryKey=value[&optionalParameter=value]

Note: All REST API commands require authentication, see the general authentication methods here.

Parameters

NameTypeDefaultDescription
securityToken*string
A unique cryptographic key assigned to an authorized user.
repositoryKey*string
The new repository key for the file.
admin boolean falsetrue to allow users with administrative credentials to move items to or from the private repository of other automation users.
owner string 
The user name of the user who owns the item. This parameter is used in conjunction with the admin parameter to correctly identify items to be stored in or read from PRIVATE or GROUP repositories of the owner. For example, if a user with administrative credentials wants to move an item where the original repositoryItemKey is PRIVATE:myItem.jpg or GROUP:myItem.jpg, specify the parameters as admin=true and owner=itemUser
group string 
The group name. This parameter is used in conjunction with the admin parameter to correctly identify items to be stored in or read from GROUP repositories. For example, if a user with administrative credentials wants to move an item where the repositoryItemKey isGROUP:myItem.jpg , specify the parameters as admin=true and group= groupName. 
property.<name>boolean 
The name and value of one or more a repository properties of the new file, each prefixed with property. For example, to specify an integer property called readonly with the value true, add property.readonly=true to the URL. 
overwriteboolean falsetrue to overwrite existing files.
responseFormatstring jsonFormat of response: json, xml

* Mandatory

Response

NameDescription
errorMessageError description in case of failure.
statussuccess if the operation completed successfully; otherwise failure.

Example

This example shows the request for moving a file in the media repository specified by <repositoryItemKey> to a new key specified by repositoryKey without specifying any optional parameters.

Request example
https://mycloud.perfectomobile.com/services/repositories/media/PRIVATE:Home-nexus.png?operation=move&securityToken=<your_token>&repositoryKey=PRIVATE:webshots/home.png
Response JSON format
{
    "info":{
        "creationTime":{
            "formatted":"2016-12-06T06:55:12Z",
            "millis":"1481007312946"
        },
        "modelVersion":"2.22.0.0",
        "productVersion":"master",
        "time":"2016-12-06T06:55:12Z"
    },
    "status":"Success"
}