Results 1 to 5 of 5

Thread: REST query should work, but doesn't

  1. #1
    DrXero is offline Member
    Join Date
    Apr 2007
    Posts
    13
    Rep Power
    8

    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.

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    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!

  3. #3
    DrXero is offline Member
    Join Date
    Apr 2007
    Posts
    13
    Rep Power
    8

    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?

  4. #4
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    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!

  5. #5
    DrXero is offline Member
    Join Date
    Apr 2007
    Posts
    13
    Rep Power
    8

    Talking bingo

    Beautiful! Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 17
    Last Post: 11-04-2008, 12:25 PM
  2. Lotus migration
    By babou in forum Migration
    Replies: 15
    Last Post: 03-05-2007, 10:33 PM
  3. Replies: 42
    Last Post: 08-11-2006, 09:50 AM
  4. HELP- Making Zimbra work. after installation
    By hifriend1 in forum Installation
    Replies: 7
    Last Post: 04-05-2006, 06:43 AM
  5. REST, distributed filesystems, and AJAX
    By debianfoo in forum Developers
    Replies: 4
    Last Post: 11-08-2005, 11:38 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
  •