Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[4.0] Web Services #23424
This is a base for a web services implementation for Joomla 4
What this has got in
What does this not have in
Before moaning about a lack of feature X
Please read the specification https://joomla-projects.github.io/gsoc18_webservices/ - this has long been agreed on and is my no means perfect. Think about if it's absolutely essential for a day 1 integration or not. What we have in this PR is already significantly more than wordpress has and is probably equal to what's available in the other top level CMS'
@brianteeman I've amended the language strings and the doc blocks where we refer to web services as a noun. I've left the plugin type as it is - because obviously it can't have spaces and i've found from practical experience with editors-xtd that most people struggle with the concept of removing the
@Hackwar addressed all your comments. So I deliberately didn't put in the switch yet because I want it in a separate PR. Reason being - there is an argument that inter-component webservices should always be available. The switch should be a limit for the public facing webservices (I honestly can see this both ways). As a result I want to deliberately NOT have that discussion in this PR and leave it for later and instead introduce the base application here and let that discussion be done in a separate follow up PR (which I commit to doing in order to allow that conversation to take place)
I tried testing this
This did not work
Here is a postman collection I created and used
First off all: thank you @wilsonge and all others worked on this Web Services PR, great work!
We have been looking into this PR this afternoon. In the past we have developed a custom REST API solution to serve Joomla articles for our customers. So as a test-case we are now doing this again, but by using this new core feature (and possibly a custom web services plugin).
A couple comments so far:
2. Requests not working
3. SEF support
These are some first comments based on our first impressions. Its great to see Web Services are on the horizon of Joomla 4 and will try to test/contribute as much as possible to make this happen for Joomla 4 :)
First of all thanks so much for the detailed feedback and testing!
Sorry forgot to update that page. This had the 'correct' URLs on https://github.com/joomla-projects/gsoc18_webservices/blob/master/manual/en-US/about-joomla/installing-the-repo.md but either way I've normalised everything (I've now also expanded the API Auth section). Note that since your test I've added in the version prefix as per the original plan. Hopefully this now reflects what's in the product (once github propagates the commits into the docs)
There's a possibility I might swap the Basic Auth out for a token based system before this goes stable. But for now at least it will be basic auth.
Did you guys clear the libraries/autoload_psr4.php file to autoload the components api sections? Because if you didn't that would definitely cause the issue you're seeing. I have also fixed an issue with the edit and post commands. Looks like I still have a bug in the delete one which I'll look into tomorrow.
I thought I'd covered this with https://github.com/wilsonge/joomla-cms/blob/webservices-version2/libraries/src/Router/ApiRouter.php#L117-L128 - might need some help to test this if it's not working as I'm mostly working local and haven't set up the whole htaccess stuff.
Oops section missing from com_config now added. Hopefully that's the permission you were looking for (note by default I'd picked admin users only but again that can all be negotiated)