Kunena Module API

The Kunena Module is implemented with the plg_jbackend_kunena plugin. It provides functions related to Kunena forum for Joomla (topics and categories). Here is the list of supported methods.

Get the list of categories

Request parameters

action=get
module=kunena
resource=categories
parentid=<P> (optional) default to the root
levels=<L> (optional) 0=all levels, default is 1
unpublished=<0|1> (optional) 0=Hide (default), 1=Show

Example

<end-point>?action=get&module=kunena&resource=categories&parentid=<P>&levels=<L>

Example (REST format)

<end-point>/get/kunena/categories?parentid=<P>

Response

{
    "status": "ok",
    "categories": [
        {
            "id": "<category id>",
            "name": "<category name>",
            "alias": "<category alias>",
            "description": "<category description>",
            "parent_id": "<parent category id>",
            "level": "<category level>",
            "numTopics": "<number of category topics>",
            "numPosts": "<number of category posts>",
            "hits": "<number of hits>"
        }
    ]
}

 

Get a category

Request parameters

action=get
module=kunena
resource=categories
id=<N>

Example

<end-point>?action=get&module=kunena&resource=categories&id=<N>

Example (REST format)

<end-point>/get/kunena/categories/<N>

Response

{
    "status": "ok",
    "id": "<category id>",
    "name": "<category name>",
    "alias": "<category alias>",
    "description": "<category description>",
    "parent_id": "<category parent id>",
    "level": "<category language>",
    "numTopics": "<number of category topics>",
    "numPosts": "<number of category posts>",
    "hits": "<number of hits>",
    "icon": "<category icon>",
    "icon_id": "<category icon id>",
    "locked": "<locked status>",
    "pub_access": "<public access>",
    "pub_recurse": "<public recurse>",
    "review": "<review>",
    "allow_anonymous": "<allow anonymous>",
    "post_anonymous": "<post anonymous>",
    "allow_polls": "<allow polls>",
    "topic_ordering": "<topic ordering>",
    "last_topic_id": "<last topic id>",
    "last_post_id": "<last post id>",
    "last_post_time": "<last post time>"
}

 

Get the list of topics

Request parameters

action=get
module=kunena
resource=topics
catid=<C>
limit=<L> (optional)
offset=<O> (optional)
orderdir=<dir> (optional) asc, desc

Example

<end-point>?action=get&module=kunena&resource=topics&catid=<C>

Example (REST format)

<end-point>/get/kunena/topics?catid=<C>

Response

{
    "status": "ok",
    "total": "<total items>",
    "limit": <pagination limit>,
    "offset": <pagination offset>,
    "topics": [
        {
          "id": "<topic id>",
          "category_id": "<category id>",
          "subject": "<topic subject>",
          "locked": "<locked>",
          "hold": "<hold>",
          "posts": "<posts>",
          "hits": "<number of hits>",
          "attachments": "<attachments>",
          "first_post_id": "<first post id>",
          "first_post_time": "<first post time>",
          "first_post_userid": "<first post user id>",
          "first_post_message": "<first post message text>",
          "first_post_guest_name": "<first post guest name>",
          "last_post_id": "<last post id>",
          "last_post_time": "<last post time>",
          "last_post_userid": "<last post user id>",
          "last_post_message": "<last post message text>",
          "last_post_guest_name": "<last post guest name>"
        },
        ...
        {
        }
    ]
}

 

Get a topic

Request parameters

action=get
module=kunena
resource=topics
id=<N>

Example

<end-point>?action=get&module=kunena&resource=topics&id=<N>

Example (REST format)

<end-point>/get/kunena/topics/<N>

Response

{
  "status": "ok",
  "id": <topic id>,
  "category_id": "<category id>",
  "subject": "<subject>",
  "locked": "<locked>",
  "hold": "<hold>",
  "posts": "<posts>",
  "hits": "<number of hits>",
  "attachments": "<attachments>",
  "first_post_id": "<first post id>",
  "first_post_time": "<first post time>",
  "first_post_userid": "<first post user id>",
  "first_post_message": "<first post text message>",
  "first_post_guest_name": "<first post guest name>",
  "last_post_id": "<last post id>",
  "last_post_time": "<last post time>",
  "last_post_userid": "<last post user id>",
  "last_post_message": "<last post text message>",
  "last_post_guest_name": "<last post guest name>",
  "messages": [
    {
      "id": "<message id>",
      "parent": "<parent id>",
      "thread": "<thread id>",
      "catid": "<category id>",
      "name": "<user name>",
      "userid": "<user id>",
      "email": "<email>",
      "subject": "<message subject>",
      "time": "<message time>",
      "ip": "<ip address>",
      "topic_emoticon": "<topic emoticon>",
      "locked": "<locked>",
      "hold": "<hold>",
      "hits": "<number of hits>",
      "message": "<message>",
      "replynum": <number of replies>,
      "thankyou": [
        ...
      ]
    },
    ...
    {
        ...
    }
  ]
}