Results 1 to 3 of 3

Thread: wierdness when importing contacts with the REST API

  1. #1
    Join Date
    May 2006
    Rep Power

    Default wierdness when importing contacts with the REST API

    Hi, I'm seeing an odd thing when using the REST API to import contacts.

    The attached contacts.csv.txt (.txt suffix so that it be attached to this forum thread) contains 20 rows plus a header row.

    When I import it via:
    curl -u userassword --data-binary @/tmp/contacts.csv.txt \

    I only see the first 16 contacts inside zimbra. That's the case whether I log i via the web-based UI, or suck them out again using http GET. I can only see 16 "blah ... mailbox - UserServlet (POST) ... blah" lines in /opt/zimbra/log/zimbra.log Stopping and starting zimbra doesn't help.

    But, if I split this one file into 20 files, each with one line of header and one line of contact, and import each file separately:
    for i in contact-part-*; do
    curl -u userassword --data-binary @/tmp/$i \
    it works as expected. 20 contacts in zimbra.

    I originally began working with 500 contact lines in a .csv, where zimbra took the first 16, skipped some, took a few more and so on. Out of 500-odd contacts it imported maybe 30-odd.

    I'm happy with the workaround, just thought I'd post for interest.
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2005
    Rep Power


    I noticed that some lines ended with:


    and (5 to be exact) did not:


    If I added a ',' to the end of all them then all 20 import in one shot.

    I need to do a little more research to figure out if it is a bug or not, but it sounds like it might be.

    Can you please a bug report?

    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    May 2006
    Rep Power

    Default trailing commas required

    Looks like when importing a .csv file via the REST API, if the file contains consecutive lines without a trailing comma, the first of these lines is imported but subsequent lines without a trailing comma are not.

    Bug filed as:

Similar Threads

  1. Replies: 3
    Last Post: 04-28-2010, 09:46 AM
  2. Importing Existing Contacts
    By tgrossner in forum Administrators
    Replies: 6
    Last Post: 10-07-2008, 07:47 AM
  3. Importing contacts - Example Format
    By KevinH in forum Administrators
    Replies: 3
    Last Post: 09-22-2008, 01:40 PM
  4. Howto update contacts using REST interface?
    By tigger in forum Administrators
    Replies: 0
    Last Post: 05-23-2007, 03:26 AM
  5. not all contacts importing
    By Spencer in forum Administrators
    Replies: 5
    Last Post: 08-22-2006, 08:06 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