Menu Module API

The Menu Module is implemented with the plg_jbackend_menu plugin. It provides functions related to Joomla menus (com_menus). Here is the list of supported methods.

Get the list of menus

Request parameters

action=get
module=menu
resource=menus
limit=<L> (optional)
offset=<O> (optional)
orderby=<field> (optional)
orderdir=<dir> (optional)

Example

<end-point>?action=get&module=menu&resource=menus&limit=<L>&offset=<O>

Example (REST format)

<end-point>/get/menu/menus?limit=<L>

Response

{
    "status": "ok",
    "total": <total items>,
    "limit": <pagination limit>,
    "offset": <pagination offset>,
    "pages_current": <current page>,
    "pages_total": <total pages>,
    "menus": [
        {
            "id": "<menu id>",
            "menutype": "<menu type>",
            "title": "<menu title>",
            "description": "<menu description>",
            "count_published": "<total published>",
            "count_unpublished": "<total unpublished>",
            "count_trashed": "<total trashed>"
        },
        ...
        {
            "id": "<menu id>",
            "menutype": "<menu type>",
            "title": "<menu title>",
            "description": "<menu description>",
            "count_published": "<total published>",
            "count_unpublished": "<total unpublished>",
            "count_trashed": "<total trashed>"
        }
    ]
}

 

Get a menu

Request parameters

action=get
module=menu
resource=menus
id=<N>

Example

<end-point>?action=get&module=menu&resource=menus&id=<N>

Example (REST format)

<end-point>/get/menu/menus/<N>

Response

{
    "status": "ok",
    "id": "<menu id>",
    "menutype": "<menu type>",
    "title": "<menu title>",
    "description": "<menu description>"
}

 

Get the list of menu items

Request parameters

action=get
module=menu
resource=items
menutype=<menutype>
parentid=<R> (optional)
level=<E> (optional)
limit=<L> (optional)
offset=<O> (optional)
orderby=<field> (optional)
orderdir=<dir> (optional)

Example

<end-point>?action=get&module=menu&resource=items&menutype=<menutype>&orderby=<field>&orderby=<dir>

Example (REST format)

<end-point>/get/menu/items?menutype=<menutype>

Response

{
    "status": "ok",
    "total": <total items>,
    "limit": <pagination limit>,
    "offset": <pagination offset>,
    "pages_current": <current page>,
    "pages_total": <total pages>,
    items: [
        {
            "id": "<article id>",
            "menutype": "<menu type>",
            "title": "<title>",
            "alias": "<alias>",
            "note": "<note>",
            "path": "<path>",
            "link": "<link>",
            "type": "<type>",
            "parent_id": "<parent id>",
            "level": "<level>",
            "component_id": "<component id>",
            "browserNav": "<browserNav>",
            "access": "<access>",
            "img": "<img>",
            "template_style_id": "<template style id>",
            "home": "<home>",
            "language": "<language>",
            "client_id": "<client id>",
            "language_title": "<language title>",
            "image": "<image>",
            "componentname": "<component name>",
            "access_level": "<access level>",
            "name": "<component name>"
        },
        ...
        {
            ...
        }
    ]
}