apidocs

PruneDocumentVersions API

Deletes old versions of a document, retaining the N most recent published and M most recent unpublished versions. All older versions are permanently deleted.

Endpoint

/srv.asmx/PruneDocumentVersions

Methods

Parameters

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.

Response

Success Response

<root success="true" />

Error Response

<root success="false" error="Error message" />

Required Permissions

The calling user must have sufficient permissions to delete document versions.

Pruning Rules

The following versions are never deleted regardless of the keep counts:

Example

Request (POST)

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

Request (GET)

GET /srv.asmx/PruneDocumentVersions?authenticationTicket=abc123&documentPath=/Finance/Reports/Q1Summary.pdf&keepPublished=3&keepUnpublished=1

Notes