Skip to main content

Documentation

IMPORTANT

This is the outdated SI-documentation which will be adapted soon. A huge part may be obsolete!

Post View

Post View

In this section, we will briefly explain the REST API to view Post View.

This REST API call allows requester to view post which created on the site. To view the post, requester will need to send a GET request to this following url:

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

GET Parameters

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

  • id (required)
    This id parameter is the post id available on the site.

Response

Upon a 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:

{
  "post": {
    "id": "25",
    "permalink": "http://easydiscuss.com/index.php?option=com_easydiscuss&view=post&id=25&Itemid=118&format=json",
    "title": "Unable to select tag for multi tag menu item",
    "user_id": "959",
    "hits": "4",
    "vote": "0",
    "state": "1",
    "locked": "0",
    "created": "2016-04-18 08:48:35",
    "modified": "2016-04-19 04:45:01",
    "content": "Unable to select tag for multi tag menu item",
    "preview": "Unable to select tag for multi tag menu item",
    "replies": [
      {
        "id": "29",
        "permalink": "http://easydiscuss.com/index.php?option=com_easydiscuss&view=post&id=25&Itemid=118#reply-29&format=json",
        "title": null,
        "user_id": "965",
        "hits": "0",
        "vote": "0",
        "state": "1",
        "locked": "0",
        "created": "2016-04-19 05:09:33",
        "modified": "2016-04-19 05:09:33",
        "content": "http://screencast.com/t/pPXrXtT1",
        "preview": "<a href=\"http://screencast.com/t/ppxrxtt1\" >http://screencast.com/t/ppxrxtt1</a>",
        "replies": [],
        "comments": []
      }
    ],
    "comments": []
  }
}

And a fail request response will looks similar as below:

{
    "code": 404,
    "message": "Sorry, but the post that you are trying to access is not available."
}
We use cookies
We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience. You can decide whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.