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 06-07-2007, 01:08 PM
Member
 
Posts: 13
Question REST query should work, but doesn't

I've seen examples in a few places (including this one: User Migration - ZimbraWiki ) of how to retrieve a list of all contacts that have been tagged with a certain tag.

The published format is:
Code:
http://server/zimbra/home/schemers/contacts.csv?query="tag:zimbra"
But when I try this:
Code:
http://192.168.0.112/zimbra/home/dreed/contacts.csv?query="tag:bureau"
I get a CSV file with the field header row, but no content. And several contacts are tagged with the 'bureau' tag.

If I leave off the query part of the URL, it returns all contacts as it should.

Why isn't the query working?

As an alternative, does anyone have an example of a SOAP call that returns all the fields for all contacts that match a tag?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 06-11-2007, 12:02 PM
Zimbra Employee
 
Posts: 1,434
Default Don't use quotes!

Do not quote the query. If you quote the query, Zimbra treats it as a string search, and that string doesn't appear in any messages...
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 06-11-2007, 01:23 PM
Member
 
Posts: 13
Default almost there...

Bingo.

Taking off the quotes solved the problem -- thank you. There are at least a couple of places on zimbra.com where the quoted syntax is shown; may want to look for that next time someone cleans up documentation.

A new question exposed: the query doesn't include contacts from all of my address books -- only the main 'Contacts' book. What query do I use to to include contacts in other/all address books?
Reply With Quote
  #4 (permalink)  
Old 06-11-2007, 02:02 PM
Zimbra Employee
 
Posts: 1,434
Default "contacts.csv" says to constrain to the "Contacts" folder

Try somthing like this:
Code:
http://192.168.0.112/zimbra/home/dreed/?fmt=csv&query=tag:bureau
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #5 (permalink)  
Old 06-11-2007, 05:15 PM
Member
 
Posts: 13
Talking bingo

Beautiful! 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.