<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">Replies inline.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 31, 2016, at 6:41 AM, Maximiliano Sbrocca &lt;<a href="mailto:maximiliano.sbrocca@santexgroup.com" class="">maximiliano.sbrocca@santexgroup.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello everybody,<div class=""><br class=""><div class=""><div class=""><br class=""></div><div class="">&nbsp; &nbsp; My name is Maxi and I'm analyzing caldav servers to implement in the company I'm working for. The company has an app where events are created. Once it happen, emails are sent with ICS files. The idea is to also save the events in the caldav server. I've this part working (dev mode) by calling the Darwin API (<a href="http://localhost:8008/calendars/users/" class="">http://localhost:8008/calendars/users/</a>&lt;USER&gt;/calendar/&lt;ICS-File&gt;.ics and the ics file content in the request body). Then users will be able to sync their events against the caldav server. (This is also working. I was able to sync my events using Evolution and Thunderbird).</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;What I need now, is some help with the API part for users creation.&nbsp;</div></div></div></div></div></blockquote><div><br class=""></div><div>There is no such API. CalendarServer itself does not act as a directory service; instead it accesses an existing directory service in a read-only fashion to acquire the various record types used by the service. The options for the directory backend are: XML files, such as the ones you see in the SVN checkout under conf/auth, or LDAP.</div><div><br class=""></div><div>The calendarserver_manage_princinpals tool does allow for creating location, resource, or 'address' records (address records are used to support newer geo features), but not user records. For production uses, we generally don't recommend using the XML file method as it's not very interoperable. The interoperable, production-grade option is LDAP. You are still free to spin your own workflow around modification of the XML files, which might still be the path of least resistance if you don't need to interoperate with a lot of other things.</div><div><br class=""></div><div>Hope this helps,</div><div>-dre</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">&nbsp; &nbsp; &nbsp;Logged as the admin (admin/admin) I'm making PUT calls to:</div><div class=""><br class=""></div><div class=""><a href="http://localhost:8008/calendars/users/" class="">http://localhost:8008/calendars/users/</a><br class=""></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;The request header has&nbsp;Authorization - Basic for admin/admin and the body I'm sending is:</div><div class=""><br class=""></div><div class=""><div class="">&lt;record type="user"&gt;</div><div class="">&nbsp; &nbsp; &lt;short-name&gt;maxi.sbrocca&lt;/short-name&gt;</div><div class="">&nbsp; &nbsp; &lt;uid&gt;maxi.sbrocca&lt;/uid&gt;</div><div class="">&nbsp; &nbsp; &lt;password&gt;password&lt;/password&gt;</div><div class="">&nbsp; &nbsp; &lt;full-name&gt;Maxi Sbrocca&lt;/full-name&gt;</div><div class="">&nbsp; &nbsp; &lt;email&gt;<a href="mailto:maximiliano.sbrocca@santexgroup.com" class="">maximiliano.sbrocca@santexgroup.com</a>&lt;/email&gt;</div><div class="">&nbsp; &lt;/record&gt;</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;And the response error I'm getting is:</div><div class=""><br class=""></div><div class=""><div class="">&lt;?xml version='1.0' encoding='UTF-8'?&gt;</div><div class="">&lt;error xmlns='DAV:'&gt;</div><div class="">&nbsp; &nbsp; &lt;need-privileges&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;resource&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;href&gt;/calendars/users/&lt;/href&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;privilege&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;write-content/&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/privilege&gt;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;/resource&gt;</div><div class="">&nbsp; &nbsp; &lt;/need-privileges&gt;</div><div class="">&lt;/error&gt;</div></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; I'm not seeing any console log error:</div><div class=""><br class=""></div><div class="">2016-03-31T10:40:24-0300 [caldav-0] &nbsp;[txweb2.server#info] PUT /calendars/users/ HTTP/1.1<br class=""></div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;Could you please help me to find out what I'm doing wrong?</div><div class="">&nbsp; &nbsp;</div><div class="">Thanks in advance,</div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 13px; margin: 0px; background-color: rgb(255, 255, 255);" class=""><b style="font-family: 'Times New Roman'; font-size: inherit;" class=""><span style="font-size:15px;font-family:Calibri;vertical-align:baseline;white-space:pre-wrap" class="">Sbrocca Hector Maximiliano</span></b><br class=""></div><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><font face="Calibri" class=""><span style="font-size:15px;white-space:pre-wrap" class="">Software Engineer</span></font></div><div dir="ltr" style="font-size:12.8px" class=""><font face="Calibri" class=""><span style="font-size:15px;white-space:pre-wrap" class=""><br class=""></span></font><div class=""><br class=""></div><div class=""><img src="http://santexgroup.com/images/Santex_logo.png" class=""><br class=""></div><span style="font-size:15px;font-family:Calibri;vertical-align:baseline" class="">Vélez Sársfield 576 &nbsp;4° piso.</span><span style="vertical-align:baseline;font-size:15px;font-family:Calibri" class="">&nbsp;&nbsp;</span><span style="font-size:15px;font-family:Calibri;color:rgb(255,0,0);font-weight:bold;vertical-align:baseline" class=""></span><br style="font-size:13px" class=""><span style="vertical-align:baseline;font-size:15px;font-family:Calibri" class="">Córdoba, Argentina. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br style="font-size:13px" class=""><span style="vertical-align:baseline;font-size:15px;font-family:Calibri" class="">+54 (0351) 589 7070 &nbsp; &nbsp;&nbsp;</span><br class=""><div class=""><span style="vertical-align:baseline;font-size:15px;font-family:Calibri" class=""><font color="#3333ff" class=""><a href="http://www.santexgroup.com/" style="color:rgb(17,85,204)" target="_blank" class="">www.santexgroup.com</a></font></span></div><div class=""><br class=""></div><div class="">Follow us</div><div class=""><br class=""></div><div class=""><a href="https://www.facebook.com/SantexGroup" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/F.png" class=""></a>&nbsp;<a href="https://twitter.com/santexgroup" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/T.png" style="font-size: 12.8px;" class=""></a><span style="font-size:12.8px" class="">&nbsp;</span><a href="https://plus.google.com/+Santexgroup/posts" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/G.png" style="font-size: 12.8px;" class=""></a><span style="font-size:12.8px" class="">&nbsp;</span><a href="https://www.linkedin.com/company/129740?trk=tyah&amp;trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A129740%2Cidx%3A1-1-1%2CtarId%3A1442929736721%2Ctas%3Asantex" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/L.png" style="font-size: 12.8px;" class=""></a><span style="font-size:12.8px" class="">&nbsp;</span><a href="https://www.youtube.com/user/TheSantexChannel" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/Y.png" style="font-size: 12.8px;" class=""></a><span style="font-size:12.8px" class="">&nbsp;</span><a href="http://santexgroup.com/blog/" style="color:rgb(17,85,204)" target="_blank" class=""><img src="http://santexgroup.com/images/B.png" style="font-size: 12.8px;" class=""></a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div>
_______________________________________________<br class="">calendarserver-dev mailing list<br class=""><a href="mailto:calendarserver-dev@lists.macosforge.org" class="">calendarserver-dev@lists.macosforge.org</a><br class="">https://lists.macosforge.org/mailman/listinfo/calendarserver-dev<br class=""></div></blockquote></div><br class=""></div></body></html>