Skip to main content

Discourse

@webframp/discoursev2026.06.15.1· 1d agoMODELS
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=CVE
02Models1
@webframp/discoursev2026.06.05.1discourse/discourse.ts

Global Arguments

ArgumentTypeDescription
hoststringDiscourse instance hostname (e.g. discourse.example.com)
apiKey?stringAPI key for authenticated access. Omit for public read-only.
apiUsername?stringDiscourse 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.
ArgumentTypeDescription
pagenumberPage number (0-based)
fn list_category_topics(slug: string, categoryId: number, page: number)
List topics in a specific category by slug and ID.
ArgumentTypeDescription
slugstringCategory slug (e.g. cyber-news)
categoryIdnumberCategory ID
pagenumberPage number (0-based)
fn get_topic(topicId: number)
Get a full topic with all posts.
ArgumentTypeDescription
topicIdnumberTopic ID
fn search(query: string, page: number)
Search topics and posts by keyword.
ArgumentTypeDescription
querystringSearch query
pagenumberPage 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 Versions1
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