跳轉到

API 文件

資安術語庫提供靜態 JSON API,可供其他應用程式使用。

端點

取得所有術語

GET /api/v1/terms.json

回傳所有術語的列表。

取得單一術語

GET /api/v1/terms/{term_id}.json

回傳指定術語的詳細資訊。

範例:

GET /api/v1/terms/apt.json

取得所有分類

GET /api/v1/categories.json

回傳所有分類的列表。

取得所有標籤

GET /api/v1/tags.json

回傳所有標籤及其術語數量,依使用次數排序。

回應格式

術語物件

{
  "id": "apt",
  "term_en": "APT",
  "term_zh": "進階持續性威脅",
  "definitions": {
    "brief": "國家級駭客組織發動的長期網路攻擊",
    "standard": "進階持續性威脅是一種..."
  },
  "category": "threat_actors",
  "tags": ["國家級", "長期攻擊"],
  "related_terms": ["apt_group", "nation_state"]
}

使用範例

JavaScript

fetch('https://astroicers.github.io/security-glossary-tw/api/v1/terms/apt.json')
  .then(response => response.json())
  .then(term => {
    console.log(term.term_zh); // 進階持續性威脅
  });

Python

import requests

resp = requests.get(
    'https://astroicers.github.io/security-glossary-tw/api/v1/terms/apt.json'
)
term = resp.json()
print(term['term_zh'])  # 進階持續性威脅

CORS

靜態檔案透過 GitHub Pages 提供,支援跨域請求。