Hive API Docs

Stats

Read workspace counters with the hive-cms SDK

Use stats for dashboards, KPI cards, and landing-page counters.

SDK usage

import { Hive } from 'hive-cms';

const hive = new Hive();
const stats = await hive.stats.get();

console.log(stats.totalPosts);
console.log(stats.totalAuthors);
console.log(stats.totalCategories);
console.log(stats.totalTags);

Error handling

hive.stats.get() throws HiveApiError with status/code/details for request failures.

Technical notes

  • Counts reflect the public content surface of the workspace.
  • SDK validates that stat values are numeric.

Full API details

See API Reference: Stats.

On this page