Product Documentation articleRestore a document: lq851
Added by IBM contributorYing BJ Mo | Edited by IBM contributorDana Liburdi on April 18, 2011 | Version 3
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.
Tags: API


This is the specification for applications that restore a Document resource to a previous version. The URL endpoints are the same as to Update a document service, however, it will perform a restore operation as long as the versionUuid attribute is specified in the request entry.

URL endpoints

Perform a PUT operation on one of the following URL formats:
Update the specified document
/library/{library-id}/draft/{draft-id}/entry Update the specified draft


This method requires authentication. In order to restore a document, the currently authenticated user must be the owner of the user library containing the document, an administrator, or the document must have been shared with the current user as an editor. To test whether the current user can edit a document, use the Retrieve a Document API with the "acls" parameter equal to "true", and check the element for the "EditContent" or "EditProperties" flag.


The following HTTP headers maybe supported for this operation.
Contains path and label of the resource. Non-ASCII characters can appear in this header. But they must be properly encoded according to the RFC 2047.
Used to specify the Mime type for the content being sent to the server. POST and PUT operations will return HTTP response code 400 (Bad request) when this header is not present in the incoming request. If the collection does not support the specified content type, the server will return HTTP response code 415 (Unsupported media type).
Content-LanguageUsed to specify the language for the content being sent to the server. All content is handled via UTF-8 encoding on the server.
Content-LengthUsed to specify the content length when sending media content. This is required when sending media otherwise HTTP response code 411 (Length required) will be returned.

The following entry attributes carry special meaning when put to a document entry:
Indicates the version to restore the document to. The versionUuid passed in will be restored as a new current version. All other changes to values will be ignored if versionUuid is passed in.
td:changeSummaryStringA short summary of the changes like "Restore from version 1".

Error Code

Error Code
Returned when the cause of an error is unknown
Returned when the cause of an error is due to a permission restriction
Returned when the cause of an error is related to a resource not being found

Example Request for Lotus Quickr 8.5 for Domino

POST /dm/atom/library/%5B@Ptest002/@RMain.nsf%5D/page/%5B@Ptest002/@RMain.nsf/@Dundefined%5D/entry?noAuthHeader=true HTTP/1.1
User-Agent: Mozilla/5.0
<?xml version="1.0" encoding="utf-8"?>
<a:entry xmlns:a="">
<changeSummary xmlns="">Restored from version: 2</changeSummary>
<versionUuid xmlns="">_Ptest002_RMain.nsf_DCA31454AD1668865482578540018705E</versionUuid>

Example Response for Lotus Quickr 8.5 for Domino

<?xml version="1.0" encoding="utf-8" ?>
<entry xml:base="" xmlns="" xmlns:td="">
<td:label>Blue hills</td:label>
<link href="dm/atom/library/_Ptest002_RMain/page/_Ptest002_RMain_Dundefined/version/4/entry" rel="self" />
<link href="LotusQuickr/test002/Main.nsf/h_Index/undefined?OpenDocument" rel="alternate" />
<link href="dm/atom/library/_Ptest002_RMain/page/_Ptest002_RMain_Dundefined/version/4/entry" rel="edit" />
<link href="dm/atom/library/_Ptest002_RMain/document/_Ptest002_RMain_Dundefined_ABlue_20hills.jpg/version/4/media" rel="attachment0"/>
<category term="version" scheme=",2006:td/type" label="version" />
<title type="text">Blue hills</title>
<summary type="html">
<![CDATA[Restored from version: 2]]>
<content type="application/atom+xml" src="dm/atom/library/_Ptest002_RMain/page/_Ptest002_RMain_Dundefined/version/4/feed" />