Skip to content

Feature Request: Add REST API Support for Creating Global Topics #236

@philippconzett

Description

@philippconzett

Summary

HumHub 1.17 introduced Global Topics, enabling network-wide topic classification. However, the REST API provides no way to create Global Topics programmatically.

The Topic API only allows topic creation inside a container (POST /topic/container/{containerId}), making it impossible to create topics without a Space container. [docs.humhub.org]

Global Topic conversion is available only in the admin GUI: "Administrators can easily convert existing Space-specific topics to Global Topics through the admin menu…" [github.com]

Additionally, attempting to create a topic without a container produces backend errors, indicating model‑level assumptions that all topics must belong to a ContentContainer. [community.humhub.com]

Global content itself is defined as content "without a ContentContainer relation," so Global Topics should logically be supported without requiring a container ID. [github.com]

Requested Feature

Please add REST API support for programmatically creating Global Topics.

Possible approaches

Option A — New endpoint

POST /api/v1/topic/global

Option B — Allow null container IDs

Allow:

POST /api/v1/topic/container/null

and interpret it as global.

Option C — Add conversion endpoint

POST /api/v1/topic/{id}/make-global

Any of these would make Global Topics manageable in automated workflows.

Why This Feature Matters

1. Automation at scale

Organizations with many Spaces often need to create or migrate hundreds of topics programmatically. Without API support, this requires manual GUI steps — slow, error‑prone, and impossible to integrate into DevOps pipelines.

2. Consistency with the existing Topic API

The API supports listing, updating, and deleting topics, but does not support:

  • creating Global Topics
  • converting topics to Global

This makes the Topic API incomplete. [docs.humhub.org]

3. Alignment with HumHub’s Global Topics feature

Global Topics are a first‑class feature in HumHub 1.17+, but cannot be created through any programmatic interface. Adding API support would complete the feature set and enable real integrations. [github.com]

Current Limitations (Verified)

  • Topic creation requires a valid container ID. [docs.humhub.org]
  • Global Topics can only be created or converted via the GUI. [github.com]
  • Creating a topic without a container results in a backend exception. [community.humhub.com]
  • Global content, by design, has no container — making API support especially appropriate. [github.com]

Suggested Acceptance Criteria

  • The REST API allows creation of topics with no container.
  • API returns "contentcontainer_id": null for Global Topics.
  • Validation accepts container‑less topics.
  • The feature is documented in the HumHub REST API manual.

Thank You!

This enhancement would greatly improve automation, scripting, integrations, and overall consistency in topic management. Happy to help test or provide follow‑up details if needed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions