Knowledge Base

Create a folder in a knowledge base. Omit folderId to create at the KB root; pass folderId as a query parameter to create a nested subfolder inside an existing parent folder.

Required permission: WRITER or higher

Folder features:

  • Organize records hierarchically
  • Support nested subfolders, up to 20 levels deep
  • Inherit parent KB permissions

Naming rules:

  • Whitespace around the name is removed first; then 1–255 characters
  • A name holding an HTML tag, a javascript: URL or an inline event handler is refused with 400 before authentication; one holding a printf-style format specifier (%s, %x, %n, %p) is refused with 400 by the gateway controller
  • Spaces and special characters allowed
  • A name already used by a folder in the same parent is refused with 409, ignoring case (Reports and rEPORTS clash). A file of the same name, or a folder of the same name under another parent, does not clash.

Request: only folderName and the folderId query parameter are read; other body fields and query parameters are ignored, except a folderId, parentId or parent_id in the body and a parentId or parent_id query parameter, which are refused with 400.

Access: a caller with no role on the knowledge base gets 404 (Knowledge base <kbId> not found), a READER gets 403.

Response: Returns id and name for the created folder.

post/knowledgeBase/{kbId}/folder

Request

  • Base URL
    https://app.pipeshub.com/api/v1
  • URL
    https://app.pipeshub.com/api/v1/knowledgeBase/{kbId}/folder
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: /api/v1/oauth2/authorize
      Client credentials
      Token URL: /api/v1/oauth2/token scopes: kb:write

Path parameters

kbIdstring uuid required

Knowledge base ID

Query parameters

folderIdstring

Parent folder ID. Omit to create at the knowledge base root. An id that is not a folder of this knowledge base (unknown, or a file) is answered 404.

Request body

folderNamestring required

Name of the folder. Whitespace around it is removed first, so a name made only of whitespace is refused as empty. It cannot contain / or \, which folder paths use as separators.

Example request

{
  "folderName": "Project Documents"
}

Response

Folder created successfully

idstring required

Unique folder identifier

namestring required

Name of the folder

Changes

    • breaking

      for the query request parameter folderId, the minLength was increased from 0 to 1

    • breaking

      for the path request parameter kbId, the format changed from no format to uuid

    • breaking

      added the pattern ^(?![\s\S]*?(?:(?<!\w)%(?:\d{1,10}\$)?[#0\-+ ]{0,10}(?:\d{1,10})?(?:\.\d{1,10})?(?:h{1,2}|l{1,2}|L|z|j|t)?[nsxXp]))[\s\S]*?\S to the request property

    • info

      added the media type application/x-www-form-urlencoded to the request body

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status