Hi Yuri,
Yes, the API is intended to allow remote access. Basically it's a single
page (api.php):
https://github.com/ibettinger/racktables/blob/master/wwwroot/api.php
The documentation for it is similarly lacking, but if you add it to your
Racktables installation you can try a few sample queries like:
gets all values in chapter 11:
https://<<YOURHOST>>/api.php?method=get_chapter&chapter_no=11&style=o
gets basic info on object ID 1827:
https://<<YOURHOST>>/api.php?method=get_object&object_id=1827
gets object ID 1827, including attribute data:
https://
<<YOURHOST>>/api.php?method=get_object&object_id=1827&include_attrs=1
gets object ID 1827, including attribute data for all attributes, including
unset ones:
https://
<<YOURHOST>>/api.php?method=get_object&object_id=1827&include_attrs=1&include_unset_attrs=1
gets all objects in the depot with object type 4 (servers)
https://<<YOURHOST>>/api.php?method=get_depot&andor=and&cft[4]
Most exceptions are printed out as JSON responses.
Hope this helps. I'm working on a more robust integrated version (for
example this API basically circumvents the Racktables permissions model)
but it will probably be a couple months before that becomes a reality.
Cheers,
Ian
ps: I put up a copy of the Python client library I'm working on (still
pretty primative) here: https://github.com/ibettinger/racktables-py-client
Post by Alexey AndriyanovPost by Les MikesellPost by Alexey AndriyanovThere is no documentation for SQL schema. The developers strongly
recommend
Post by Les MikesellPost by Alexey Andriyanovto automate inserting/updating data by using RackTables' PHP library
functions, not raw SQL queries. The PHP interface is more stable and
convenient than SQL.
It might be convenient for an experienced php developer working on the
same machine. I don't see how it is convenient from another language
or remotely. Has anyone wrapped a complete import/export to xml or
json around it yet? Or anything generic enough for a non-php
application to manipulate?
https://github.com/ibettinger/racktables
Perhaps Ian can comment on this in more details.
--
Denis Ovsienko