Create a personal book - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service lets users with the PERSONAL_BOOK_USER, ADMIN, or USERS_ADMIN role create a personal book.

A personal book can contain topics from documents as well as personal topics.

Method Endpoint
POST /api/users/{userId}/personal-books
Path parameter Type Description
{userId} String The user's identifier.

For security reasons, the returned HTML content is sanitized and may differ from the original request.

Request example

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

{
    "title": "Pbk title",
    "description": "Pbk description",
    "nodes": [
        {
            "title": "Personal topic Title",
            "notes": "topic Note",
            "htmlContent": "<p> topic content </p>",
            "children": [
                {
                    "title": "NAME 1-1",
                    "topicLink": {
                        "contentId": "0VpaU8yLvklCzuH5pCfHpK",
                        "mapId": "a7wNxXBLbM65nqkOxv15Jg",
                        "tocId": "G4zqFfJT3se7UUnQMIFm9g"
                    },
                    "children": []
                }
            ]
        },
        {
            "title": "Prerequisites (Structural)",
            "topicLink": {
                "type": "STRUCTURAL",
                "contentId": "78DsFOt5g33sEWQZVIdRjO",
                "mapId": "a7wNxXBLbM65nqkOxv14oL",
                "tocId": "ntflXkSasnXdVM9_oyqNkL"
            },
            "children": [
                {
                    "title": "Hardware Prerequisites",
                    "notes": "",
                    "topicLink": {
                        "type": "STANDARD",
                        "contentId": "Y55T3XPulnBMc3SsjITrWA",
                        "mapId": "a7wNxXBLbM65nk9Oxv14ug",
                        "tocId": "Zq5HuD0~hOZ71kOuQSb8bw"
                    },
                    "children": []
                }
            ]
        }
    ]
}
Field Type Required? Description
title String Yes Title of the personal book.
description String Yes Description of the personal book.
nodes Array Yes List of nodes.
    title String Yes Title of the topic.
    notes String Yes Comments about the topic.
    htmlContent String Yes For a personal topic, the HTML content of the topic. The topicLink parameter must be empty if this parameter is provided.
    topicLink Object Yes Information to retrieve the official topic's content. The htmlContent parameter must be empty if this parameter is provided.
        contentId String Yes The topic's ID.
        mapId String Yes Identifier of the book in which the topic is located.
        tocId String Yes The topic's tocId.
children Array Yes Array of nodes, all children of the current node.
Return code Description
201 CREATE The personal book was created.
400 BAD REQUEST The request provided is invalid.
401 UNAUTHORIZED The authorization header is absent or invalid.
403 FORBIDDEN The user or API key does not have the USERS_ADMIN or ADMIN role, or the user corresponding to the the USER_ID parameter does not have the PERSONAL_BOOK_USER role.
404 NOT FOUND No user exists with this ID.

Response body

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

{
    "pbkId": "d433cb2q-8d2f-4aaf-a8fc-917e154b4ceb"
}
Field Type Description
pbkId String The personal book's identifier.