FreePBX API interface?

I wonder if there is an API (eg REST interface) to the FreePBX UI.

I have build a tool (Node.js) around FreePBX that handles the call flow and allows users to join and leave queues using an external website/api interface. I also currently manipulate the SQLite/astdb database to enable disable and configure the Follow Me module. But this is probably not the best way, as future updates might use different key value pairs.

Things that I want to do for example is create a queue. I believe this could be done using Asterisk Realtime Architecture, but that will probably not play nice with FreePBX.

If there is no public API, does it make sense to create a FreePBX module and expose the required functionality that way ?

Any help is greatly appriciated

If you are already using the REST interface there is no need to use realtime. Furthermore your queues would never be the same as the ones FreePBX writes.

Every module itself has a publicly exposed API but it’s all through PHP, which doesn’t help you from a node perspective. Especially since most of the FreePBX API is blocking.

Thank you for your reply.
I think the best way is to create a FreePBX module that exposes an HTTP JSON API, to for example create sip extensions (using the bulk extensions module/api functions).
I believe there is a need for this functionality so if I go this route I will try to publish the module on github.

You can open a feature request for such a thing at http://issues.freepbx.org