• Background Image

    API

Overview

Knol makes displaying your knowledge bases and articles on any platform of your choice easy. Before you start integrating, please bear in mind that we already have free plugins for WordPress, Prestashop and Magento. You will find those in the Plugins section of your Knol account.

Usage
The API Call

Knol has only one API call. This call is designed to give you all the necessary information concerning a specific Knowledge Base:

curl https://docs.knol.io/api/v1/knowledge_bases/{knowledge_base_id}/retrieve -H 'Authorization: Token token="{knowledge_base_api_key}"'

Where {knowledge_base_id} corresponds to your Knowledge Base ID and {knowledge_base_api_key} corresponds to your Knowledge Base API Key. These can be found on your Knowledge Base’s page on your Knol account.

The API Result

Here is the result to the above call:

{
  "knowledge_base": {
      "id": 1,
      "name": "Knowledge Base Name",
      "content": "\u003cp\u003eKnowledge Base Description\u003c/p\u003e",
      "updated_at": "2014-06-15T17:57:00.611Z",
      "articles": [{
          "id": 1,
          "name": "Article #1",
          "content": "\u003cp\u003eArticle #1 Content\u003c/p\u003e",
          "updated_at": "2014-06-15T19:03:32.069Z"
      }, {
          "id": 2,
          "name": "Article #2",
          "content": "\u003cp\u003eArticle #2 Content\u003c/p\u003e",
          "updated_at": "2014-06-19T09:32:46.145Z"
      }]
  }
}

As you can see, the result is in pure JSON. All HTML tags have been escaped so that the result can be safely parsed by your code.

Notes

This is the first version of Knol’s API. In time, additional information and new calls may me implemented. If that happens, we’ll make sure our API remains backwards compatible.