I had been waiting years for proper REST API support in Joomla, but eventually I ended up rolling my own solution and turned it into a commercial product. The following response is quoted & updated from an earlier response to a similar question:
I ran into the same issue as well which is why I ended up developing a RESTful API for Joomla 3.6.x, powered by the Slim PHP micro-framework. Please note that this is a commercial Joomla package.
The package includes the following:
- Services Control Panel component
- Joomla "services" add-on library which includes a version of Slim v2.6.2 (along with several other libraries) obtain via composer and normally found in the vendor folder. More on this later...
- Services Joomla Plugin
- Services REST Plugin
- Services Slim Configuration Plugin
- Slim JSON API View plugin
- Slim JSON API Middleware plugin
You might ask, "What is the point of all these plugins?"
The answer is that it allows for compartmentalization of functionality of the core components and opens the door for an easily extensible services routes architecture. Note that new plugins could easily be added with Joomla ACL restricting access to those new routes, for example.
The Services Control Panel allows for creation of tokens on a per-user basis (or even multiple tokens per Joomla user). It also allows the end user to configure the Slim micro-framework parameters and even include a threshold for the API rate-limiting functionality (currently based on requests-per-minute). Actually, that part is totally awesome as it provides live feedback on the state of the API rate threshold within the response header.
The cAPI Core package ("cAPI", short for "Constant API" because everything needs a product name...) is just that - a core package. There is a host of add-ons currently in development, the first one being a secure LDAP JSON API (which connects to Microsoft Active Directory), with lots more cool add-ons to come.
The whole point of all this is to say that, basically, your request has been answered and now a commercially supported solution has finally arrived. Plus, instead of reinventing the wheel, I based the extension on a popular, existing micro-framework (Slim), making it easier for developers to work with or develop on the core, pluggable, framework.
So, you get the best of Joomla (robust ACL, advanced plugin architecture, wealth of extensions) and Sim (proven, standards-compliant, mature RESTful PHP micro-framework), all in one easy to install package.
Exposing a website via an easily queryable API should not be taken lightly. I would hope anyone choosing to do this would implement 100% HTTPS access and security-harden their server(s).
You can find more information here: http://getcapi.org
Hope this gets you going in the right direction.
One more thing:
I read over your question again and read that part about your need to access users and content. These were actually the first service endpoints I worked on:
- Can be used to log a user in and out and returns the activated Joomla session in the response
- This also provides for multimodal authentication (both via token in header or username & password in URL string). Basically, it works with your needs.
- You force a user logout like this:
Basically, this is tailor-made for driving remote services or, say iOS or Android apps.
- Provides ability to create, retrieve, update and delete content
- Provides ability to create, retrieve, update and delete categories
More information on available methods can be found here:
It should go without saying that all cAPI Core package improves are included in the annual subscription fee. Add-ons are (will be) billed and supported separately.
As of cAPI v1.2.1 new methods have been added to allow CRUD for Joomla user and group management. In addition, I am working on a sandbox cluster at http://getcapi.io to allow potential customers to fully test out the APIs capabilities before subscribing.
As of cAPI v1.2.5 new methods have been added to allow CRUD actions on API tokens. The API has also been updated with doc-blocks which can auto-generate a Swagger.json. cAPI includes both a back-end and front-end view for accessing the complete API docs generated by Swagger UI.
Finally, https://getcapi.io along with demo1.getcapi.io and demo2.getcapi.io are now live and allow visitors to test the API docs. Soon, they will be configured to auto-reset so that accounts can be distributed to customers so they may fully test the API on their own.