Applies a tag to the latest version of the specified document. If the document’s publishing rule is set to Tagged and the supplied tag text matches the rule’s configured tag, the latest version is also automatically published. Use this API to mark a document version with a classification or approval label as part of a review or workflow process.
/srv.asmx/SetTagToDocument
/srv.asmx/SetTagToDocument?authenticationTicket=...&path=...&tagText=.../srv.asmx/SetTagToDocument (form data)http://tempuri.org/SetTagToDocument| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
path |
string | Yes | Full infoRouter path to the document (e.g. /Finance/Reports/Q1-Report.pdf). |
tagText |
string | Yes | Text of the tag to apply. Must be 1-“128 characters. Allowed characters: Unicode letters, digits (0-"9), underscore (_), hyphen (-), and space. |
<response success="true" />
<response success="false" error="Insufficient rights." />
The calling user must have the DocumentPropertyChange permission on the document. This is typically granted to document owners, domain managers, and users with Edit access. Read-only users cannot apply tags.
If the document is currently checked out, only the user who checked it out may apply a tag to it.
GET /srv.asmx/SetTagToDocument
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&path=/Finance/Reports/Q1-2024-Report.pdf
&tagText=Approved
HTTP/1.1
POST /srv.asmx/SetTagToDocument HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&path=/Finance/Reports/Q1-2024-Report.pdf
&tagText=Approved
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:SetTagToDocument>
<tns:authenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:authenticationTicket>
<tns:path>/Finance/Reports/Q1-2024-Report.pdf</tns:path>
<tns:tagText>Approved</tns:tagText>
</tns:SetTagToDocument>
</soap:Body>
</soap:Envelope>
tagText matches the configured tag text (case-insensitive), the latest version is automatically published as a side effect of this call.tagText must match the pattern ^(\w|[ -]){1,128}$. This means only Unicode word characters (letters, digits, underscore), hyphens, and spaces are allowed. Any other character will cause the call to fail.RemoveTagFromDocument to remove a specific instance.GetTagDefintions. However, SetTagToDocument does not validate tagText against the defined tags -“ any text matching the character and length rules is accepted.| Error | Description |
|---|---|
[900] Authentication failed |
Invalid or missing authentication ticket. |
[901] Session expired or Invalid ticket |
The ticket has expired or does not exist. |
Document not found. |
The path does not resolve to an existing document. |
Insufficient rights. |
The calling user does not have the DocumentPropertyChange permission on the document. |
Access denied. Only users who checked out the document can tag the checkedout documents. |
The document is checked out by another user. Only the checkout holder may apply tags. |
Operation cannot be performed on a shortcut. |
The path points to a shortcut document, which cannot be tagged. |
[2494] Invalid tag text. |
The tagText value contains characters that are not allowed or does not meet the length requirement (1-“128 characters). |
SystemError:... |
An unexpected server-side error occurred. |