Service: zimbraAdmin

Command: SearchAccounts
Namespace: urn:zimbraAdmin
Description: Search Accounts
Access: domain admin sufficient (a domain admin can't specify "domains" as a type)
Properties:
Authorization token required true
Admin Authorization token required true
Deprecation information Note: SearchAccountsRequest is deprecated. See SearchDirectoryRequest.

SearchAccountsRequest

    <SearchAccountsRequest query="..." [limit="(Integer)"] [offset="(Integer)"] [domain="{domain-name}"]
                              [applyCos="(0|1)"] [attrs="{attrs}"] [sortBy="{sort-by}"] [types="{types}"]
                              [sortAscending="{sort-ascending} (0|1)"] /> ## SearchAccountsRequest

elements and attributes you can define within a <SearchAccountsRequest> element:

XPath Required / Optional Description
@query Required (only 1) Type: String
Query string - should be an LDAP-style filter string (RFC 2254)
@limit Optional (0 or 1) Type: Integer
The maximum number of accounts to return (0 is default and means all)
@offset Optional (0 or 1) Type: Integer
The starting offset (0, 25, etc)
@domain Optional (0 or 1) Type: String
The domain name to limit the search to
@applyCos Optional (0 or 1) Type: 0|1
applyCos - Flag whether or not to apply the COS policy to account. Specify 0 (false) if only requesting attrs that aren't inherited from COS
@attrs Optional (0 or 1) Type: String
Comma-seperated list of attrs to return ("displayName", "zimbraId", "zimbraAccountStatus")
@sortBy Optional (0 or 1) Type: String
Name of attribute to sort on. Default is the account name.
@types Optional (0 or 1) Type: String
Comma-separated list of types to return. Legal values are: accounts|resources (default is accounts)
@sortAscending Optional (0 or 1) Type: 0|1
Whether to sort in ascending order. Default is 1 (true)

SearchAccountsResponse

    <SearchAccountsResponse more="{more-flag} (0|1)" searchTotal="{search-total} (int)"> ## SearchAccountsResponse
        List of any of: {
            <calresource name="{name}" id="{id}"> ## CalendarResourceInfo
                (<a n="{key}" /> ## Attr)*
             </calresource>
            <dl [dynamic="{dl-is-dynamic} (0|1)"] name="{name}" id="{id}"> ## DistributionListInfo
                (<dlm>{members} (String)</dlm>)*
                <owners>
                    (<owner [type="{grantee-type} (usr | grp | egp | all | dom | edom | gst | key | pub | email)"]
                                id="{grantee-id}" name="{grantee-name}" /> ## GranteeInfo)*
                </owners>
                (<a n="{key}" /> ## See /calresource/a [ ## Attr])*
             </dl>
            <alias targetName="{target-name}"
                       [type="{target-type} (account | calresource | cos | dl | group | domain | server | xmppcomponent | zimlet | config | global)"]
                       name="{name}" id="{id}"> ## AliasInfo
                (<a n="{key}" /> ## See /calresource/a [ ## Attr])*
             </alias>
            <account [isExternal="{is-external} (0|1)"] name="{name}" id="{id}"> ## AccountInfo
                (<a n="{key}" /> ## See /calresource/a [ ## Attr])*
             </account>
            <domain name="{name}" id="{id}"> ## DomainInfo
                (<a n="{key}" /> ## See /calresource/a [ ## Attr])*
             </domain>
            <cos id="{id}" name="{name}" [isDefaultCos="{is-default-cos} (0|1)"]> ## CosInfo
                (<a [c="{is-cos-attr} (0|1)"] [pd="{perm-denied} (0|1)"] n="{key}" /> ## CosInfoAttr)*
             </cos>
        }
    </SearchAccountsResponse>

elements and attributes you can define within a <SearchAccountsResponse> element:

XPath Required / Optional Description
@more Required (only 1) Type: 0|1
1 (true) if more accounts left to return
@searchTotal Required (only 1) Type: int
Total number of accounts that matched search (not affected by limit/offset)
/calresource Optional (0 or 1)
/calresource@name Required (only 1) Type: String
Name
/calresource@id Required (only 1) Type: String
ID
/calresource/a Optional (0 or more) Attributes
/calresource/a@n Required (only 1) Type: String
Key
/dl Optional (0 or 1)
/dl@dynamic Optional (0 or 1) Type: 0|1
Flags whether this is a dynamic distribution list or not
/dl@name Required (only 1) Type: String
Name
/dl@id Required (only 1) Type: String
ID
/dl/dlm Optional (0 or more) Type: {members} (String)
dl-members
/dl/owners Required (only 1)
/dl/owners/owner Optional (0 or more)
/dl/owners/owner@type Optional (0 or 1) Type: usr | grp | egp | all | dom | edom | gst | key | pub | email
Grantee type
/dl/owners/owner@id Required (only 1) Type: String
Grantee ID
/dl/owners/owner@name Required (only 1) Type: String
Grantee name
/dl/a Optional (0 or more) Attributes
See /calresource/a for more details.
/alias Optional (0 or 1)
/alias@targetName Required (only 1) Type: String
Target name
/alias@type Optional (0 or 1) Type: account | calresource | cos | dl | group | domain | server | xmppcomponent | zimlet | config | global
Target type
/alias@name Required (only 1) Type: String
Name
/alias@id Required (only 1) Type: String
ID
/alias/a Optional (0 or more) Attributes
See /calresource/a for more details.
/account Optional (0 or 1)
/account@isExternal Optional (0 or 1) Type: 0|1
Whether the account's zimbraMailTranport points to the designated protocol(lmtp) and server(home server of the account).
/account@name Required (only 1) Type: String
Name
/account@id Required (only 1) Type: String
ID
/account/a Optional (0 or more) Attributes
See /calresource/a for more details.
/domain Optional (0 or 1)
/domain@name Required (only 1) Type: String
Name
/domain@id Required (only 1) Type: String
ID
/domain/a Optional (0 or more) Attributes
See /calresource/a for more details.
/cos Optional (0 or 1)
/cos@id Required (only 1) Type: String
ID
/cos@name Required (only 1) Type: String
Name
/cos@isDefaultCos Optional (0 or 1) Type: 0|1
Flag whether is the default Class Of Service (COS)
/cos/a Optional (0 or more) Attributes
/cos/a@c Optional (0 or 1) Type: 0|1
Flags that this is a Class Of Service (COS) attribute.
/cos/a@pd Optional (0 or 1) Type: 0|1
Flags that the value of this attribute has been suppressed for permissions reasons
/cos/a@n Required (only 1) Type: String
Key