9

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 and receives data Basically exposes many common CMS functions as API endpoints Has a normal looking Joomla admin UI for managing API keys Documentation is good ...


6

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 access to restricted areas. Thus, in a REST Api, you have to implement an authorization protocol, like OAuth, to generate access tokens. In TechJoomla's com_api, ...


4

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 work of redWEB. At the moment you would need to add an add on. Either one of the options other people have mentioned or a coded api talking direct with the DB....


4

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 from within your layout (sub-view?) by including the model on that page. Layout 1 $model = JModelLegacy::getInstance('ViewName','ComponentNameModel'); $...


3

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 $_SERVER['DOCUMENT_ROOT'].'/includes/defines.php'; require_once $_SERVER['DOCUMENT_ROOT'].'/includes/framework.php'; $app = JFactory::getApplication('site'); $...


3

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 https://github.com/pvullioud/joomla-slimframework


2

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 token and parameter management component with accompanying plugins defining major service route groups (and upcoming add-ons). cAPI provides both simple username/...


1

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, in this case, that the install file is suitable for Joomla 1.5: <install version="1.5" type="plugin" group="system" method="upgrade"> As you probably ...


1

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 flow, but you are calling it directly. Right? In this case, you skip Joomla, the 403 error you get isn't coming from Joomla. Most likely this is a security ...


1

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 needs and abilities. Install an appropriate 3rd party Joomla component and rewrite your API to push data into the default db tables of the component and delete ...


1

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: https://stackoverflow.com/a/32706378/5361267 I ran into the same issue as well which is why I ended up ...


1

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 /** * @version $Id: myauth.php 7180 2007-04-23 16:51:53Z jinx $ * @package Joomla.Tutorials * @subpackage Plugins * @license GNU/GPL */ ...


1

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 create login with email


1

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 then all of public extensions.


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