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 12-22-2006, 11:16 AM
Intermediate Member
 
Posts: 24
Default I'm trying to use SearchAccountsRequest SOAP call

I'm trying to use SearchAccountsRequest SOAP call w/o success. I want to query all the existing accounts that we have, but I receive 0 accounts (see below).

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<authToken>xxxxxxxx</authToken>
</context>
</soap:Header>
<soap:Body>
<SearchAccountsRequest xmlns="urn:zimbraAdmin" types="accounts">
<query>(mail=*%s*)</query>
</SearchAccountsRequest>
</soap:Body>
</soap:Envelope>
Reply With Quote
  #2 (permalink)  
Old 12-22-2006, 11:22 AM
Zimbra Employee
 
Posts: 228
Default

Searching for (mail=*%s*) is only going to find accounts that have a "%s" in their email address, which is probably zero. Something like "(mail=*)" would be better.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 12-22-2006, 11:37 AM
Intermediate Member
 
Posts: 24
Default

thanks it worked. I have another question to ask you. I'm trying to return only one attribute called zimbraAccountStatus (see my soap call below). Unfortunately, it returns the entire list of attributes.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<authToken>xxxxxxxxxxxxx</authToken>
</context>
</soap:Header>
<soap:Body>
<SearchAccountsRequest xmlns="urn:zimbraAdmin" attrs="zimbraAccountStatus" types="accounts">
<query>(mail=*)</query>
</SearchAccountsRequest>
</soap:Body>
Reply With Quote
  #4 (permalink)  
Old 12-22-2006, 11:52 AM
Zimbra Employee
 
Posts: 228
Default

That is a known issue.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
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.