API 文件

3 分鐘快速上手,開始使用博山科技統計 API

快速開始

1

取得 API Key

註冊帳號後,在後台「API Key 管理」頁面建立一組新的 API Key。

2

呼叫 API

import requests

response = requests.post(
    "https://api.boshan.roamer-tech.info/v1/models/arima/run",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "data": [100, 102, 105, 103, 108, 110],
        "p": 1, "d": 1, "q": 1,
        "forecast_periods": 6
    }
)
result = response.json()
print(result["result"]["forecasts"])
curl -X POST \
  https://api.boshan.roamer-tech.info/v1/models/arima/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": [100, 102, 105, 103, 108, 110],
    "p": 1, "d": 1, "q": 1,
    "forecast_periods": 6
  }'
3

取得結果

API 回傳 JSON 格式的分析結果,包含預測值、信賴區間、診斷統計量等。

API Endpoints

GET /api/v1/models

列出所有可用統計模型

GET /api/v1/models/{slug}

取得模型詳情與參數定義

POST /api/v1/models/{slug}/run

執行統計模型(非同步)

GET /api/v1/jobs/{uuid}

查詢 Job 狀態與結果

GET /api/v1/api-keys

列出所有 API Keys

POST /api/v1/api-keys

建立新 API Key

DELETE /api/v1/api-keys/{id}

撤銷 API Key

API 快速測試

選擇一個模型,點擊「執行」即可模擬 API 呼叫並查看分析結果與圖表

POST
Response — 200 OK

點擊「執行 API 呼叫」查看分析結果圖表