Knowledge Base

Create subfolder

Changed on

Create a nested subfolder inside an existing parent folder, named by the folderId path parameter. It runs the same validator and handler as POST /knowledgeBase/{kbId}/folder. A folderId query parameter is still read: one that names a different folder than the path is refused with 400.

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/{folderId}/subfolder

Request

  • Base URL
    https://app.pipeshub.com/api/v1
  • URL
    https://app.pipeshub.com/api/v1/knowledgeBase/{kbId}/folder/{folderId}/subfolder
  • 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

folderIdstring uuid required

Parent folder ID. An id that is not a folder of this knowledge base (unknown, or a file) is answered 404.

Query parameters

folderIdstring

Optional. When sent, it must equal the folderId path parameter (Conflicting folderId in path and query parameters).

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

      added the new required query request parameter folderId

    • 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

      endpoint added