apidocs

SetDocumentPublishingRule API

Sets the publishing rule on a document, controlling which version is served as the released (published) version.

Endpoint

/srv.asmx/SetDocumentPublishingRule

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).
publishingRule string Yes Publishing rule to apply. See Publishing Rule Values below. Case-insensitive.
publishedVersionNumber integer Conditional Internal version number to pin. Required only when publishingRule is SPESIFICVERSION; pass 0 for all other rules.
releaseTag string Conditional Tag name identifying the version to publish. Required only when publishingRule is TAGGED; pass empty string for all other rules.

Publishing Rule Values

Value Description
LATEST Always serve the most recent version (default behavior).
LASTAPPROVED Serve the most recently approved version.
TAGGED Pin to the version that carries the tag specified in releaseTag.
SPESIFICVERSION Pin to the exact internal version number in publishedVersionNumber.
UNPUBLISHED Hide the document from read-only users (no version is published).

Response

Success Response

<root success="true" />

Error Response

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

Required Permissions

The calling user must have Set Publishing Rules permission on the document (IrAction.SetPublishingRules). This permission is typically granted to document owners and library managers.

Examples

Set to latest version (POST)

POST /srv.asmx/SetDocumentPublishingRule HTTP/1.1
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&documentPath=%2FCorporate%2FContracts%2Fagreement.pdf
&publishingRule=LATEST
&publishedVersionNumber=0
&releaseTag=

Pin to a specific version (GET)

GET /srv.asmx/SetDocumentPublishingRule
    ?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
    &documentPath=%2FCorporate%2FContracts%2Fagreement.pdf
    &publishingRule=SPESIFICVERSION
    &publishedVersionNumber=3000001
    &releaseTag=
HTTP/1.1
Host: yourserver

Pin to a tagged version (POST)

POST /srv.asmx/SetDocumentPublishingRule HTTP/1.1
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&documentPath=%2FCorporate%2FPolicies%2FDataPolicy.pdf
&publishingRule=TAGGED
&publishedVersionNumber=0
&releaseTag=Approved-2026-Q1

Unpublish a document (POST)

POST /srv.asmx/SetDocumentPublishingRule HTTP/1.1
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&documentPath=%2FCorporate%2FDrafts%2Fdraft.pdf
&publishingRule=UNPUBLISHED
&publishedVersionNumber=0
&releaseTag=

Notes

Error Codes

Error Description
[900] Authentication failed — invalid credentials.
[901] Session expired or invalid authentication ticket.
Document not found documentPath does not refer to an existing document.
Access denied The calling user does not have Set Publishing Rules permission on the document.
Invalid publishingRule The publishingRule value is not one of the valid enum names.
releaseTag required publishingRule is TAGGED but releaseTag is empty or whitespace.