Documentation

/content/{id} [GET]

ThoughtFarmer REST API Method: /content/{id} [GET]

Retrieve a content page by content id.

URL:
http://yourserver.com/api/content/{id}

Response Formats:
JSON, XML

HTTP Method(s):
GET

Requires Authentication:
true, user making call must pass a valid token parameter and must be able to view the content being requested

Parameters:

Parameter Type Description
id int Required. The content id of the page to retrieve
token string Required. A valid token authentication parameter

Response Status Codes:
200 - Success
401 - Token parameter is invalid
404 - Content page not found

Example request
GET http://yourserver.com/api/content/{id}
{
    "body": [
        {
            "key": "en",
            "value": ""
        }
    ],
    "allowFiles": true,
    "layout": 8,
    "pageType": "Calendar",
    "grandParentId": 0,
    "abbreviatedTitle": [
        {
            "key": "en",
            "value": ""
        }
    ],
    "contentId": 10874,
    "summary": [
        {
            "key": "en",
            "value": ""
        }
    ],
    "creatorId": 189,
    "dateModified": "2016-03-01T23:05:22.29",
    "datePosted": "2016-03-01T01:32:48.27",
    "datePublished": "2016-03-01T01:32:48.27",
    "modifiedId": 189,
    "ownerId": 189,
    "parentId": 1073,
    "title": [
        {
            "key": "en",
            "value": "Updating the title"
        }
    ],
    "treePath": "<a href=\"http://localhost:3000/\">Home</a>  <a href=\"http://localhost:3000/people/\">Find Person</a>  <a href=\"http://localhost:3000/content/1073\">Mr. Testeroonie Person</a>  <a href=\"http://localhost:3000/content/10874\" id=\"pageTitle\">Updating the title</a>",
    "treePathText": "Home &rsaquo; Find Person &rsaquo; Mr. Testeroonie Person &rsaquo; Updating the title",
    "lastModifiedBy": "Updated <abbr class=\"timeago\" title=\"2016-03-01T23:05:22Z\">4 minutes ago</abbr> by <a href=\"http://localhost:3000/content/1073\" title=\"Mr. Testeroonie Person\">Mr. Testeroonie Person</a>",
    "permissionIsEdit": true,
    "permissionIsView": true,
    "isPublished": true
}