<div dir="ltr">That helps a lot.  Thanks!  I would use ipalib, but I'm developing a Rails application, so the JSON interface is the quickest (and since XML may be deprecated) best way forward (unless you know a way to use it in Ruby :).  I'm guessing in JSON, the structure would look something like this:  <br>
<div class="gmail_quote"><div dir="ltr"><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">{</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">  "method": "user_add",</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">  "params": [</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">    [],</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">    {</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">      "uid":"testuser",</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">      "givenname":"Test",</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">      "sn":"User",</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">      "userpassword":"</span><span style="font-family:arial,sans-serif;font-size:13px">mySecretPasswordBlahBlah"</span></div><div>      ...<br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">    }</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">  ]</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">}</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Maybe I'll try to compile some documentation.  I know that this page helped a lot, to cook up a quick ruby client with Curb: </span><a href="http://adam.younglogic.com/2010/07/talking-to-freeipa-json-web-api-via-curl/" target="_blank">http://adam.younglogic.com/2010/07/talking-to-freeipa-json-web-api-via-curl/</a></div>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 9:35 PM, Rob Crittenden <span dir="ltr"><<a href="mailto:rcritten@redhat.com" target="_blank">rcritten@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Dmitri Pal wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 01/14/2013 08:16 PM, Brian Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Before I pester the dev list, I was wondering if anyone here could<br>
point me to documentation on the JSON-RPC interface to FreeIPA.  I'm<br>
not doing anything fancy, just adding users and updating passwords, so<br>
my requirements are pretty tame.  I've gone through the Python code<br>
and have somewhat pieced it together myself, but would be more<br>
comfortable if there were official docs.<br>
<br>
</blockquote>
I do not remember us having documentation about XML-RPC but I will check.<br>
We are actually debating deprecating XML-RPC over time in favor of JSON.<br>
</blockquote>
<br></div>
There is no official documentation on either XML-RPC or JSON. The format is rather straightforward once you get the hang of things. Each command is effectively an RPC function (e.g ipa user-add -> user_add). The arguments consist of positional arguments followed by named arguments (there is usually only one positional arg).<br>

<br>
For XML-RPC it is generally fairly easy to work out what it's doing by adding -vv option to the command-line to see the raw request and response. I personally haven't done a lot of raw JSON work.<br>
<br>
The final option is to skip all that and use the ipalib to do the work for you.<br>
<br>
For example, to add a user you'd do something like:<br>
<br>
from ipalib import api<br>
from ipalib import errors<br>
<br>
api.bootstrap(context='cli')<br>
api.finalize()<br>
api.Backend.xmlclient.connect(<u></u>)<br>
<br>
try:<br>
    api.Command['user_add'](u'<u></u>newuser',<br>
                            loginshell=u'/bin/something',<br>
                            givenname=u'New', sn=u'User')<br>
except errors.DuplicateEntry:<br>
    print "user already exists"<br>
else:<br>
    print "user added"<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Freeipa-users mailing list<br>
<a href="mailto:Freeipa-users@redhat.com" target="_blank">Freeipa-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/freeipa-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font color="#999999"><font face="'courier new', monospace">Brian Smith</font></font></div><div><span style="font-family:'courier new',monospace;color:rgb(153,153,153)">Assistant Director</span></div>
<div><span style="font-family:'courier new',monospace;color:rgb(153,153,153)">Research Computing, University of South Florida</span></div><div><font color="#999999"><font face="'courier new', monospace">4202 E. Fowler Ave. SVC4010</font></font></div>
<div><font color="#999999"><font face="'courier new', monospace">Office Phone: +1 813 974-1467</font></font></div><div><font color="#999999"><font face="'courier new', monospace">Organization URL: <a href="http://rc.usf.edu" target="_blank">http://rc.usf.edu</a></font></font></div>

</div>