Results 1 to 4 of 4

Thread: How to retrieve quota limit of a user via SOAP?

  1. #1
    Join Date
    Sep 2009
    Posts
    5
    Rep Power
    6

    Default How to retrieve quota limit of a user via SOAP?

    Hi,

    I am trying to retrieve the quota limit of a user via SOAP. I found that I can retrieve user used quota with GetInfoRequest but not the quota limit. I can also retrieve used quota and quota limit of all users via the admin SOAP API.

    However, I failed to find any SOAP API to retrieve the quota limit of one user.

    Can anyone give me any hints? Thanks.

    Jacky

  2. #2
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    Default

    info from soap-admin.txt

    <GetQuotaUsageRequest [limit="..."] [offset="..."] [domain="{limit-to-domain}"]
    [sortBy="{sort-by}"] [sortAscending="{sort-ascending}"]]>
    </GetQuotaUsageRequest>

    <GetQuotaUsageResponse more="{more-flag}" [searchTotal="{search-total}"]>
    <account name="{name}" id="{id}" used="quota-used" limit="quota-limit"/>+
    </GetQuotaUsageResponse>

    Notes:
    GetQuotaUsageRequest
    limit - the number of accounts to return (0 is default and means all)
    offset - the starting offset (0, 25, etc)
    domain - the domain name to limit the search to
    sortBy - valid values: "percentUsed", "totalUsed", "quotaLimit"
    sortAscending - whether to sort in ascending order (0/1), 0 is default, so highest quotas are returned first
    more-flag = true if more accounts left to return
    search-total = total number of accounts that matched search (not affected by limit/offset)
    used = used quota in bytes, or 0 if no quota used
    limit = quota limit in bytes, or 0 if unlimited

    The target server should be specified in the soap header (see soap.txt, <targetServer>).

    When sorting by "quotaLimit", 0 is treated as the highest value possible.
    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

  3. #3
    Join Date
    Sep 2009
    Posts
    5
    Rep Power
    6

    Default

    Hi Raj,

    Thanks for your information. I came across this API before. However, this API will retrieve information for all users. If requirement is to get the limit of one user. If I have a thousands of user in a deployment, it will take ages to retrieve the limit of the user. Are there any API to retrieve quota limit by username or similar? Thanks again.

    Jacky

  4. #4
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    10

    Default

    <BatchRequest xmlns="urn:zimbra" onerror="continue">
    <GetAccountRequest xmlns="urn:zimbraAdmin" applyCos="0">
    <account xmlns="" by="id">zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz</account>
    </GetAccountRequest>
    <GetMailboxRequest xmlns="urn:zimbraAdmin">
    <mbox xmlns="" id=""zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz""></mbox>
    </GetMailboxRequest>
    </BatchRequest>

    zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz = zimbraId of the user
    check the response you should get
    "zimbraMailQuota" = user quota from GetAccountResponse
    "s" = used quota from GetMailboxResponse

    if you developing the please get firefox + firebug and check the console for POST and that is all you ever need.

    Raj
    i2k2 Networks
    Dedicated & Shared Zimbra Hosting Provider

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  2. [SOLVED] Zimbra logwatch.
    By nishith in forum Administrators
    Replies: 5
    Last Post: 06-10-2009, 04:42 PM
  3. zmzimletctl deploy zimbra_posixaccount.zip - ERROR -
    By todd_dsm in forum Administrators
    Replies: 0
    Last Post: 04-02-2009, 01:41 PM
  4. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 10:38 AM
  5. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 09:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •