AddDocumentComment API

Adds a comment to the specified document. Comments are visible to all users who have access to the document and are tracked with author and timestamp information.

Endpoint

/srv.asmx/AddDocumentComment

Methods

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser
DocumentPath string Yes Full path to the document (e.g., /Domain/Folder/Document.pdf)
CommentText string Yes The comment text to add to the document

Response

Success Response

<root success="true" />

Error Response

<root success="false" error="[ErrorCode] Error message" />

Required Permissions

The caller must have read access to the document by default. The specific required permissions depend on the domain policy settings:

Comment Behavior

Example

Request (GET)

GET /srv.asmx/AddDocumentComment?AuthenticationTicket=abc123-def456&DocumentPath=/Engineering/Specs/Design.pdf&CommentText=Please%20review%20section%203 HTTP/1.1
Host: server.example.com

Request (POST)

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

AuthenticationTicket=abc123-def456&DocumentPath=/Engineering/Specs/Design.pdf&CommentText=Please review section 3

Request (SOAP 1.1)

POST /srv.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/AddDocumentComment"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AddDocumentComment xmlns="http://tempuri.org/">
      <AuthenticationTicket>abc123-def456</AuthenticationTicket>
      <DocumentPath>/Engineering/Specs/Design.pdf</DocumentPath>
      <CommentText>Please review section 3</CommentText>
    </AddDocumentComment>
  </soap:Body>
</soap:Envelope>

Success Response

<?xml version="1.0" encoding="utf-8"?>
<root success="true" />

Error Response Example

<?xml version="1.0" encoding="utf-8"?>
<root success="false" error="[2285]Document not found at specified path" />

Document Comment Management

Document Access

Notes

Use Cases

  1. Document Review Process

    • Reviewers add comments during document review workflows
    • Comments provide feedback without modifying the document
  2. Collaboration

    • Team members add notes and discussions about document content
    • Comments serve as an audit trail of discussions
  3. Quality Control

    • QA team adds findings and observations
    • Comments track issues without creating separate documents
  4. Approval Process

    • Approvers add justification for approval/rejection decisions
    • Comments provide context for document history

Error Codes

Common error responses:

Error Description
[901]Session expired or Invalid ticket Invalid or expired authentication ticket
[2285]Document not found The specified document path does not exist
[2730]Insufficient rights User does not have permission to add comments
Invalid path format Document path is malformed or contains invalid characters
Comment text cannot be empty No comment text provided or only whitespace
Document is checked out May not be able to comment if document is checked out (policy-dependent)
Document is archived Cannot add comments to archived documents

Comment Notifications

If document subscriptions are enabled, the following users are notified when a comment is added:

Security Considerations

Best Practices

  1. Clear Communication: Write descriptive comments that provide context
  2. Reference Sections: Include page numbers or section references when applicable
  3. Timely Feedback: Add comments promptly during review processes
  4. Professional Tone: Maintain professional language in comments
  5. Check Length: Keep comments concise and focused (avoid exceeding character limits)
  6. URL Encoding: When using GET requests, ensure comment text is properly URL-encoded
  7. Error Handling: Always check the success attribute in the response

Version History