Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Asset → Get File
AI-generatedSummary
Retrieves the raw content of a file from the SiYuan workspace by its internal file path.
Inputs
- filePath (required) — The internal file path within the SiYuan workspace (e.g., /data/assets/image.png). Must start with /.
Output shape
A single JSON object containing the file path and its content as a plain string.
Returns an empty string if the API returns a null value; throws an error if the path is invalid or the file does not exist.
Examples
Example 1: Retrieve a markdown file from the workspace assets directory.
Set filePath to '/data/assets/readme.md'.