Skip to content

GetSystemStatistics API

Retrieves system-wide statistics including user counts, document counts, total document storage size, the number of checked-out documents, and the number of documents registered in the last 30, 60, and 90 days.

Endpoint

/srv.asmx/GetSystemStatistics

Methods

  • GET /srv.asmx/GetSystemStatistics?authenticationTicket=...
  • POST /srv.asmx/GetSystemStatistics (form data)
  • SOAP Action: http://tempuri.org/GetSystemStatistics

Parameters

Parameter Type Required Description
authenticationTicket string Yes Authentication ticket obtained from AuthenticateUser

Response

Success Response

<response success="true" error="">
  <SystemStatistics>
    <TotalUserCount>150</TotalUserCount>
    <ActiveUserCount>140</ActiveUserCount>
    <AuthorUserCount>90</AuthorUserCount>
    <ReaderUserCount>50</ReaderUserCount>
    <DisabledUserCount>10</DisabledUserCount>
    <TotalDocumentCount>25000</TotalDocumentCount>
    <TotalDocumentSize>10737418240</TotalDocumentSize>
    <TotalCheckedOutDocuments>12</TotalCheckedOutDocuments>
    <RegisteredDocumentsIn30Days>87</RegisteredDocumentsIn30Days>
    <RegisteredDocumentsIn60Days>210</RegisteredDocumentsIn60Days>
    <RegisteredDocumentsIn90Days>345</RegisteredDocumentsIn90Days>
  </SystemStatistics>
</response>

Error Response

<response success="false" error="..." errorCode="4030" />

Response Fields

Field Type Description
TotalUserCount int Total number of user accounts (active + disabled), excluding the system admin account
ActiveUserCount int Number of enabled users, AuthorUserCount + ReaderUserCount. Enabled accounts, not signed-in users; excludes the system administrator. Do not compare it with the licence: see Checking seats.
AuthorUserCount int Enabled users who are not read-only. Each takes an author seat.
ReaderUserCount int Enabled read-only users. They take reader seats first, author seats beyond those.
DisabledUserCount int Number of disabled user accounts
TotalDocumentCount int Total number of documents stored in the system
TotalDocumentSize long Total size of all document versions in bytes
TotalCheckedOutDocuments int Number of documents currently checked out
RegisteredDocumentsIn30Days int Number of documents registered within the last 30 days
RegisteredDocumentsIn60Days int Number of documents registered within the last 60 days
RegisteredDocumentsIn90Days int Number of documents registered within the last 90 days

Checking seats

Authors and readers are licensed separately. Readers use the reader seats first; readers beyond them take author seats:

author seats in use = AuthorUserCount + max(0, ReaderUserCount - ReadonlyUserCount)
the licence holds while author seats in use <= UserCount

UserCount and ReadonlyUserCount (the seats) come from GetLicenseInfo. Warn on the author seats in use, not on ActiveUserCount: that one adds readers to authors and over-warns whenever there are reader seats.

Required Permissions

The caller must have the ViewServerStatus admin permission.

Example

Request (GET)

GET /srv.asmx/GetSystemStatistics?authenticationTicket=abc123-...

Request (POST)

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

authenticationTicket=abc123-...

JavaScript

Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and errorCode is the number to report.

async function call(action, params) {
  const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
  const root = new DOMParser()
    .parseFromString(await response.text(), 'text/xml')
    .documentElement;

  if (root.getAttribute('success') !== 'true') {
    throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
  }
  return root;
}

Counts of users, documents and activity, under <SystemStatistics>. The user counts agree with GetLicenseInfo.

const root = await call('GetSystemStatistics', { authenticationTicket: ticket });
console.log(root.querySelector('TotalDocumentCount').textContent, 'documents');

Notes

  • TotalUserCount excludes the built-in system administrator account.
  • TotalDocumentSize is calculated from the VERSIONS table and reflects the sum of all stored version sizes in bytes.
  • TotalCheckedOutDocuments counts all documents currently locked for editing across all libraries.
  • RegisteredDocumentsIn30Days, RegisteredDocumentsIn60Days, and RegisteredDocumentsIn90Days count documents whose REGISTERDATE falls within the last 30, 60, or 90 days respectively. Only documents in active libraries (DOMAINTYPE=0) are included; recycle bin documents are excluded.

Error Codes

The errorCode values this operation returns, checked against a running server:

errorCode When
4010 the ticket is expired or unknown
4030 the caller may not view server status - including a caller with no ticket