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

Description

Provides access to the topics of one BCF project.

const topics = await project.topics.list();
const created = await project.topics.create({ title: "New topic" });

Public Member Functions

 create (topicData)
 list (query={})

Function Documentation

◆ create()

create ( topicData)

Creates a topic.

Only title is required.

Parameters
{object}topicData - Topic creation data (title, topic_type, topic_status, priority, assigned_to, due_date, stage, labels, description, bim_snippet, ...).
Returns
{Promise<ApiResponse>} The response containing the created topic.
// Input:
{
"topic_type": "Clash",
"topic_status": "open",
"title": "Example topic 3",
"priority": "high",
"labels": ["Architecture", "Heating"],
"assigned_to": "harry.muster@example.com"
}
// Output:
{
"guid": "A245F4F2-2C01-B43B-B612-5E456BEF8116",
"server_assigned_id": "ISSUE-01462",
"creation_author": "Architect@example.com",
"creation_date": "2016-08-01T17:34:22.409Z",
"topic_type": "Clash",
"topic_status": "open",
"title": "Example topic 3",
"priority": "high",
"labels": ["Architecture", "Heating"],
"assigned_to": "harry.muster@example.com"
}

◆ list()

list ( query = {})
Parameters
{object}[query] - Optional list query.
{string}[query.filter] - Raw BCF/OData $filter expression (e.g. topic_status eq 'open').
Returns
{Promise<ApiResponse>} The response containing the topics.
// Output:
[{
"guid": "A245F4F2-2C01-B43B-B612-5E456BEF8116",
"server_assigned_id": "ISSUE-00001",
"creation_author": "Architect@example.com",
"title": "Example topic 1",
"labels": ["Architecture", "Structural"],
"creation_date": "2013-10-21T17:34:22.409Z"
}]