BroadListeningβ

API ドキュメント

BroadListening APIはRESTful設計で、JSON形式でデータを返します。認証不要で自由に利用できます。

ベースURL

http://localhost:3009

共通レスポンス形式(ページネーション)

{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "totalPages": 5
  }
}

Endpoints

エンドポイント一覧

GET/api/topics

トピック一覧を取得(ページネーション対応)

Query Params: pagelimit
Response: { data: BLTopic[], pagination: { page, limit, total, totalPages } }
POST/api/topics

新しいトピックを作成

Request Body:
title (string)description (string)quorumThreshold? (number)billId? (string)
Response: BLTopic
GET/api/topics/:id

トピック詳細を取得(意見・クラスタ・議論構造含む)

Response: BLTopic (with all relations)
GET/api/topics/:id/opinions

トピックの意見一覧を取得

Query Params: pagelimit
Response: { data: BLOpinion[], pagination: { ... } }
POST/api/topics/:id/opinions

意見を投稿(フェロモン初期値を自動生成)

Request Body:
content (string)stance (FOR|AGAINST|NEUTRAL)authorId? (string)
Response: BLOpinion
POST/api/topics/:id/opinions/:opinionId/support

意見を支持(フェロモン強化)

Request Body:
stance (FOR|AGAINST|NEUTRAL)weight? (number)userId (string)
Response: BLSupport
POST/api/topics/:id/analyze

LLMパイプライン全実行(議論抽出→エンベディング→クラスタリング→適応度→フェーズ判定)

Response: { arguments, clusters, phase, ecosystem }
GET/api/topics/:id/ecosystem

ビジュアライゼーション用エコシステムデータを取得

Response: { topic, ecosystem, argumentGraph, pheromone, history }
POST/api/topics/:id/ai-participate

AIエージェントに多視点から意見を生成させる

Request Body:
perspectives? (number, default: 3)
Response: { opinions: BLOpinion[] }
POST/api/seed

サンプルデータを投入(デモ用)

Response: { topics: number, opinions: number }

Data Models

主要データモデル

BLTopic

  • id, title, description
  • phase (OPEN|DELIBERATION|CONVERGENCE|CLOSED)
  • quorumThreshold, billId?

BLOpinion

  • id, content, stance
  • authorId, x, y, fitness
  • supportCount, topicId, clusterId?

BLArgument

  • id, type (CLAIM|PREMISE|EVIDENCE|REBUTTAL)
  • content, confidence
  • opinionId, topicId

BLPheromone

  • id, intensity, quality
  • decayRate, lastUpdated
  • opinionId