Knowledge Base

API Response Examples

Article ID: 391
Last updated: 5 Dec, 2013

Get Recent News

Request: /api.php?call=news&method=recent&limit=2&fields=title,link

JSON response:

{
    "meta": {
        "page": 1,
        "pages": 1,
        "perPage": 2,
        "total": 2
    },
    "result": [
        {
            "title": "Test News",
            "link": "http:\/\/domain.com\/kb\/index.php?View=news&EntryID=61"
        },
        {
            "title": "Great News Here",
            "link": "http:\/\/domain.com\/kb\/index.php?View=news&EntryID=60"
        }
    ]
}

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<result page="1" pages="1" perPage="2" total="2">
  <entry id="61">
    <title>Test News</title>
    <link>http://domain.com/kb/index.php?View=news&amp;amp;EntryID=61</link>
  </entry>
  <entry id="60">
    <title>Great News Here</title>
    <link>http://domain.com/kb/index.php?View=news&amp;amp;EntryID=60</link>
  </entry>
</result>


Get Articles in a Category

Request: /api.php?call=articles&cid=1&fields=id,title

JSON response:

{
    "meta": {
        "page": 1,
        "pages": 3,
        "perPage": 2,
        "total": 6
    },
    "result": [
        {
            "id": "131",
            "title": "Quick Response"
        },
        {
            "id": "182",
            "title": "Using Active Directory for Remote Authentication"
        }
    ]
}

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<result page="1" pages="3" perPage="2" total="6">
  <entry id="131">
    <id>131</id>
    <title>Quick Response</title>
  </entry>
  <entry id="182">
    <id>182</id>
    <title>Using Active Directory for Remote Authentication</title>
  </entry>
</result>


Get an Article

Request: /api.php?call=articles&id=1&fields=title,body,tags

JSON response:

{
    "result": [
        {
            "title": "API Examples",
            "body": {
                "type": "html",
                "value": "PGgzIGNsYXNzPSJsaW5lVGl0bGUiPjxiciAvPg0KPHNwYW4gc3R5bGU9Im"
            },
            "tags": "api,rest"
        }
    ]
}

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
  <entry id="10515">
    <title>API Examples</title>
    <body><![CDATA[<h3 class="lineTitle">Get Recent News</span></h3>
<p>JSON response:</p>...
]]></body>
    <tags>api,rest</tags>
  </entry>
</result>
Article ID: 391
Last updated: 5 Dec, 2013
Revision: 1
Access: Public
Views: 10492
Comments: 0