GetSubscribedDocumentsByUser API¶
Returns a paginated list of documents that the specified user is subscribed to. This API is similar to GetSubscriptions but targets a specific user and supports pagination.
Endpoint¶
Methods¶
- GET
/srv.asmx/GetSubscribedDocumentsByUser?authenticationTicket=...&userName=...&startingRow=...&rowCount=... - POST
/srv.asmx/GetSubscribedDocumentsByUser(form data) - SOAP Action:
http://tempuri.org/GetSubscribedDocumentsByUser
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser |
userName |
string | Yes | Username of the user whose subscribed documents to retrieve |
startingRow |
integer | Yes | Zero-based index of the first row to return |
rowCount |
integer | Yes | Maximum number of documents to return in this page |
Response Structure¶
Success Response¶
<response success="true" recordCount="42" startingRow="0" rowCount="10">
<document id="123" name="report.docx" path="/Documents/report.docx"
size="52480" extension="docx" ... />
<document id="456" name="policy.pdf" path="/Policies/policy.pdf"
size="128000" extension="pdf" ... />
</response>
Empty Result Response¶
Documents come back as the full <document> element. Since 9.0 it also carries AIEnhanced and
AIExtractConfidence. The first says which of the document's attributes infoRouter Connect
produced, as a set of bits - 0 when none did; the second how sure it was about the weakest value
it put in a property set, as a percentage. See AIEnhanced and
AIExtractConfidence.
Error Response¶
Response Attributes¶
| Attribute | Type | Description |
|---|---|---|
recordCount |
integer | Total number of subscribed documents for the user |
startingRow |
integer | The starting row index used in the request |
rowCount |
integer | Number of document records returned in this response |
Document Properties¶
| Property | Type | Description |
|---|---|---|
id |
integer | Unique document identifier |
name |
string | Document file name |
path |
string | Full path to the document |
size |
long | File size in bytes |
extension |
string | File extension without the dot |
description |
string | Document description |
version |
integer | Current version number |
created |
datetime | Document creation date |
modified |
datetime | Last modification date |
UserViewStatus |
int | Integer indicating whether the current user has viewed the document. 0 = NoView (never viewed), 1 = Changed (viewed but the published version has since changed), 2 = Viewed (viewed the current published version). |
Required Permissions¶
- User must be authenticated
- Same user query: If
userNamematches the current authenticated user, no additional permissions required - Different user query: Requires administrative permissions to view another user's subscriptions
Example Requests¶
Request (GET)¶
GET /srv.asmx/GetSubscribedDocumentsByUser?authenticationTicket=abc123-def456&userName=john.smith&startingRow=0&rowCount=25 HTTP/1.1
Host: server.example.com
Request (POST)¶
POST /srv.asmx/GetSubscribedDocumentsByUser HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=abc123-def456&userName=john.smith&startingRow=0&rowCount=25
Request (SOAP 1.1)¶
POST /srv.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://tempuri.org/GetSubscribedDocumentsByUser"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetSubscribedDocumentsByUser xmlns="http://tempuri.org/">
<authenticationTicket>abc123-def456</authenticationTicket>
<userName>john.smith</userName>
<startingRow>0</startingRow>
<rowCount>25</rowCount>
</GetSubscribedDocumentsByUser>
</soap:Body>
</soap:Envelope>
Use Cases¶
- User Reports
- Generate reports of documents a user is subscribed to
-
Audit subscription activity across teams
-
Administrative Oversight
- Review document subscriptions for a given user
-
Manage notification workload for users
-
Pagination
- Use
startingRowandrowCounttogether to page through large subscription lists - Use
recordCountfrom the response to determine total pages
Integration Examples¶
JavaScript/Client-Side¶
async function getSubscribedDocumentsByUser(userName, startingRow = 0, rowCount = 25) {
const ticket = getUserAuthTicket();
const params = new URLSearchParams({
authenticationTicket: ticket,
userName: userName,
startingRow: startingRow,
rowCount: rowCount
});
const response = await fetch(`/srv.asmx/GetSubscribedDocumentsByUser?${params}`);
const xmlText = await response.text();
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlText, "text/xml");
const root = xmlDoc.querySelector("response");
if (root.getAttribute("success") === "true") {
const totalCount = parseInt(root.getAttribute("recordCount"));
const documents = [];
xmlDoc.querySelectorAll("document").forEach(doc => {
documents.push({
id: doc.getAttribute("id"),
name: doc.getAttribute("name"),
path: doc.getAttribute("path"),
size: parseInt(doc.getAttribute("size"))
});
});
return { totalCount, documents };
} else {
throw new Error(root.getAttribute("error"));
}
}
C# Client Usage¶
using (var client = new SrvSoapClient())
{
var response = await client.GetSubscribedDocumentsByUserAsync(
authTicket,
"john.smith",
startingRow: 0,
rowCount: 25);
var root = XElement.Parse(response.ToString());
if (root.Attribute("success")?.Value == "true")
{
int totalCount = int.Parse(root.Attribute("recordCount")?.Value ?? "0");
var documents = root.Elements("document").Select(doc => new
{
Id = int.Parse(doc.Attribute("id")?.Value ?? "0"),
Name = doc.Attribute("name")?.Value,
Path = doc.Attribute("path")?.Value
}).ToList();
Console.WriteLine($"Total subscribed documents: {totalCount}");
Console.WriteLine($"Returned in this page: {documents.Count}");
}
else
{
Console.WriteLine($"Error: {root.Attribute("error")?.Value}");
}
}
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown, or there is no ticket at all |
4000 |
no user by that name - this pair answers 4000 where the add operations answer 4041 for the same name |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |
Notes¶
- Documents are returned sorted by document name in ascending order
- Use
recordCountfrom the response to implement pagination logic rowCountin the response reflects the actual number of records returned, which may be less than the requestedrowCounton the last page
Related APIs¶
GetSubscribedFoldersByUser- Get subscribed folders for a specified userGetSubscriptions- Get subscribed documents and folders for the current userAddUserToDocumentSubscribers- Subscribe a user to a documentRemoveUserFromDocumentSubscribers- Remove a user from a document subscriptionRemoveAllSubscriptions- Remove all subscriptions for a user