Space Storages
Move Space Storage Path
Move (rename) a file in space storage
post
/v1/space/{spaceId}/storage/move/{path}
Description
Move a file from one location to another within space storage, or rename a file by moving it to a new path. The source file path is specified in the URL after /move/. The destinationPath in the request body is the target location for the file.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
spaceIdstring* Required
The ID of the space
pathstring* Required
The source file path
Request Body * Required
Request Body Schema: application/json
destinationPathstring
The destination file path
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.space.storage.move(
spaceId, path,{)}"destinationPath":"string"
{"path":"string"}The file was moved successfully