Service: zimbraAdmin
Namespace: "urn:zimbraAdmin"
CountObjects SOAP Command

Count number of objects.
Returns number of objects of requested type.

Note: For account/alias/dl, if a domain is specified, only entries on the specified domain are counted. If no domain is specified, entries on all domains are counted. For accountOnUCService/cosOnUCService/domainOnUCService, UCService is required, and domain cannot be specified.

Authorization token required true
Admin Authorization token required true

CountObjectsRequest

    <CountObjectsRequest
                            type="(userAccount|account|alias|dl|domain|cos|server|calresource|accountOnUCService|cosOnUCService|domainOnUCService|internalUserAccount|internalArchivingAccount)"> ## CountObjectsRequest
        (<domain [by="{domain-selector-by} (id|name|virtualHostname|krb5Realm|foreignName)"]>{key}</domain> ## DomainSelector)*
        <ucservice [by="{ucservice-by} (id|name)"]>{key}</ucservice> ## UCServiceSelector
    </CountObjectsRequest>

The following table describes elements and attributes you can define within a <CountObjectsRequest> element:

XPath Required / Optional Description
@type Required (only 1) Type:userAccount|account|alias|dl|domain|cos|server|calresource|accountOnUCService|cosOnUCService|domainOnUCService|internalUserAccount|internalArchivingAccount
Object type
/domain Optional (0 or more) Type:{key}
Domain
Description for element text content:The key used to identify the domain. Meaning determined by {domain-selector-by}
/domain@by Optional (0 or 1) Type:id|name|virtualHostname|krb5Realm|foreignName
Select the meaning of {domain-selector-key}
/ucservice Optional (0 or 1) Type:{key}
UCService
Description for element text content:Key for choosing ucservice
{ucservice-by}="id" Use ucservice's zimbraId as the Key
{ucservice-by}="name" Use name of the ucservice as the Key
/ucservice@by Optional (0 or 1) Type:id|name
Selects the meaning of {ucservice-key}

CountObjectsResponse

    <CountObjectsResponse num="{num-objects} (long)" type="..." /> ## CountObjectsResponse

The following table describes elements and attributes you can define within a <CountObjectsResponse> element:

XPath Required / Optional Description
@num Required (only 1) Type:long
Number of objects of the requested type
@type Required (only 1) Type:String