I am trying to retrieve a list of contacts (in .vcf format) from the Sogo
groupware system, using CardDav.  I have used my code with other systems
successfully, but Sogo does not work as I expect. I have the URL set to:

https://<server>/SOGo/dav/<user>/Contacts/personal/

The user id and password are supplied to libcurl.  The command is REPORT with
the following xml:

<?xml version="1.0" encoding="utf-8" ?>
<card:addressbook-query xmlns:d="DAV:"
xmlns:card="urn:ietf:params:xml:ns:carddav">
<d:prop>
<d:getetag />
<card:address-data>
</card:address-data>
</d:prop>
<card:filter>
<card:prop-filter name="FN">
</card:prop-filter>
</card:filter>
</card:addressbook-query>

With other systems, this query will produce a file containing multiple vcard
entries, which is what I want.  With Sogo, all I get is this:

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"></
D:multistatus>

I have noticed that the PROPFIND command to the above URL will give me a very
large file, containing multiple URLs, one for each contact entry.  Those do in
fact work, but it will be much slower having to execute possibly thousands of
GETs to retrieve them one by one. Does anyone have an idea about what is wrong
with my address book query?

Related question: I want to do basically the same thing with the calendar
(slightly different xml input) and have the same problem.  However there is a
workaround, in that I can execute a GET to this URL:

https://<server>/SOGo/dav/<user>/Calendar/personal.ics

and I get the entire .ics file that I want.  However there does not seem to be
an
equivalent URL I can use for contacts - am I wrong?



-- 
[email protected]
https://inverse.ca/sogo/lists

Reply via email to