Discourse
@webframp/discoursev2026.06.15.1
01README
Query Discourse forums via the public REST API. List categories, browse topics, read full posts, and search. Supports optional API key for authenticated access.
Authentication
Public forums need no authentication. For private instances, provide an
API key via the apiKey global argument (store in a swamp vault).
Usage
swamp model create @webframp/discourse security-forum
# Set host in the model definition globalArguments
swamp model method run security-forum list_categories
swamp model method run security-forum list_latest
swamp model method run security-forum list_category_topics --input slug=cyber-news --input categoryId=8
swamp model method run security-forum get_topic --input topicId=170
swamp model method run security-forum search --input query=CVE02Models
@webframp/discoursev2026.06.05.1discourse/discourse.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| host | string | Discourse instance hostname (e.g. discourse.example.com) |
| apiKey? | string | API key for authenticated access. Omit for public read-only. |
| apiUsername? | string | Discourse username matching the API key owner. Required when apiKey is set. Use 'system' only with global admin keys. |
fn list_categories()
List all forum categories with topic counts.
fn list_latest(page: number)
List the latest topics across all categories.
| Argument | Type | Description |
|---|---|---|
| page | number | Page number (0-based) |
fn list_category_topics(slug: string, categoryId: number, page: number)
List topics in a specific category by slug and ID.
| Argument | Type | Description |
|---|---|---|
| slug | string | Category slug (e.g. cyber-news) |
| categoryId | number | Category ID |
| page | number | Page number (0-based) |
fn get_topic(topicId: number)
Get a full topic with all posts.
| Argument | Type | Description |
|---|---|---|
| topicId | number | Topic ID |
fn search(query: string, page: number)
Search topics and posts by keyword.
| Argument | Type | Description |
|---|---|---|
| query | string | Search query |
| page | number | Page number (1-based) |
Resources
categories(1h)— Forum category listing
topics(30m)— Topic listing (latest or by category)
topicDetail(1h)— Full topic with posts
searchResults(30m)— Search results
03Previous Versions
2026.06.05.1Jun 5, 2026
04Stats
A
100 / 100
Downloads
0
Archive size
6.3 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels