Create subfolder
Changed onCreate 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.
Request
- Base URLhttps://app.pipeshub.com/api/v1
- URLhttps://app.pipeshub.com/api/v1/knowledgeBase/{kbId}/folder/{folderId}/subfolder
- Auth
- HTTP bearer
- or OAuth 2Authorization code: /api/v1/oauth2/authorizeClient credentialsToken URL: /api/v1/oauth2/token scopes: kb:write
Path parameters
Knowledge base ID
Parent folder ID. An id that is not a folder of this knowledge base (unknown, or a file) is answered 404.
Query parameters
Optional. When sent, it must equal the folderId path parameter (Conflicting folderId in path and query parameters).
Request body
Example request
{
"folderName": "Project Documents"
}Response
Folder created successfully
Changes
- breaking
added the new required
queryrequest parameterfolderId - breaking
for the
pathrequest parameterkbId, the format changed from no format touuid - 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]*?\Sto the request property - info
added the media type
application/x-www-form-urlencodedto the request body
- breaking
- info
endpoint added
- info