Get a map's table of contents - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service returns a map's table of contents (ToC).

Method Endpoint
GET /api/khub/maps/{mapId}/toc
Path parameter Type Description
{mapId} String Expects the id associated with the map. Users can get the id by listing maps.
Return code Description
200 OK The request is valid and data is returned.
404 NOT FOUND No map exists with this ID.

Response body

The following lines show an example of a JSON response body:

[
    {
        "tocId": "O9UowuYCBjsp~FGKTUFx5w",
        "contentId": "huzBwbbBW3WzTGHwshZIHg",
        "title": "Introduction to Time Machines",
        "prettyUrl": "/r/Introduction+to+Time+Machines",
        "children": [],
        "page": {
             "onItsOwn": true,
             "visible": true
        }
    },
    {
        "tocId": "cwM7YaPiO14KSK2ijkpHBg",
        "contentId": "tCXkAmF0SVEScehmnX5TiQ",
        "title": "How to Time Travel",
        "prettyUrl": "/r/How+to+Time+Travel",
        "children": [
            {
                "tocId": "Ras6kFhn0~2wpgeDUws7uQ",
                "contentId": "PC10RJwTtnxkpIm9hbkRdA",
                "title": "Set Local Date and Time",
                "children": [],
                "page": {
                    "parentsVisibility": [ true ],
                    "onItsOwn": false,
                    "visible": true
                }
            },
            {
                "tocId": "QZUh1xB~yrDANJ2e~ti9pg",
                "contentId": "hDs56CtGixP~R1hf~1tB_g",
                "title": "Set Destination Date and Time",
                "children": [],
                "page": {
                    "parentsVisibility": [ false ],
                    "onItsOwn": false,
                    "visible": true
                }
            },
            {
                "tocId": "mYhIZEwLYgllseZJxu2yxA",
                "contentId": "ZYYuXA2e~06xnuQoChsvBA",
                "title": "Set a Destination Location",
                "children": [], 
                "page": { 
                    "parentsVisibility": [ false ], 
                    "onItsOwn": false, 
                    "visible": true
                }
            }
        ]
    }
]
Field Type Description
tocId String The topic's identifier based on its position in the map's table of contents.
contentId String The topic's identifier independent of its position in the map's table of contents.
title String The topic's title.
prettyUrl String The topic's pretty URL if one has been configured.
children Array An array containing the topic's children.
page Object Information about pagination.
    parentsVisibility Array An array of booleans representing the breadcrumb to the topic. For a given parent, if the corresponding boolean is true, the parent is included in the Reader page.
    onItsOwn Boolean A boolean indicating that section-by-section pagination is enabled and is set to display one topic per page. Children are displayed on other pages.
    visible Boolean A boolean indicating whether a topic in the page is visible. Depending on how pagination is configured, some topics may be hidden.