steipete/eightctl

`metrics insights` fails: API returns 404 for `/v1/users/{id}/insights`

Open

#42 建立於 2026年7月13日

在 GitHub 查看
 (4 留言) (1 反應) (0 負責人)Go (26 fork)github user discovery
P2clawsweeper:current-main-reproclawsweeper:fix-shape-clearclawsweeper:queueable-fixgood first issueimpact:ux-frictionissue-rating: 🦀 challenger crabno-stale

倉庫指標

Star
 (80 star)
PR 合併指標
 (PR 指標待抓取)

描述

What happens

$ eightctl metrics insights
Error: api GET https://client-api.8slp.net/v1/users/<user-id>/insights: <!DOCTYPE html>
...
<pre>Cannot GET /v1/users/<user-id>/insights</pre>

The Cannot GET HTML body is the server's own 404 page, so this isn't an auth or client-side issue — the route doesn't exist on client-api.8slp.net (removed or never shipped).

What works

Same binary, same credentials:

  • eightctl metrics trends --from ... --to ... — works fine
  • eightctl metrics intervals --id <sessionID> — works fine

So only the Insights() call in internal/client/metrics.go (/users/{id}/insights) is affected.

Version

eightctl@v0.0.0-20260713021800-e05b8da853b9 (installed via go install ...@latest)

Suggestion

Either drop the subcommand, or point it at whatever endpoint currently serves insights data — the trends response already includes most of the insight-style fields (performanceWindows, chronotype, socialJetlag), so it may have been folded into /trends?model-version=v2.

貢獻者指南