Space Storages
List Space Storage Path
List files and directories in space storage
get
/v1/space/{spaceId}/storage/list/{path}
Description
List files and directories in the space's storage. Supports both flat and recursive listing. The path is specified in the URL after /list/. Omit the path to list the root directory.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
spaceIdstring* Required
The ID of the space
pathstring
The directory path (defaults to root)
recursiveboolean
Whether to list files recursively
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.space.storage.list(
spaceId, path)
{"items":[{"id":"string","path":"string","size":"number","updatedAt":"number","isDirectory":"boolean"}],"nextToken":"string"}The list of files was retrieved successfully