Legacy | Repository Cleanup - Executions

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

Delete all the execution reports older than the specified number of days using the lastModified.daysToKeep parameter.

Request syntax

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

The <repositoryItemKey> used for the clean operation specifies a location within the Reports repository.

Parameters

Name Type Default Description
securityToken* string
A unique cryptographic key assigned to an authorized user.
admin* boolean
true to allow users with administrative credentials to delete other user items in the executions repository.
owner  string 

The user name of the user who owns the repository items. 
Use * to specify this operation for all users within the PRIVATE visibility (with corresponding repositoryItemKey).


group  string 
Note: the parameter must be used when specifying PRIVATE visibility.
When specifying owner with GROUP visibility, the operation will be applied to the owner's group. 
This parameter cannot be specified with PUBLIC or SYSTEM visibility. group ½ 
string 
The group ID. This parameter is used in conjunction with the admin parameter to correctly identify items stored in GROUP repositories. 
Use * to specify the operation for all groups under GROUP visibility (with corresponding repositoryItemKey)
dryRun  boolean true Use this mode to test the clean operation without deleting any items. Statistics of what would be deleted once this operation is performed will be returned. 
lastModified. 
daysToKeep 
integer 180 The number of days to keep reports since last modification. Reports older than this number of days will be deleted. 
userStatus  string ACTIVE

Filter the users according to their status. 
Used only when specifying owner =*.
Supported values:ACTIVE,INACTIVE,PENDING,DELETE

responseFormat  string json Format of the response: json, xml

* Mandatory parameter

Note:

The parameters owner and group are mutually exclusive.

Response

The response provides statistics on the following parameters:

Name Description
foldersDeleted Number of folders deleted
diskMBDeleted Size of storage that was released from the repository
itemsCouldNotDelete Number of repository items that could not be deleted
cleanerMode Identifies the mode that the operation was executed in: DRYRUN, ACTIVE
diskMBAvailable Storage space that is available
itemsDeleted Number of reports deleted
itemsToKeep Number of reports not older than input daysToKeep
foldersToKeep Number of folders not older than input daysToKeep
foldersCouldNotDelete Number of repository folders that could not be deleted

Example 1

Shows a dry run request for cleaning the executions with PRIVATE visibility repository for all active users specified by with the ACTIVE default value, with the 180 value

Copy

Request

https://mycloud.perfectomobile.com/services/repositories/executions/PRIVATE:?operation=clean&securityToken=<your_token>&admin=true&owner=*&responseFormat=xml
Copy
XML response
<response>    <info>        <creationTime>            <formatted>2013-07-24T13:12:37+00:00</formatted>            <millis>1374671557154</millis>        </creationTime>        <modelVersion>2.17.0.0</modelVersion>        <time>2013-07-24T13:12:37+00:00</time>    </info>    <statistics>        <itemsCouldNotDelete>0</itemsCouldNotDelete>        <cleanerMode>DRYRUN</cleanerMode>        <itemsDeleted>51</itemsDeleted>        <itemsToKeep>941</itemsToKeep>    </statistics> 
</response>

Example 2

Deletes executions more than 60 days old.

Copy

Request

https://mycloud.perfectomobile.com/services/repositories/executions/PRIVATE:?operation=clean&securityToken=<your_token>&admin=true&owner=owner@perfectomobile.com&dryrun=false&lastModified.daysToKeep=60&responseformat=xml 
Copy

XML response

<response>    <info>        <creationTime>            <formatted>2013-07-24T13:09:40+00:00</formatted>            <millis>1374671380553</millis>        </creationTime>        <modelVersion>2.17.0.0</modelVersion>        <time>2013-07-24T13:09:40+00:00</time>    </info>    <statistics>        <foldersDeleted>0</foldersDeleted>        <diskMBDeleted>0</diskMBDeleted>        <itemsCouldNotDelete>0</itemsCouldNotDelete>        <cleanerMode>ACTIVE</cleanerMode>        <diskMBAvailable>0</diskMBAvailable>        <itemsDeleted>0</itemsDeleted>        <itemsToKeep>2</itemsToKeep>        <foldersToKeep>7</foldersToKeep>        <foldersCouldNotDelete>0</foldersCouldNotDelete>    </statistics> 
</response>