List all pages

This method will return the full tree of pages for the given knowledge base.

URL

/api/v2/knowledge/tree

Access

Only account tokens are permitted to access this method.

Supported Parameters

  • kb - the ID of the knowledge base (required)

Returned Data

The returned data will include an array of page objects each containing a children array which contains their children. This will go on indefinitely. Only page meta data is returned, content is not provided from this method.

The page objects also include a full_permalink attribute which includes the full page to the page from the root of your knowledge base.

Example JSON

[
  {
    "id": 1,
    "title": "Welcome",
    "permalink": null,
    "full_permalink": "",
    "position": 1,
    "children": [
      {
        "id": 6,
        "title": "Blah Blah Blah",
        "permalink": "blah-blah-blah",
        "full_permalink": "blah-blah-blah",
        "position": 2,
        "children": [
          {
            "id": 9,
            "title": "Test",
            "permalink": "test",
            "full_permalink": "test",
            "position": 1,
            "children": [
              {
                "id": 11,
                "title": "Test 2",
                "permalink": "test-2",
                "full_permalink": "test-2",
                "position": 1,
                "children": [

                ]
              }
            ]
          }
        ]
      },
      {
        "id": 12,
        "title": "Another Section",
        "permalink": "another-section",
        "full_permalink": "another-section",
        "position": 3,
        "children": [

        ]
      },
      {
        "id": 13,
        "title": "One more Section",
        "permalink": "one-more-section",
        "full_permalink": "one-more-section",
        "position": 4,
        "children": [
          {
            "id": 14,
            "title": "An inner page",
            "permalink": "an-inner-page",
            "full_permalink": "an-inner-page",
            "position": 1,
            "children": [

            ]
          }
        ]
      }
    ]
  }
]

Proudly powered by Katapult. Running on 100% renewable energy.