core-documentation

General Topic

List general topics

GET /console/lab/general_topics

Auth

Paging

NO

Available query parameters

Key Type Description Match Example
title string 用標題過濾大議題清單 partial 正義

Response

{
  rows: [
    {
      id
      title
      index
      image
      specific_topics: [
        {
          id
          title
          index
          image
        }
        ...
      ]
    }
    ...
  ]
  totalRowCount
}

Get a single general topic

GET /console/lab/general_topics/:id

Auth

Paging

NO

Response

{
  id
  title
  index
  image
  description
  specific_topics: [
    {
      id
      title
      index
      image
    }
    ...
  ]
}

Create a general topic

POST /console/lab/general_topics

Auth

Paging

NO

Input

Key Type Required Description
title string 🌕 標題
index integer 🌕 排序
image string 🌕 圖像
description string 🌕 敘述
specific_topics array of integers: specific topic IDs 🌕 關聯小議題 ID 列表

Sample input

{
  "title": "人民參政",
  "index": 1,
  "image": "path/to/image.png",
  "description": "Lorem ipsum.",
  "specific_topics": [
    1, 2, 3
  ]
}

Response

Returns the newly created general topic

Update a general topic

PATCH /console/lab/general_topics/:id

Auth

Paging

NO

參考 Create a general topic

Delete a general topic

DELETE /console/lab/general_topics/:id

Auth

Paging

NO

Response

204 No Content