Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Help: Need a REST URL to return all emails (all folders) matching search criteria

  1. #1
    Join Date
    Jul 2006
    Location
    Australia, ACT
    Posts
    197
    Rep Power
    9

    Question Help: Need a REST URL to return all emails (all folders) matching search criteria

    Hi Zimbra Community

    I'd like to issue a REST URL to query a users mail store and return a ZIP or RSS feed to all emails matching a query.

    There is some information in the Wiki.
    http://wiki.zimbra.com/index.php?title=User_Migration
    And SVN
    http://svn.sourceforge.net/viewvc/zi...=1&view=markup

    For example:
    Code:
    http://[hostname]/zimbra/home/[/url][zimbra-username]/?fmt=zip&query=(from:(@zimbra.com))
    Should return a ZIP containing all emails from zimbra.com. But it doesn't work.

    This example DOES work, but only searches the Inbox folder.
    Code:
    http://[hostname]/zimbra/home/[/url][zimbra-username]/inbox.zip?query=(from:(@zimbra.com))
    Can anyone help out?

  2. #2
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    REST currently requires a folder to root the search. Please file a bug for this enhancement. Also vote on it as this is one way we prioritize which features to work on next.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    I'm pretty sure that used to work. I know I used to do things like an RSS feed for all unread items in a mailbox, across folders. I have a feeling that functionality was accidently removed during recent changes for public sharing and document support.

    Please file a bug on it, and hopefully we can get it fixed in a patch release.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  4. #4
    Join Date
    Oct 2006
    Posts
    7
    Rep Power
    8

    Default

    I'd like to issue a REST URL to query a users mail store and return a ZIP or RSS feed to all emails matching a query.
    I'd like to do a similar thing : a search based on the ID.
    For example, if I want to backup the e-mail with the following ID 4144, 4145 and 4168, (*) which is the correct REST URL to write ?

    For a singolar e-mail I've tried with
    (THIS WORK, I KNOW)
    Code:
    http://server/zimbra/user/uname/inbox?id=4144&fmt=zip
    but
    Code:
    http://server/zimbra/user/uname/inbox?fmt=zip&query=(id:4144)
    or
    Code:
    http://server/zimbra/user/uname/?fmt=zip&query=(id:4144)
    DON'T WORK even because I don't know which are the keywords (more then IS and FROM) by which build a query.

    However (*) is my main issue.
    10x to all for any support.
    Last edited by AranBenjO; 10-25-2006 at 08:37 AM.

  5. #5
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    Quote Originally Posted by AranBenjO
    I'd like to do a similar thing : a search based on the ID.
    For example, if I want to backup the e-mail with the following ID 4144, 4145 and 4168, (*) which is the correct REST URL to write ?
    Have you tried something like this?
    Code:
    http://server/zimbra/user/uname/inbox?fmt=zip&query=(item:{4144,4145,4168})
    Bugzilla - Wiki - Downloads - Before posting... Search!

  6. #6
    Join Date
    Oct 2006
    Posts
    7
    Rep Power
    8

    Default

    Have you tried something like this?
    http://server/zimbra/user/uname/inbox?fmt=zip&query=(item:{4144,4145,4168})
    Yes, but it doesn't work

  7. #7
    Join Date
    Oct 2006
    Posts
    7
    Rep Power
    8

    Default

    Hi ! I've found a useful documentation on query structure here

    I've another little question : with this query

    http://server/zimbra/user/uname/?fmt=zip&query=(tag:tagname)

    I would collect in a zip file all messages tagged with "tagname" present in ALL directories, or ALL directories except TRASH o SPAM, but I get in return all messages in INBOX tagged with "tagname" without searching recursively in INBOX.

    If I have a directory structure like this (dirs with capital letter)

    INBOX
    ...|--->Message tagged0
    ...|--->Message tagged0.1
    ...|--> TEST1
    .............|--->Message tagged1
    ...|--->TEST2
    .............|--->Message tagged2
    .............|--->TEST2.1
    .......................|--->Message tagged2.1
    ...|--->TEST3

    The query will return only Message tagged{0, 0.1} without scanning recursively in all subdirs. I read (here in ISSUES/NOTES) in the past that there was a way to do this adding at the end of the url "?recursive=1" but this solution doesn't work.
    If I add "&recursive=1" there is always no recursively scan.

    Does anybody know a solution ?
    10x

  8. #8
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    Which version are you using? There was a bug (10557) that was fixed in main and should be in the next release (not 4.0.x though). I tried off my main build and it it indeed is searching across all folders.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  9. #9
    Join Date
    Oct 2006
    Posts
    7
    Rep Power
    8

    Default

    Which version are you using?
    This is the output of zmcontrol -v :
    Release 4.0.1_GA_324.RHEL4_20060906182455 CentOS4 NETWORK edition

    Which is your version ?

  10. #10
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    As I mentioned, it is off of our main branch, which is the next release that isn't a 4.0.x release. I think the current plan is before the end of the year.
    Bugzilla - Wiki - Downloads - Before posting... Search!

Similar Threads

  1. [SOLVED] Searching message headers?
    By gkra in forum Users
    Replies: 2
    Last Post: 08-11-2007, 08:26 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
  •