Legacy | Get Repository Items List

Restriction: This information no longer refers to the latest product version but may still be relevant if you are working with an older version.
Important: The Perfecto repository in the current Perfecto UI has a flat structure. It is not hierarchical. Therefore, if your organization has migrated, retrieving the list of subfolders (also called subareas) is not supported by this API.

Gets the status of one or more items from the repository area specified by and optionally from the subarea within the repository specified. If the <repository> is not specified, the response returns items from all the subareas.

<repository> is specified as follows: 

  • media - the repository area for general media files
  • datatables - the repository area for data table files
  • scripts - the repository area for automation script files

<repositoryItemKey> is the location of the items within the repository, specified as a repository key that contains subarea and folder information.

Syntax

Copy
https://mycloud.perfectomobile.com/services/repositories/<repository>/<repositoryItemKey>?operation=list&securityToken=value[&optionalParameter=value]
Important: All REST API commands require authentication. See the general authentication methods in Authentication and authorization.

Parameters

Name Type Default Description
securityToken* string
A unique cryptographic key assigned to an authorized user.
admin  string 
true to allow users with administrative credentials to get the status of one or more items from the 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 stored in PRIVATE or GROUP repositories of the owner. For example, if a user with administrative credentials wants to download an items list where the repositoryItemKey is PRIVATE:myItem.jpg or GROUP:myItem.jpg, specify the parameters asadmin=true and owner=itemUser.
group  string 
The group name. This parameter is used in conjunction with the admin parameter to correctly identify items stored in GROUP repositories. For example, if a user with administrative credentials wants to download an items list for the repositoryItemKey, specify the parameters as admin=true and group= groupName.
responseFormat string  json Format of response: json, xml
detailed true | false false Selects whether the info displayed for each Repository item includes creation and modification information, file type (simple or container), and the file key. Default is not to include this information.

* Mandatory parameter

Response

The response is a list of repository keys corresponding to the items located in the specified location within the repository.

Repository items are sorted as follows:

  • Visibility: private, group, public, system.
  • Within each visibility, files appear first, followed by folders.
  • Folders and files are listed alphabetically.

Examples

This example shows the request and response for listing the items in the appium folder located in the PUBLIC subarea of the media repository area.

Copy

Request without optional paramters

https://mycloud.perfectomobile.com/services/repositories/media/PUBLIC:appium?operation=list&securityToken=<your_token> 
Copy

Response

{
    "items":[
        "PUBLIC:appium",
        "PUBLIC:appium/AlternateViews.ipa",
        "PUBLIC:appium/apiDemos.apk",
        "PUBLIC:appium/app-debug-unaligned.apk",
        "PUBLIC:appium/com.nexperience.system/test-utils/1.1.0.0-SNAPSHOT/test-utils-1.1.0.0-SNAPSHOT.jar",
        "PUBLIC:appium/com.nexperience.system/test-utils/1.1.0.0-SNAPSHOT/test-utils-1.1.0.0-SNAPSHOT.pom"    ],
    "info":{
        "creationTime":{
            "formatted":"2016-12-05T14:09:40Z",
            "millis":"1480946980327"        },
        "modelVersion":"2.22.0.0",
        "productVersion":"master",
        "time":"2016-12-05T14:09:40Z"    }
}
Copy

Detailed JSON response

{
    "items": [
        {
            "key": "PUBLIC:ATT",
            "type": "container"            },
        {
            "createdBy": "<email address>",
            "creationTime": {
                "formatted": "2018-03-12T17:00:52Z",
                "millis": "1520874052000"                },
            "key": "PUBLIC:ATT/s2t.wav",
            "modificationTime": {
                "formatted": "2018-03-12T17:00:52Z",
                "millis": "1520874052000"                },
            "modifiedBy": "<email address>",
            "type": "simple"            },
        {
            "createdBy": "<email address>",
            "creationTime": {
                "formatted": "2018-03-12T12:03:40Z",
                "millis": "1520856220000"                },
            "key": "PUBLIC:ATT/silence.wav",
            "modificationTime": {
                "formatted": "2018-03-12T12:03:40Z",
                "millis": "1520856220000"                },
            "modifiedBy": "<email address>",
            "type": "simple"            },
        {
            "createdBy": "<email address>",
            "creationTime": {
                "formatted": "2018-03-12T12:03:11Z",
                "millis": "1520856191000"                },
            "key": "PUBLIC:ATT/SourceFile.wav",
            "modificationTime": {
                "formatted": "2018-03-12T12:03:11Z",
                "millis": "1520856191000"                },
            "modifiedBy": "<email address>",
            "type": "simple"            }
        ],
    "info": {
        "creationTime": {
            "formatted": "2018-08-08T14:10:14Z",
            "millis": "1533737414200"            },
        "modelVersion": "2.22.0.0",
        "productVersion": "master-SNAPSHOT",
        "time": "2018-08-08T14:10:14Z"        }
    }