9 votes
Accepted

Creating an API for a Joomla extension

There are a few options, but I use the jBackend extension. Some positives of jBackend. Nice clean JSON Comes with good boilerplate code to get started Manages API keys API endpoint code transmits ...
user avatar
6 votes

How to use com_api plugin for REST?

In the context of a REST Api, each call is stateless. So, there is no "user login". In a Joomla site, when a user is authenticated, the browser receives a cookie to authorize the navigation and ...
user avatar
  • 7,415
5 votes
Accepted

Model / View pulling data from external API(s)

You can actually do it either way depending on which method you prefer. The way you are currently calling the functions in the view.html.php file is fairly common but you can also call those functions ...
user avatar
  • 1,737
4 votes

RESTful API to manage article

There is no out of the box Joomla API but the team are working on a Web Services part for maybe Joomla 3.6 or soon after. This will then have full oAuth api services. I believe it will be based on the ...
user avatar
3 votes

Joomla 3 - JSON with modules

In my opinion, the best approach is to use a custom plugin, that will be called using com_ajax interface. It doesn't have to be a 'system' plugin, it can be any group, as it will be specified in url. ...
user avatar
  • 161
3 votes

What is the best way to create REST/SOAP/JSON Web Services for Joomla?

In Joomla 4 you can use the new webservices API where you have to create a plugin and some views to render the data. More information can be found in the official docs.
user avatar
  • 503
3 votes

What is the best way to create REST/SOAP/JSON Web Services for Joomla?

Create a new php file (webapi.php) and save it to the root of your site. Add in the required files to access the Joomla Framework like so: //ALLOW DIRECT ACCESS define('_JEXEC', 1); require_once $...
user avatar
  • 1,737
3 votes

Creating an API for a Joomla extension

If you need clean REST urls like : [GET] api/articles/1 You can have a look to my project : https://github.com/pvullioud/japi or if you don't wont to use plugins, you have a more simple exemple here ...
user avatar
2 votes

RESTful API to manage article

If you are looking for additional solutions, you may also want to look at the just released cAPI REST API for Joomla (http://getcapi.org). It is powered by the Slim PHP micro-framework, provides a ...
user avatar
2 votes

Joomla 3 - JSON with modules

If you need only a single URL to return a json string containing just a prepared subset of a single module’s params and a copy of all the paths and titles of a single menu then I would suggest a very ...
user avatar
  • 3,134
2 votes
Accepted

Crawling Joomla websites without parsing website's html

Joomla! 4.0 will have Web Services. In 3.x, without using extensions or custom code, there's no way to do this for single articles. For article listings (category views) you could use RSS/Atom feed ...
user avatar
  • 8,222
2 votes
Accepted

Can Joomla control access to a separate API which is behind a reverse proxy?

Presently in Joomla! 3 you cannot do that. Although TechJoomla have an API that you could use. https://techjoomla.com/rest-api-for-joomla In Joomla! 4 you can use the inbuilt API as seen on this ...
user avatar
  • 1,819
2 votes
Accepted

Techjoomla API using same ACL as site

If your js is attached to a joomla page then you can get your users to login to joomla in the usual way. Then when your js executes an ajax call to the server, because the browser sends the session ...
user avatar
1 vote
Accepted

How can I make a custom controller for a Joomla based api?

See the docs for controller task - Model View Controller. Since you want to make it accessible to registered users and not to the public, you can simply check the user and return if your checks do not ...
user avatar
  • 674
1 vote

Pulling api data and saving to mySQL

My approach would be to create Scheduler Task plugin to allow you to run it periodically and manage it from the Admin pages. The code in the task plugin could either do the steps to call the API, ...
user avatar
  • 2,190
1 vote
Accepted

Are custom fields updatable using joomla 4 api?

Actually it works. This can be done by issuing a PATCH request to the content/articles/{{article_id}} endpoint {{base_url}}/{{base_path}}/content/articles/{{article_id}} Replace {{base_url}} with ...
user avatar
1 vote
Accepted

J4 API - There are two variables for Article Text, why do neither work on PATCH?

Patch is successful with caveats instead of using text or articletext the correct variables are introtext and fulltext. To note in one test both introtext & fulltext did not work together but ...
user avatar
  • 45
1 vote
Accepted

Does on after save work with the API call?

Looking at the API code for com_content it seems to just pass the data back to the com_content model/article in the Admin directory so I would think it would be triggering the same plugin.
user avatar
  • 2,190
1 vote

Does Joomla CMS or Joomla Framework provide any Class for making POST request to an external API?

As you might already figured out, yes its the same and yes thats the way it works... As described in the manual: use Joomla\Http\HttpFactory; // Create an instance of a default Http object. $http = ...
user avatar
  • 483
1 vote

Crawling Joomla websites without parsing website's html

Joomla 3 There are a few existing places to get an API for Joomla! 3. https://techjoomla.com/rest-api-for-joomla https://www.selfget.com/products/jbackend.html Joomla 4 Or in Joomla! 4 is a full API ...
user avatar
  • 1,819
1 vote
Accepted

SEF URL Broken Image Links When Fetching API Results

So... I made this far too difficult for myself. The answer is that I had a space in my code, right after the opening img src=" this was causing the Joomla SEF plugin to prefix my domain URL in the ...
user avatar
  • 3,491
1 vote

Error! Could not find a Joomla! XML setup file in the package

Expanding each zip install file and examining the .xml file will tell you the minimum version of Joomla the install file is designed for. Look for a line similar to the following example which shows, ...
user avatar
1 vote
Accepted

Accessing ajax/REST based php api

We have minimum information about how you have implemented all the above, however, I guess that you have created a php script somewhere that won't be executed/accessed from within Joomla's execution ...
user avatar
  • 19.5k
1 vote

Integrating an existing API with PHP/mySQL to Joomla for inventory Management

I think it would be counter-productive to attempt to rewrite a Joomla component to push and pull data in and out through your api endpoints. I think rather you have several options depending on your ...
user avatar
  • 3,134
1 vote

Making changes to a Joomla site via REST

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 & ...
user avatar
1 vote

How to leverage external JSON REST API in Joomla 3.5.1 after user login?

You have to create an authentification plugin see the documnentation :https://docs.joomla.org/J3.x:Creating_an_Authentication_Plugin_for_Joomla/en and my pseudo code below <?php /** * ...
user avatar
1 vote

How to leverage external JSON REST API in Joomla 3.5.1 after user login?

You must use onUserAfterLogin as this triggered after successful login. Authenticate is called to verify login credentials (for example you can use it to block login for users with specific IP, or to ...
user avatar
  • 1,120
1 vote

API to publish articles on Joomla

Currently there is none. You can check for available extensions (I doubt there will be any worth using) or create simple CLI application for that. It will be resource efficient, fast and more secure ...
user avatar
1 vote

Creating an API for a Joomla extension

If a ready-made made extension is acceptable, then my suggestion is Headless Joomla and the Virtuemart plugin from codingmall. It gives you detailed info for any Joomla view using simple REST calls ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible