On 05.05.2016 23:41, Joshua J. Kugler wrote:
[This didn't show up in the archives or list after 12 house, so resending.
Sorry if it's a dupe.]

I've been googling and looking through the documentation, but I have yet to
find official docs for the Python API for FreeIPA.

The first result for 'python' when doing a search on www.freeipa.org is
http://www.freeipa.org/page/Python_Coding_Style On that page, there is a link
to "freeIPA Python API documentation" which goes to


That page, however, doesn't have one mention of Python, and only one mention
of "API" and that is "How to migrate your code to the new LDAP API" which
doesn't seem to be related.  I did manage to find
https://github.com/encukou/freeipa/tree/master/doc/examples which has a couple
(very convoluted) examples, but seems far from complete.

There is a freeipa-python RPM, but *WHERE* is the documentation for the Python
API. Or should I just shell-out to the 'ipa' command from all my python
scripts? :)

I found 
https://vda.li/en/posts/2015/05/28/talking-to-freeipa-api-with-sessions/ and 
https://git.fedorahosted.org/cgit/freeipa.git/tree/API.txt so
I'm sure I could work up something with python and requests, but I'd prefer to
use the official API if I could. :)

Any assistance would be great!



since IPA4.2 web UI contains API browser (IPA Server/API Browser)

So for example for caacl-add: api.Command.caacl_add(u'argument-ca-acl-name', description=u"optional description")

you can try commands in "ipa console" it contains initialized API, just call api.Command.<your-favorite-command>()

API.txt provides the same information as API browser, but browser looks better :)

Feel free to ask anything, if you identified gaps in docs which are hard to understand for non-IPA developer feel free report it, or feel free to create howTo in freeipa.org page.


Manage your subscription for the Freeipa-users mailing list:
Go to http://freeipa.org for more info on the project

Reply via email to