Skip to navigation

Read a file

View as Markdown

Get a Basement file’s metadata and a temporary download URL by ID. For text files up to 256 KB, also returns the text in content. Records an agent read.

Authentication

AuthorizationBearer

A Basement key (bsmt_...), from Agents, Connect in the app.

Request

This endpoint expects an object.
fileIdstringRequired

The file ID from list_files, list_skills or search

agentNamestringOptional
Optional agent name for attribution

Response

The tool's answer.
idstring
namestring
kindstring
mimeTypestring
sizeBytesinteger
versionCountinteger
downloadUrlstring or null
A temporary URL to download the file
contentstring or null
The file's text, for text files up to 256 KB
folderIdstring or nullOptional
folderNamestringOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error