Rest Api

EasyDiscuss 4 includes a simple REST api that allows you to connect to EasyDiscuss to perform various tasks.

Categories Listing

In this section, we will briefly explain the REST API to retrieve the Categories Listing.

This REST API call allows requester to list all categories created on the site. To retrieve the list of categories, requester will need to send a GET request to the following url:

http://site.com/index.php?option=com_easydiscuss&view=categories&format=json&tmpl=component

GET Parameters

The following are the available parameters when a GET is made to this API call:

  • sort (optional)
    This sort parameter is optional and the default value is asc.

Response

Upon successful request, EasyDiscuss system will return a response in a form of JSON to the requester.

The successful request response will looks similar as below:

{
  "categories": [
    {
      "id": "1",
      "permalink": "http://easydiscuss.com/index.php?option=com_easydiscuss&view=forums&category_id=1&Itemid=118",
      "title": "Announcement",
      "alias": "announcement",
      "description": "",
      "created": "2016-04-15 18:57:13",
      "published": "1",
      "posts": "1",
      "subcategories": []
    },
    {
      "id": "2",
      "permalink": "http://easydiscuss.com/index.php?option=com_easydiscuss&view=forums&category_id=2&Itemid=118",
      "title": "moderation",
      "alias": "moderation",
      "description": "",
      "created": "2016-04-15 11:34:50",
      "published": "1",
      "posts": "6",
      "subcategories": []
    }
  ]
}