The K2 Module is implemented with the plg_jbackend_k2 plugin. It provides functions related to K2 content construction kit for Joomla (items and categories). Here is the list of supported methods.
action=get module=k2 resource=categories rootid=<R> (optional) endlevel=<E> (optional)
<end-point>?action=get&module=k2&resource=categories&rootid=<R>&endlevel=<E>
<end-point>/get/k2/categories?rootid=<R>
{ "status": "ok", "total": <T>, "categories": [ { "id": "<category id>", "name": "<category name>", "alias": "<category alias>", "description": "<category description>", "parent": "<parent category id>" }, ... { "id": "<category id>", "name": "<category name>", "alias": "<category alias>", "description": "<category description>", "parent": "<parent category id>" } ] }
If rootid is specified, starts to get subcategories from the specified category id instead of the root category. If endlevel is specified, get categories and all subcategories up to the specified number of level, otherwise get all levels (default).
action=get module=k2 resource=categories id=<N>
<end-point>?action=get&module=k2&resource=categories&id=<N>
<end-point>/get/k2/categories/<N>
{ "status": "ok", "id": "<category id>", "name": "<category name>", "alias": "<category alias>", "description": "<category description>", "robots": "<meta robots>", "author": "<meta author>", "language": "<language code>", "parent": "<category id>" }
Language can be "*" if any.
action=get module=k2 resource=items cats=<C1,C2,...,CN> (optional) subs=<0|1> (optional) featured=<0|1|2> (optional) limit=<L> (optional) page=<P> (optional) ordering=<field> (optional)
<end-point>?action=get&module=k2&resource=items&cats=<C>&subs=1
<end-point>/get/k2/items?cats=<C>&limit=<L>&page=<P>
{ "status": "ok", "total": "<total items>", "limit": <pagination limit>, "offset": <pagination offset>, items: [ { "id": "<item id>", "title": "<item title>", "alias": "<item alias>", "content": "<item content>", "featured": "<featured>", "images": { "image": "<image URL>", "imageWidth": "<image width>", "image_caption": "<image caption>", "image_credits": "<image credits>", "imageXSmall": "<image extra small URL>", "imageSmall": "<image small URL>", "imageMedium": "<image medium URL>", "imageLarge": "<image large URL>", "imageXLarge": "<image extra large URL>" }, "video": { "video": "<video URL>", "video_caption": "<video caption>", "video_credits": "<video credits>" }, "language": "<item language>", "category_id": "<category id>", "category_name": "<category name>", "author": "<item author>", "created": "<item creation date>", "modified": "<item modification date>" }, ... { ... } ] }
Cats:
List of categories id to include
Subs:
0=Do not include sub categories (default), 1=Include sub categories
Featured:
0=Hide, 1=Show (default), 2=Show only featured items
Ordering:
date, rdate, alpha, ralpha, order, rorder, featured, hits, rand, best, modified, publishUp, id (default)
Created and modified date format is YYYY-MM-DD HH:MM:SS
action=get module=k2 resource=items id=<N>
<end-point>?action=get&module=k2&resource=items&id=<N>
<end-point>/get/k2/items/<N>
{ "status": "ok", "id": "<item id>", "title": "<item title>", "alias": "<item alias>", "content": "<item content>", "featured": "<featured>", "images": { "image": "<image URL>", "imageWidth": "<image width>", "image_caption": "<image caption>", "image_credits": "<image credits>", "imageXSmall": "<image extra small URL>", "imageSmall": "<image small URL>", "imageMedium": "<image medium URL>", "imageLarge": "<image large URL>", "imageXLarge": "<image extra large URL>" }, "video": { "video": "<video URL>", "video_caption": "<video caption>", "video_credits": "<video credits>" }, "metadesc": "<meta description>", "metakey": "<meta keywords>", "metadata": { "robots": "<meta robots>", "author": "<meta author>", "rights": "<meta content rights>", "xreference": "<meta external reference>" }, "language": "<language code>", "category_id": "<category id>", "category_name": "<category name>", "author": "<item author>", "created": "<item creation date>", "modified": "<item modification date>" }
Created and modified date format is YYYY-MM-DD HH:MM:SS
Language can be "*" if any.
The following options are available for user plugin:
Option | Description |
Full image URL | Generate absolute URL (i.e. with domain) for images fields. |
Full video URL | Generate absolute URL (i.e. with domain) for video fields. |
Full img tag URL | Force absolute URL (i.e. with domain) in any HTML img tag. |
Content in items | Include or exclude full content in the items response. |
The Content Module is implemented with the plg_jbackend_content plugin. It provides functions related to Joomla content (articles and categories). Here is the list of supported methods.
action=get module=content resource=categories rootid=<R> (optional) recursive=<true or 1> (optional) countitems=<true or 1> (optional)
<end-point>?action=get&module=content&resource=categories&rootid=<R>&recursive=<false>&countitems=<0>
<end-point>/get/content/categories?rootid=<R>
{ "status": "ok", "total": <T>, "categories": [ { "id": "<category id>", "title": "<category title>", "description": "<category description>", "parent_id": "<parent category id>", "numitems": <items count> }, ... { "id": "<category id>", "title": "<category title>", "description": "<category description>", "parent_id": "<parent category id>", "numitems": <items count> } ] }
If rootid is specified, starts to get subcategories from the specified category id instead of the root category. If recursive is true or 1, get categories and all subcategories, otherwise get only one level (default). If countitems is true or 1, return the number of articles of each category, otherwise do not return this information (default). Category id can be "root" for root node.
action=get module=content resource=categories id=<N>
<end-point>?action=get&module=content&resource=categories&id=<N>
<end-point>/get/content/categories/<N>
{ "status": "ok", "id": "<category id>", "title": "<category title>", "alias": "<category alias>", "description": "<category description>", "metadesc": "<meta description>", "metakey": "<meta keywords>", "metadata": { "page_title": "<meta title>", "author": "<meta author>", "robots": "<meta robots>" }, "language": "<language code>", "parent_id": "<category id>", "level": "<category level>", "numitems": "<N>" }
Language can be "*" if any. Category id can be "root" for root node.
action=get module=content resource=articles catid=<C> (optional) maxsubs=<S> (optional) featured=<F> (optional) limit=<L> (optional) offset=<O> (optional) orderby=<field> (optional) orderdir=<dir> (optional)
<end-point>?action=get&module=content&resource=articles&catid=<C>&maxsubs=<S>&featured=<F>&orderby=<id>
<end-point>/get/content/articles?catid=<C>&limit=<L>&offset=<O>
{ "status": "ok", "total": <total articles>, "limit": <pagination limit>, "offset": <pagination offset>, "pages_current": <current page>, "pages_total": <total pages>, "articles": [ { "id": "<article id>", "title": "<article title>", "alias": "<article alias>", "featured": "<featured>", "content": "<article content>", "catid": "<article category id>", "images": { "image_intro": "<image_url_for_intro>", "float_intro": "<float_side_for_intro>", "image_intro_alt": "<alt_text_for_intro>", "image_intro_caption": "<caption_for_intro>", "image_fulltext": "<image_url_for_fulltext>", "float_fulltext": "<float_side_for_fulltext>", "image_fulltext_alt": "<alt_text_for_fulltext>", "image_fulltext_caption": "<caption_for_fulltext>" }, "tags": [ { "id": "<tag id>", "title": "<tag title>", "alias": "<tag alias>", "language": "<tag language>" }, ... ], "fields": [ { "id": "<field id>", "title": "<field title>", "name": "<field name>", "type": "<field type>", "default_value": "<default value>", "group_id": "<field group id>", "label": "<field label>", "description": "<field description>", "required": "<field required>", "value": "<field value>", "rawvalue": "<field raw value>" }, ... ], "metakey": "<meta keywords>", "metadesc": "<meta description>", "metadata": { "robots": "<meta robots>", "author": "<meta author>", "rights": "<meta content rights>", "xreference": "<meta external reference>" }, "language": "<language code>", "category_title": "<category title>", "category_alias": "<category alias>", "author": "<article author>", "created_date": "<created date>", "modified_date": "<modified date>", "published_date": "<publish up date>", "unpublished_date": "<publish down date>", "state": "<article state>" }, ... { ... } ] }
State:
Max subs:
Number of subcategories to include (default 0=none)
Featured:
hide,only,show (default)
Order by:
id, title, alias, catid, state, created, created_by, ordering (default), hits
Order dir:
asc (default), desc
Dates are in ISO 8601 format (e.g 2017-05-11T10:16:32+00:00)
Property content is present only if plugin's option Content in article list is set.
Property tags is present only if plugin's option Add tags in article list is set.
Property fields is present only if plugin's option Prepare content in article list is set.
action=get module=content resource=articles id=<N>
<end-point>?action=get&module=content&resource=articles&id=<N>
<end-point>/get/content/articles/<N>
{ "status": "ok", "id": "<article id>", "title": "<article title>", "alias": "<article alias>", "featured": "<featured>", "introtext": "<article intro text>", "content": "<article content>", "content_raw": "<article content raw>", "catid": "<article category id>", "images": { "image_intro": "<image_url_for_intro>", "float_intro": "<float_side_for_intro>", "image_intro_alt": "<alt_text_for_intro>", "image_intro_caption": "<caption_for_intro>", "image_fulltext": "<image_url_for_fulltext>", "float_fulltext": "<float_side_for_fulltext>", "image_fulltext_alt": "<alt_text_for_fulltext>", "image_fulltext_caption": "<caption_for_fulltext>" }, "tags": [ { "id": "<tag id>", "title": "<tag title>", "alias": "<tag alias>", "language": "<tag language>" }, ... ], "associations": [ ], "event": { "afterDisplayTitle": "<after display title>", "beforeDisplayContent": "<before display content>", "afterDisplayContent": "<after display content>" }, "fields": [ { "id": "<field id>", "title": "<field title>", "name": "<field name>", "type": "<field type>", "default_value": "<default value>", "group_id": "<field group id>", "label": "<field label>", "description": "<field description>", "required": "<field required>", "value": "<field value>", "rawvalue": "<field raw value>" }, ... ], "cck_fields": [ ], "metakey": "<meta keywords>", "metadesc": "<meta description>", "metadata": { "robots": "<meta robots>", "author": "<meta author>", "rights": "<meta content rights>", "xreference": "<meta external reference>" }, "language": "<language code>", "category_title": "<category title>", "category_alias": "<category alias>", "author": "<article author>", "parent_id": "<parent id>", "parent_title": "<parent title>", "parent_alias": "<parent alias>", "parent_route": "<parent route>", "created_date": "<created date>", "modified_date": "<modified date>", "published_date": "<publish up date>", "unpublished_date": "<publish down date>", "version": "<article version>", "hits": "<article hits>", "rating": "<article rating>", "rating_count": "<article rating count>", "state": "<article state>" }
State:
Dates are in ISO 8601 format (e.g 2017-05-11T10:16:32+00:00)
Language can be "*" if any.
Property content_raw is present only if plugin's option Include content raw is set.
Property event is present only if plugin's option Show article event is set.
Property cck_fields is present only if plugin's option Include CCK is set.
action=get module=content resource=tagarticles tagid=<T1,T2,...,Tn> limit=<L> (optional) offset=<O> (optional)
<end-point>?action=get&module=content&resource=tagarticles&tagid=<T>&limit=<L>&offset=<O>
<end-point>/get/content/tagarticles?tagid=<T>&limit=<L>&offset=<O>
{ "status": "ok", "total": <total articles>, "limit": <pagination limit>, "offset": <pagination offset>, "pages_current": <current page>, "pages_total": <total pages>, articles: [ { "id": "<article id>", "title": "<article title>", "alias": "<article alias>", "featured": "<featured>", "content": "<article content>", "images": { "image_intro": "<image_url_for_intro>", "float_intro": "<float_side_for_intro>", "image_intro_alt": "<alt_text_for_intro>", "image_intro_caption": "<caption_for_intro>", "image_fulltext": "<image_url_for_fulltext>", "float_fulltext": "<float_side_for_fulltext>", "image_fulltext_alt": "<alt_text_for_fulltext>", "image_fulltext_caption": "<caption_for_fulltext>" }, "tags": [ { "id": "<tag id>", "title": "<tag title>", "alias": "<tag alias>", "language": "<tag language>" }, ... ], "metadesc": "<meta description>", "metakey": "<meta keywords>", "metadata": { "robots": "<meta robots>", "author": "<meta author>", "rights": "<meta content rights>", "xreference": "<meta external reference>" }, "category_title": "<category title>", "author": "<article author>", "published_date": "<article date>" }, ... { ... } ] }
Dates are in ISO 8601 format (e.g 2017-05-11T10:16:32+00:00)
action=get module=content resource=articlebyalias id=<alias>
<end-point>?action=get&module=content&resource=articlebyalias&id=<alias>
<end-point>/get/content/articlebyalias/<alias>
Same response as "Get an article"
Same notes as "Get an article".
The following options are available for user plugin:
Option | Description |
Filter language | Filter content by language. |
Status | Filter content by state. |
Access archived articles | Allow get article on archived items. |
Grant access | Skip access permissions check and allow access to articles. |
Full image URL | Generate absolute URL (i.e. with domain) for images fields. |
Force full image URL in content | Try to replace relative image URL in content with absolute URL. |
Add tags in article list | Include article tags in the list of articles. |
Prepare content in article list | Call onContent events on each article in the list of articles. |
Content in article list | Include full content in the list of articles. |
Show article event | Include results of events in the article response. |
Include content raw | Include raw content (no content plugin) in the article response. |
Include CCK | Include SEBLOD CCK custom fields in the article response. |
The User Module is implemented with the plg_jbackend_user plugin. It provides functions related to Joomla users and ACL. Here is the list of supported methods.
action=post module=user resource=login username=<username> password=<password>
<end-point>?action=post&module=user&resource=login&username=<username>&password=<password>
<end-point>/post/user/login?username=<username>&password=<password>
{ "status": "ok", "userid": <userid>, "username": "<username>", "session_id": "<session_id>" }
action=get module=user resource=logout
<end-point>?action=get&module=user&resource=logout
<end-point>/get/user/logout
{ "status": "ok" }
action=post module=user resource=register username=<username> password=<password> email=<email> firstname=<firstname> lastname=<lastname>
<end-point>?action=post&module=user&resource=register&username=<username>&password=<password>&email=<email>&firstname=<firstname>&lastname=<lastname>
<end-point>/post/user/register?username=<username>&password=<password>&email=<email>&firstname=<firstname>&lastname=<lastname>
{ "status": "ok" }
Sends an email to the user's account with a password remind link.
action=get module=user resource=remind email=<email>
<end-point>?action=get&module=user&resource=remind
<end-point>/get/user/remind
{ "status": "ok" }
Sends an email to the user's account with a password reset link.
action=get module=user resource=reset email=<email>
<end-point>?action=get&module=user&resource=reset
<end-point>/get/user/reset
{ "status": "ok" }
action=get module=user resource=profile
<end-point>?action=get&module=user&resource=profile
<end-point>/get/user/profile
{ "status": "ok", "fields": [ { "id": "<id>", "title": "<title>", "name": "<name>", "language": "<language>", "type": "<type>", "default_value": "<default value>", "context": "<context>", "group_id": "<group id>", "label": "<label>", "description": "<description>", "required": "<required>", "language_title": "<language title>", "language_image": "<language image>", "group_title": "<group title>", "value": "<value>", "rawvalue": "<raw value>" }, ... ], "_errors": [<_errors>], "groups": { "<groupid>": "<groupid>" ... }, "id": "<id>", "name": "<name>", "username": "<username>", "email": "<email>", "block": "<block>", "sendEmail": "<sendEmail>", "registerDate": "<registerDate>", "lastvisitDate": "<lastvisitDate>", "activation": "<activation>", "params": { "admin_style": "<admin_style>", "admin_language": "<admin_language>", "language": "<language>", "editor": "<editor>", "helpsite": "<helpsite>", "timezone": "<timezone>" }, "lastResetTime": "<lastResetTime>", "resetCount": "<resetCount>", "otpKey": "<otpKey>", "otep": "<otep>", "requireReset": "<requireReset>", "tags": { "typeAlias": <typeAlias>, "tags": "<tags>" } }
Allows to update the user profile (user must be authenticated). The requests must use the POST method with a JSON payload.
action=put module=user resource=profile
POST <end-point>?action=put&module=user&resource=profile
POST <end-point>/put/user/profile
{ "name": "<name>", "username": "<username>", "password": "<password>", "email": "<email>", "profile": { "city": "<city>" ... }, "com_fields": { "field-1": "<value 1>", "field-2": "<value 2>" ... } }
{ "status": "ok" }
Allows to check the current status of the user (guest or logged in), and provides some additional information.
action=get module=user resource=status
<end-point>?action=get&module=user&resource=status
<end-point>/get/user/status
{ "status": "ok", "is_guest": <0 or 1>, "user_id": "<user_id>", "session_id": "<session_id>", "session_expire": <session_expire> }
The following options are available for user plugin:
Option | Description |
Auto activate | Automatically activate users on registration and skip any notification email. |
Extended auth request | Process register, remind and reset as an authentication request (i.e. these requests can bypass the access restrictions on the endpoint). |
Extended fields | Enable support for additional fields in the registration. |
External libraries | List of paths (relative to JPATH_SITE) of external libraries to load in the registration (one path each row). |
Required fields | List of fields to include in the response for profile requests (when blank it returns all fields). Fields must be separated by commas and square brackets for nested fields (e.g. id,name,username,profile[city,region,country]). |
JSON Login | Enable JSON payload on login action. |
JSON Register | Enable JSON payload on register action. |
Enable session id | When enabled it overrides cookie based session with session_id parameter. This is useful when it is not possible to rely on cookie based session. This parameter can be passed as GET/POST param or as JSON field when JSON payload is enabled for the current request. |
jBackend is a Joomla extension that introduces a set of APIs for access to all Joomla's content and features, and easily integrate any Joomla site with any external system. It extends the power of Joomla allowing you to use your site as a "backend system" to serve and feed any kind of client (mobile apps, news channels, affiliate sites, and any other external system).
jBackend also provides a full push notifications platform for iOS and Android mobile apps. It is possible to manage multiple apps, to register devices for each app, and to schedule push notifications sending on registered devices, filtered by app and platform type.
jBackend is designed to be "extensible" via plugins. Adding new plugins means to add new APIs to support new Joomla extensions. The basic package already includes three plugins, the User Module (that supports Joomla users and ACL), the Content Module (for the standard Joomla content, categories and articles), and the Push Module (to work with push notifications). New plugins are on the way, to add support for the most used Joomla extensions (e.g. K2, Zoo, VirtueMart, HikaShop, and so on). Additional plugins can be installed separately, so you can install and use only the necessary modules, and keep your CMS lightweight and efficient.
jBackend access is possible through an "end-point", that can be published like a menu item. It is possible to publish several end-points and configure access rules separately for each one. The access can be free, or restricted with a standard user login or through the use of an API Key. API Keys can be generated and configured (e.g. in terms of limitations like expiration or daily access) in jBackend panel. This allows full control on API access provided to clients.
It is possible to enable requests tracking for each endpoint separately. In this way all requests received from the endpoint are stored in the database and can be used for security audit or for statistical analysis.
It is also possible to enable specific modules for each endpoint separately. This increase the control level on the pool of functions or services to expose for each endpoint.
End-point channels can be accessed through HTTP, requests can be compliant to RESTful pattern, and responses are JSON encoded. In the future is expected to support the ability to provide XML responses.
jBackend is a Joomla extension that gives you all the power of Joomla CMS through an extensible and pluggable set of REST API. With these API you can access to all site's contents and features, and use Joomla as a backend system for smartphone and mobile apps, syndication networks, external websites, and provide web services for any external system.
Furthermore jBackend provides a full push notifications platform for iOS and Android mobile apps. It allows to define multiple apps, to register devices for each app, and to schedule push notifications sending on registered devices, filtered by app and platform type.
The basic extension package includes the jBackend component, that provides the general infrastructure for endpoints, notifications, and plugins support system. Also the following plugins are already included in the basic package:
Additional plugins can be downloaded from here and installed separately. Before to buy a subscription check here if what you need is already available, or submit a support request.
It is also possible to give it a try downloading and installing jBackend Community for free, a lite version created to give a chance to test jBackend capabilities, to develop and test new modules, and to provide some basic REST API integration features to a Joomla site.
jBackend is released under GPL 2.0 license.