Discourse
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=CVE2026.09.15.1
Changed: Bump zod 4.4.3 → 4.6.5
2026.08.28.1
Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.
Upgrade note: License text only. No API, schema, or runtime behavior changed.
2026.08.26.2
Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry
quality scorer can resolve dependencies and score the extension. An earlier
release used a bare "zod" import-map specifier, which published but scored as
unscored.
Changed: Retained explicit compilerOptions.strict in deno.json. No
behavioral or schema changes.
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. |
| Argument | Type | Description |
|---|---|---|
| page | number | Page number (0-based) |
| Argument | Type | Description |
|---|---|---|
| slug | string | Category slug (e.g. cyber-news) |
| categoryId | number | Category ID |
| page | number | Page number (0-based) |
| Argument | Type | Description |
|---|---|---|
| topicId | number | Topic ID |
| Argument | Type | Description |
|---|---|---|
| query | string | Search query |
| page | number | Page number (1-based) |
Resources
2026.08.28.1
Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.
Upgrade note: License text only. No API, schema, or runtime behavior changed.
2026.08.26.2
Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry
quality scorer can resolve dependencies and score the extension. An earlier
release used a bare "zod" import-map specifier, which published but scored as
unscored.
Changed: Retained explicit compilerOptions.strict in deno.json. No
behavioral or schema changes.
2026.08.26.2
Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry
quality scorer can resolve dependencies and score the extension. An earlier
release used a bare "zod" import-map specifier, which published but scored as
unscored.
Changed: Retained explicit compilerOptions.strict in deno.json. No
behavioral or schema changes.
2026.08.25.1
Changed: Updated labels for improved extension discoverability. Added cross-cutting category labels (security, observability, finops, infrastructure, networking, compliance, devops, ai, incident-response) where applicable.
updated labels
2026.08.24.1
Added: Output metadata attributes for observability.
durationMs: Method execution duration in milliseconds.collectedBy: Extension name that produced the data.fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.23.1
Changed: Documentation only — no code changes. Improved the thin
get_topic method description and added a usage example showing how to
inspect topicDetail.truncated. Added a ## Troubleshooting section
covering the apiUsername-required-with-apiKey client-side check, wrapped
Discourse API <status> errors (403/429 with a body snippet), the
unexpected-shape hard-fail when JSON lacks the expected list keys, what
get_topic's truncated: true actually means (a partial post_stream, not
resumable pagination), and a real inconsistency: search's page argument is
1-based while list_latest/list_category_topics are 0-based.
2026.08.21.2
Changed: topicId, categoryId, and page numbers are now required to be positive integers (topicId/categoryId) or non-negative integers (page) instead of any number — a fractional or negative ID used to sail through validation and fail later with a confusing 404 from the Discourse API. slug in list_category_topics must now be non-empty. list_categories, list_latest, and list_category_topics now check the shape of the Discourse response before reading into it: an unexpected JSON body (a misconfigured proxy, an HTML error page served as 200, an API version change) used to crash with a bare "Cannot read properties of undefined" pointing nowhere useful; it now raises an error naming the request that was made and a preview of what was actually returned.
2026.08.21.1
Changed: Added .describe(...) documentation to previously undocumented
fields in CategorySchema, TopicSchema, TopicDetailSchema,
CategoriesResultSchema, TopicsResultSchema, and SearchResultSchema.
Tightened host in GlobalArgsSchema to require a non-empty string — an
empty hostname can never resolve to a real Discourse instance. No behavioral
changes.
2026.07.18.1
Added: An upgrades array entry (no-op) to discourse.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.
2026.08.21.1
Changed: Added .describe(...) documentation to previously undocumented
fields in CategorySchema, TopicSchema, TopicDetailSchema,
CategoriesResultSchema, TopicsResultSchema, and SearchResultSchema.
Tightened host in GlobalArgsSchema to require a non-empty string — an
empty hostname can never resolve to a real Discourse instance. No behavioral
changes.
2026.07.18.1
Added: An upgrades array entry (no-op) to discourse.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.
2026.07.18.1
Added: An upgrades array entry (no-op) to discourse.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.
- 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