TOC

TOC

Get all TOC nodes from a project

Returns information on all TOC nodes from a project.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

Responses
GET/projects/{projectId}/toc/nodes
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes \
  --header 'Authorization: Basic username:password'
[
  {
    "id": "…",
    "caption": "…",
    "parentId": "…",
    "topicId": "…",
    "ordinalNo": 1,
    "isShowInToc": true,
    "isAutoDocsMountPoint": true
  }
]

Create a TOC node (folder)

Creates a new folder in the Table of Contents of a project.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

Body
application/json

The folder to create.

The properties for a new TOC folder.

caption
string
required

The folder name.

parentId
string | nullable

The unique identifier of the parent TOC node. null or omitted to create on the root level.

ordinalNo
integer

The position of the node. Appended to the end if omitted.

isShowInToc
boolean
default:
false

Whether to show the folder in the TOC in publications.

Responses
POST/projects/{projectId}/toc/nodes
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes \
  --request POST \
  --header 'Authorization: Basic username:password' \
  --header 'Content-Type: application/json' \
  --data '{
  "caption": "",
  "parentId": "",
  "ordinalNo": 1,
  "isShowInToc": false
}'
{
  "id": "…",
  "caption": "…",
  "parentId": "…",
  "topicId": "…",
  "ordinalNo": 1,
  "isShowInToc": true,
  "isAutoDocsMountPoint": true
}

Delete several TOC nodes

Deletes multiple TOC nodes along with the linked topics from a project.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

Body
application/json

A list of TOC node IDs to delete.

Schema for deleting multiple TOC nodes.

tocNodeIds
array string[]
required
Responses
  • 204

    The TOC nodes were deleted successfully.

DELETE/projects/{projectId}/toc/nodes
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes \
  --request DELETE \
  --header 'Authorization: Basic username:password' \
  --header 'Content-Type: application/json' \
  --data '{
  "tocNodeIds": [
    ""
  ]
}'
No Body

Get a TOC node

Returns information on a single TOC node.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

  • tocNodeId
    string
    required

    The ID of the TOC node.

Responses
GET/projects/{projectId}/toc/nodes/{tocNodeId}
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes/ \
  --header 'Authorization: Basic username:password'
{
  "id": "…",
  "caption": "…",
  "parentId": "…",
  "topicId": "…",
  "ordinalNo": 1,
  "isShowInToc": true,
  "isAutoDocsMountPoint": true
}

Update a TOC node

Updates TOC node metadata.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

  • tocNodeId
    string
    required

    The ID of the TOC node.

Body
application/json

The properties to update.

The properties to update for a TOC node.

caption
string

The new TOC node caption.

parentId
string | nullable

The new unique identifier of the parent TOC node.

ordinalNo
integer

The new position of the node in the TOC.

isShowInToc
boolean

Whether to show the folder in the TOC in publications.

updatedFields
string
required

A comma-separated list of fields to update. If a field is not in this list, it will not be updated.

Responses
PATCH/projects/{projectId}/toc/nodes/{tocNodeId}
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes/ \
  --request PATCH \
  --header 'Authorization: Basic username:password' \
  --header 'Content-Type: application/json' \
  --data '{
  "caption": "",
  "parentId": "",
  "ordinalNo": 1,
  "isShowInToc": true,
  "updatedFields": ""
}'
{
  "id": "…",
  "caption": "…",
  "parentId": "…",
  "topicId": "…",
  "ordinalNo": 1,
  "isShowInToc": true,
  "isAutoDocsMountPoint": true
}

Delete a TOC node

Deletes a single TOC node along with the linked topic from a project.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

  • tocNodeId
    string
    required

    The ID of the TOC node.

Responses
  • 204

    The TOC node was successfully deleted.

DELETE/projects/{projectId}/toc/nodes/{tocNodeId}
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes/ \
  --request DELETE \
  --header 'Authorization: Basic username:password' \
  --header 'Content-Type: text/plain;charset=UTF-8' \
  --data ""
No Body

Get child TOC nodes

Returns a list of children nodes of a specific TOC node.

Path Parameters
  • projectId
    string
    required

    The ID of the project.

  • tocNodeId
    string
    required

    The ID of the TOC node.

Query Parameters
  • isRecursive
    boolean
    default:
    false

    Whether to get all descendant nodes recursively.

Responses
GET/projects/{projectId}/toc/nodes/{tocNodeId}/children
curl https://your-portal.clickhelp.co/api/v1/projects//toc/nodes//children \
  --header 'Authorization: Basic username:password'
[
  {
    "id": "…",
    "caption": "…",
    "parentId": "…",
    "topicId": "…",
    "ordinalNo": 1,
    "isShowInToc": true,
    "isAutoDocsMountPoint": true
  }
]