Legacy | Upload Item to Repository

Note

This information no longer refers to the latest product version but may still be relevant if you are working with an older version.

Uploads the item in the body of the request to the location specified by <repositoryItemKey> in the repository area specified by <repository>.

This operation only supports the POST HTTP method. The item being uploaded is specified as the body of the request. 

Syntax

Copy
https://<mycloud>.perfectomobile.com/services/repositories/<repository>/<repositoryItemKey>?operation=upload&securityToken=value[&optionalParameter=value]
Note
  • All REST API commands require authentication through the Perfecto security token.
  • For public cloud tenants, including free trials at testingcloud.app.perfectomobile.com, you need to:
    1. Set mycloud to mobilecloud.
    2. Add the cloud parameter for the tenant name.

Parameters

Name Type Default Description
securityToken* string
A unique cryptographic key assigned to an authorized user. See also Generate security tokens.
admin  boolean  false true to allow users with administrative credentials to upload items to 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 PRIVATE or GROUP repositories of the owner. For example, if a user with administrative credentials wants to upload an item where the repositoryItemKey is PRIVATE:myItem.jpg orGROUP: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 GROUP repositories. For example, if a user with administrative credentials wants to upload 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, each prefixed with property. For example, to specify an integer property called readonly with the value true, add property.readonly=true to the URL. 
overwrite boolean  false true to overwrite existing files.
format string 
The format of the file. This option only applies when uploading data tables. Possible values: xml, csv 
responseFormat string  json Format of response: json, xml
cloud string
The tenant URL. For example: yourtenant-perfectomobile-com or testingcloud-perfectomobile-com

Response

Name Description
status success if the operation completed successfully; otherwise failure.

For usage examples, see Using the REST API.