Rest Interface Guide

Archive and Restore management

The archive and restore management capabilities of the API allow application developers to archive assets (metadata and its high_res) at the collection/query level and provides extensibility to restore/import the same assets into a different QPP server environment. This includes the following REST calls:

archiveCollectionAssets

Function

Archive collection assets.

Description

This request archives all assets belonging to a particular collection, from the given collection ID or complete collection path.

Type

GET

URL Format

../archive/collectionassets?..

Java API

Method Name

Class Name

archiveCollectionAssets

com.quark.qpp.service.facade Class ArchiveFacade

Parameters

Name

Type

Description

collection

string

Name/ID of the collection. (Mandatory)

destinationfolder

string

The path. Any file path that is accessible to the server, it could be on a network. (Mandatory)

allversions=[true | false]

boolean

Defaults to true. (Optional) If true, the server will archive all available versions of all assets.

archiverelations=[true | false]

boolean

Defaults to true. (Optional) If true, the server will maintain all the relations of assets to be archived.

deleteafterarchive=[true | false]

boolean

Defaults to false. (Optional) If true, the server will delete all the assets after archiving it.

Returns

Returns an archiveRestoreInfo object in XML format.

Examples

URL:

http://serverName:serverPort/rest/service/archive/ collectionassets?collection=Home&destinationfolder=C:\QPP Archive

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <archiveRestoreInfo failureCount="0" successCount="50"> <summary> Archive Summary Log Date: 5/01/13 17:17 PM Archive location: C:\QPP Archive Total assets to be archived: 50 Number of assets successfully archived: 50 Number of assets failed to archive: 0 Per Version Listing of Assets ----------------------------------------------------------- Asset Versions Successfully Archived: ----------------------------------------------------------- Home/SampleBusDocdc1.qxp, Version: 1.0 Home/Construct/Construct - Copy.zip, Version: 1.0 Home/Construct/Construct.zip, Version: 1.0 Home/Construct/Construct1/Construct.rar, Version: 1.0 Home/Construct/Construct1/dineshjj.xml, Version: 1.0 </summary> </archiveRestoreInfo>

archiveQueryAssets

Function

Archive resulted assets of any given saved search.

Description

This request archives all assets returned in the query result for the given query name.

Type

GET

URL Format

../archive/searchresults?..

Java API

Method Name

Class Name

archiveQueryAssets

com.quark.qpp.service.facade Class ArchiveFacade

Parameters

Name

Type

Description

searchname

string

Name of the saved search. (Mandatory)

destinationfolder

string

The path. Any file path that is accessible to server, it could be on network. (Mandatory)

allversions=[true | false]

boolean

Defaults to true.(Optional)If true, the server will archive all available versions of all assets.

archiverelations=[true | false]

boolean

Defaults to true.(Optional)If true, the server will maintain all the relations of assets to be archived.

deleteafterarchive=[true | false]

boolean

Defaults to false.(Optional)If true,the server will delete all the assets after archiving it.

Returns

Returns an archiveRestoreInfo object in XML format.

Examples

URL:

http://serverName:serverPort/rest/service/archive/ searchresults?searchname=Default&destinationfolder=C:\QPP Archive

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <archiveRestoreInfo failureCount="0" successCount="50"> <summary> Archive Summary Log Date: 5/01/13 17:17 PM Archive location: C:\QPP Archive Total assets to be archived: 50 Number of assets successfully archived: 50 Number of assets failed to archive: 0 Per Version Listing of Assets ----------------------------------------------------------- Asset Versions Successfully Archived: ----------------------------------------------------------- Home/SampleBusDocdc1.qxp, Version: 1.0 Home/Construct/Construct - Copy.zip, Version: 1.0 Home/Construct/Construct.zip, Version: 1.0 Home/Construct/Construct1/Construct.rar, Version: 1.0 Home/Construct/Construct1/dineshjj.xml, Version: 1.0 </summary> </archiveRestoreInfo>

archiveAssets

Function

Archive specified assets.

Description

This request archives an asset from the given asset id or asset path.

Type

GET

URL Format

../archive/assets?..

Java API

Method Name

Class Name

archiveAssets

com.quark.qpp.service.facade Class ArchiveFacade

Parameters

Name

Type

Description

assets

long or string

The IDs or Collection Path of assets to be archived. (Mandatory) Comma separated IDs of assets (long), or a collection path of assets (string).

destinationfolder

string

The path. Any file path that is accessible to server, it could be on network. (Mandatory)

allversions=[true | false]

boolean

Defaults to true.(Optional)If true, the server will archive all available versions of all assets.

archiverelations=[true | false]

boolean

Defaults to true.(Optional)If true, the server will maintain all the relations of assets to be archived.

deleteafterarchive=[true | false]

boolean

Defaults to false.(Optional)If true, the server will delete all the assets after archiving it.

Returns

Returns an archiveRestoreInfo object in XML format.

Examples

URL:

http://serverName:serverPort/rest/service/archive/ assets?assets=1102,1229&destinationfolder=C:\QPP Archive

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <archiveRestoreInfo failureCount="0" successCount="50"> <summary> Archive Summary Log Date: 5/01/13 17:17 PM Archive location: C:\QPP Archive Total assets to be archived: 50 Number of assets successfully archived: 50 Number of assets failed to archive: 0 Per Version Listing of Assets ----------------------------------------------------------- Asset Versions Successfully Archived: ----------------------------------------------------------- Home/SampleBusDocdc1.qxp, Version: 1.0 Home/Construct/Construct - Copy.zip, Version: 1.0 Home/Construct/Construct.zip, Version: 1.0 Home/Construct/Construct1/Construct.rar, Version: 1.0 Home/Construct/Construct1/dineshjj.xml, Version: 1.0 </summary> </archiveRestoreInfo>

restoreAssets

Function

Restore archived assets into the system.

Description

This request restores assets from the given folder path. This request requires the same collection hierarchy with same set of workflow, users etc which existed at the time of archiving the assets.

Type

GET

URL Format

../restore?...

Java API

Method Name

Class Name

restoreAssets

com.quark.qpp.service.facade Class RestoreFacade

Parameters

Name

Type

Description

archivedpath

string

The full path of the folder which contains the archived assets and its information. (Mandatory)

lookup

string

Specify the lookup strategy to be used for fetching entities, like content type, relation type and attributes. Use name to restore across different servers, else use id. (Optional, Default value is id)

Returns

Returns an archiveRestoreInfo object in XML format.

Examples

URL:

http://serverName:serverPort/rest/service/ restore?archivedpath=C:\QPP Archive

Result:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <archiveRestoreInfo failureCount="0" successCount="50"> <summary> Archive Summary Log Date: 5/01/13 17:17 PM Archive location: C:\QPP Archive Total assets to be archived: 50 Number of assets successfully archived: 50 Number of assets failed to archive: 0 Per Version Listing of Assets ----------------------------------------------------------- Asset Versions Successfully Archived: ----------------------------------------------------------- Home/SampleBusDocdc1.qxp, Version: 1.0 Home/Construct/Construct - Copy.zip, Version: 1.0 Home/Construct/Construct.zip, Version: 1.0 Home/Construct/Construct1/Construct.rar, Version: 1.0 Home/Construct/Construct1/dineshjj.xml, Version: 1.0 </summary> </archiveRestoreInfo>