Infohub JS API
Loading...
Searching...
No Matches
BcfProjectDocumentsResource Class Reference

Description

Lists the documents stored under one BCF project's document container.

Unlike every other resource in this file, this one talks to the infohub Hub service directly instead of the BCF 3.0 REST layer. BCF's own document listing (BcfTopicResource#documents) is nested under a topic path purely for spec compliance - the topic in that URL is validated but never used as the storage parent, so listing a project's documents that way requires an arbitrary existing topic to anchor the call. Documents actually live as doc_document nodes recursively under the project's '01 - DOKUMENTE/MODELLE' container (object_id cn_documents, see the PROJECT node schema), so this walks that subtree straight from the Hub instead, with no topic dependency.

const documents = await project.documents.list();

Public Member Functions

async list ()

Function Documentation

◆ list()

async list ( )

Recursively lists every document under the project's document container.

Returns
{Promise<ApiResponse>} The response containing {guid, filename} documents.
// Output:
[{
"guid": "472ab37a-6122-448e-86fc-86503183b520",
"filename": "LegalRequirements.pdf"
}, {
"guid": "6cbfe31d-95c3-4f4d-92a6-420c23698721",
"filename": "DesignParameters.pdf"
}]