我有一个文件:

文件内有一个数据库,默认有一个表格的界面:
我获取到了文件的内容如下:(有 properties, children):
{
"ID": "20251120095051-96sbh8a",
"Spec": "1",
"Type": "NodeDocument",
"Properties": {
"id": "20251120095051-96sbh8a",
"title": "幕类型",
"type": "doc",
"updated": "20251124084744"
},
"Children": [
{
"ID": "20251120095051-mn4i22n",
"Type": "NodeAttributeView",
"Properties": {
"custom-sy-av-view": "20251124083029-eb0nvjx",
"id": "20251120095051-mn4i22n",
"updated": "20251124084744"
},
"AttributeViewID": "20251124083029-suie7a5",
"AttributeViewType": "table"
},
{
"ID": "20251124083031-2x7a465",
"Type": "NodeParagraph",
"Properties": {
"id": "20251124083031-2x7a465",
"updated": "20251124083031"
}
}
]
}
针对上述信息:
数据库的信息为:
{
"ID": "20251120095051-mn4i22n",
"Type": "NodeAttributeView",
"Properties": {
"custom-sy-av-view": "20251124083029-eb0nvjx",
"id": "20251120095051-mn4i22n",
"updated": "20251124084744"
},
"AttributeViewID": "20251124083029-suie7a5",
"AttributeViewType": "table"
},
请问:应该使用哪个 API,获取到这个 table 的所有行的数据呢?
这里有 3 种 ID:
1、"ID": "20251120095051-mn4i22n",
2、"Properties": {
"custom-sy-av-view": "20251124083029-eb0nvjx",
3、"AttributeViewID": "20251124083029-suie7a5"
请问:应该使用哪个 ID 和哪个 API 获取到表格的所有行内容呢?
===
我尝试使用此方法,通过:/api/av/getAttributeView 此 API:但是一直未能获取数据:
export async function getDatabaseEntries(tableId: string): Promise<any[]> {
try {
console.log('getDatabaseEntries start: ', tableId)
// 调用思源内部API获取数据库详细信息
const response: any = await fetchPost('/api/av/getAttributeView', {
id: tableId
});
console.log('getDatabaseEntries response: ', response)
if (response.code !== 0) {
throw new Error(`Failed to get attribute view: ${response.msg}`);
}
return response.data;
} catch (error) {
console.error(`Failed to get database entries for table ${tableId}:`, error);
throw error;
}
}