Deletes old versions of a document, retaining the N most recent published and M most recent unpublished versions. All older versions are permanently deleted.
/srv.asmx/PruneDocumentVersions
/srv.asmx/PruneDocumentVersions?authenticationTicket=...&documentPath=...&keepPublished=...&keepUnpublished=.../srv.asmx/PruneDocumentVersions (form data)http://tempuri.org/PruneDocumentVersions| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
documentPath |
string | Yes | Full infoRouter path of the document (e.g. /Finance/Reports/Q1Summary.pdf). |
keepPublished |
integer | Yes | Number of most recent published versions to retain. Must be 1 or greater. |
keepUnpublished |
integer | Yes | Number of most recent unpublished versions to retain. Must be 0 or greater. |
<root success="true" />
<root success="false" error="Error message" />
The calling user must have sufficient permissions to delete document versions.
The following versions are never deleted regardless of the keep counts:
Keep the 3 most recent published versions and 1 most recent unpublished version:
POST /srv.asmx/PruneDocumentVersions HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=abc123&documentPath=/Finance/Reports/Q1Summary.pdf&keepPublished=3&keepUnpublished=1
GET /srv.asmx/PruneDocumentVersions?authenticationTicket=abc123&documentPath=/Finance/Reports/Q1Summary.pdf&keepPublished=3&keepUnpublished=1
keepPublished must be at least 1 — it is not possible to delete all published versions.keepUnpublished may be 0 to delete all unpublished versions (subject to the pruning rules above).GetDocumentVersions to inspect the current version history before pruning.