SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Database → Get Schema

AI-generated

Overview

This node operation retrieves the schema of a SiYuan database, identified by the AttributeView ID (AV ID). It is useful for workflows that need to understand the structure of a database, such as its columns and data types, before performing further operations like adding rows or updating data.

Use Case Examples

  1. A user wants to fetch the schema of a specific SiYuan database to dynamically generate a form for data entry.
  2. An automation workflow retrieves the database schema to validate incoming data against the expected structure.

Properties

Name Meaning
AV ID The AttributeView ID of the database block, used to specify which database schema to retrieve. This ID is not the block ID itself but the data-av-ID attribute of the database block. It is required to identify the target database.

Output

JSON

  • schema - The structure of the database schema including details about columns and their data types.

Dependencies

  • Requires SiYuan API URL and API Token credentials for authentication.

Troubleshooting

  • Ensure that the AV ID provided is correct and corresponds to an existing database AttributeView in SiYuan.
  • Verify that the SiYuan API URL and API Token credentials are correctly set and valid.
  • Common error: 'SiYuan API URL and Token are required.' indicates missing or invalid credentials; resolve by providing valid API credentials.
  • If the resource or operation is unsupported, the node throws an error indicating the unsupported resource.

Discussion