Count feedback records per taxonomy node
client.taxonomy.runs.retrieveRecordCounts(stringrunID, RunRetrieveRecordCountsParams { tenant_id } query, RequestOptionsoptions?): RunRetrieveRecordCountsResponse { counts }
GET/v1/taxonomy/runs/{run_id}/record-counts
Returns the feedback-record count for every visible node in a taxonomy run. Each count is a subtree total, so a topic (branch) reports the sum of its subtopics and the root reports the run total. Tenant-scoped; returns 404 if the run does not belong to the tenant.
Parameters
runID: string
formatuuid
Returns
Count feedback records per taxonomy node
import FormbricksHub from '@formbricks/hub';
const client = new FormbricksHub({
apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});
const response = await client.taxonomy.runs.retrieveRecordCounts(
'019f177f-9aa3-705e-8195-cea2aa187268',
{ tenant_id: 'org-123' },
);
console.log(response.counts);{
"counts": [
{
"node_id": "019f177f-9aa3-705e-8195-cea2aa187268",
"record_count": 42
}
]
}Returns Examples
{
"counts": [
{
"node_id": "019f177f-9aa3-705e-8195-cea2aa187268",
"record_count": 42
}
]
}