返回 Skill 列表
extension
分类: 开发与工程无需 API Key

box

通过Box API管理文件和文件夹。安全地上传、下载和分享内容。

person作者: jakexiaohubgithub

Box

Enterprise cloud storage.

Environment

export BOX_ACCESS_TOKEN="xxxxxxxxxx"

List Files in Folder

curl "https://api.box.com/2.0/folders/0/items" -H "Authorization: Bearer $BOX_ACCESS_TOKEN"

Upload File

curl -X POST "https://upload.box.com/api/2.0/files/content" \
  -H "Authorization: Bearer $BOX_ACCESS_TOKEN" \
  -F "attributes={\"name\":\"file.txt\",\"parent\":{\"id\":\"0\"}}" \
  -F "file=@localfile.txt"

Download File

curl "https://api.box.com/2.0/files/{fileId}/content" -H "Authorization: Bearer $BOX_ACCESS_TOKEN" -o file.txt

Links

  • Docs: https://developer.box.com