指南
公開 Ping 測試
公開平面 Ping
{{api_base}}/api/public/ping 是無需 client_secret 的健康檢查端點,可用於確認 API 連線與延遲。
用途
- 監控 API 是否可達
- 測量往返延遲
- 驗證部署環境的 API URL 設定
右側試用面板可直接呼叫 public ping。
public-ping.html
<button type="button" id="ping">Public Ping</button>
<pre id="out"></pre>
<script>
document.getElementById("ping").addEventListener("click", async () => {
const t0 = performance.now();
const res = await fetch("{{api_base}}/api/public/ping");
const data = await res.json();
document.getElementById("out").textContent = JSON.stringify(
{ status: res.status, latencyMs: Math.round(performance.now() - t0), body: data },
null,
2,
);
});
</script>目前為模擬模式,回應為範例資料
登入 Dev 以真實測試Try-it
模擬模式:不會發送真實請求
Request
GET https://api.hsystem.halphastech.com/api/public/ping
Response
(尚未發送)

