Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-19-2011, 02:30 PM
New Member
 
Posts: 3
Default Collecting COS via Zimbra Soap

I have been attempting over the last few days to determine a user's COS from search results so I can get aggregate COS Data. I have tried using SearchDirectoryRequest, and SearchAccountsRequest. I have also tried GetAllCos and then doing searches seeded with the COS ID, but nothing works.

Searching for all users using SearchDirectory, SearchAccounts, or even getAllAccounts only returns COS data for those users who have a COS specifically defined, not for users who use the default COS for their domain. They also do not appear to return what domain the user is a part of.

If I attempt to get all COS ID's using GetAllCosRequest, then I do a search using zimbraCOSId=[value], again only users who's COS ID is explicitly set in the admin interface are returned.

I would like to avoid running one query per user, as this is highly inefficient. But, so far, all I can think to do is

Get All Acounts
Foreach:
getAccountInfo for this account
excract COS from the response, and aggregate this way

This seems highly inefficient. Is there any other search path?
Reply With Quote
  #2 (permalink)  
Old 06-15-2011, 04:00 AM
Special Member
 
Posts: 117
Default

I am having same problem. Did you get the solution?
Reply With Quote
  #3 (permalink)  
Old 06-15-2011, 07:12 AM
New Member
 
Posts: 3
Default Solution

It appears as if I did. Unfortunately, Zimbra does not provide the data I wanted in query results, so I used my solution suggested in the first post. I queried getallcos and getalldomains and stored them in python dictionaries. Then i took each user one by one and sorted them by splitting their domain name from their account like soandso@domain.com .

I used the domains to cross reference the COS table, if the user didnt have one supplied, I used the domain default COS. The end result is a dictionary of domains with a dictionary of COS's used by that domain inside with a dictionary of users in there.

It's a bit of pain, but there isn't really any other good way.

To use python, you can use URL lib since zimbra doesn't publish the necessary service descriptions to use a SOAP client. I also used BeautifulSoup's BeautifulStoneSoup to parse the XML. It's awesome.
Reply With Quote
  #4 (permalink)  
Old 06-15-2011, 07:19 AM
Special Member
 
Posts: 117
Default

Alright. Got you.

BTW do to know how can I fetch COS of current logged in user?
Reply With Quote
  #5 (permalink)  
Old 06-15-2011, 07:39 AM
New Member
 
Posts: 3
Default Nope

No, sorry =/
Reply With Quote
  #6 (permalink)  
Old 06-15-2011, 09:41 AM
Special Member
 
Posts: 117
Default

Quote:
Originally Posted by fishhead2567 View Post
No, sorry =/
Alright. Thank You!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.