Skip to content

命令与后端接口对照 ​

每条 sp 命令调用的是哪个后端 HTTP 接口。自己写程序对接后端、或排查命令行为时查这张表。

本页保留英文

表中的接口路径和命令名与程序逐字对应,因此保留英文。

后端默认端口为 8090。除特别注明外,控制台接口需要带 access-token 请求头。

分类:platform(平台)、investigation(排查)、admin(管理)、—(不对外开放)。

Auth ​

MethodPathCLICategory
GET/api/login/getVerificationCode/{userName}(precursor to login)platform
POST/api/login/verifysp auth loginplatform
GET/api/login/refresh/{userName}sp auth refreshplatform
POST/api/login/loginAsGuestsp auth login --guestplatform
POST/api/login/oauthLogin——
GET/api/login/userProfile/{userName}sp auth whoami (future)investigation

Applications ​

MethodPathCLICategory
GET/api/applications/listsp app listplatform
POST/api/applications/createsp app createplatform
GET/api/applications/{appId}/agent-statussp app statusplatform
GET/api/applications/{appId}/replays/recentsp app replaysplatform
GET/api/applications/{appId}/extraction-rulessp extraction-rule listinvestigation
PUT/api/applications/{appId}/extraction-rulessp extraction-rule applyinvestigation
POST/api/extraction-rules/previewsp extraction-rule previewinvestigation
GET/api/agent/extraction-rules— (agent)—

Policies ​

MethodPathCLICategory
GET/api/recording-policies/policiessp policy recording listplatform
GET/api/recording-policies/policies/{id}sp policy recording getplatform
POST/api/recording-policies/policiessp policy recording applyplatform
POST/api/recording-policies/policies/yamlsp policy recording apply -fplatform
DELETE/api/recording-policies/policies/{id}sp policy recording deleteplatform
POST/api/recording-policies/policies/validatesp policy recording validateplatform
GET/api/recording-policies/policies/{id}/yamlsp policy recording exportplatform
*/api/mock-policies/*sp policy mock …platform
*/api/compare-rules/*sp policy compare …platform

Replay control (schedule) ​

MethodPathCLICategory
POST/api/createPlansp replay run (targetEnv = service base URL)platform
GET/api/createPlan— (webhook only)—
GET/api/progresssp replay statusplatform
GET/api/stopPlansp replay stopplatform
POST/api/reRunPlansp replay rerunplatform
POST/api/createRealTimePlansp replay realtime createinvestigation
GET/api/queue/control/*sp replay realtime queue …investigation
POST/api/compareCasesp replay compareinvestigation
GET/api/queryNoisesp replay noise queryinvestigation
POST/api/excludeNoisesp replay noise excludeinvestigation

Traces ​

MethodPathCLICategory
POST/api/traces/find-by-attrsp trace findinvestigation
GET/api/traces/{traceId}/summarysp trace getinvestigation
POST/api/traces/attr-rule-statisticssp trace statsinvestigation

Storage record (read) ​

MethodPathCLICategory
POST/api/storage/record/querysp record queryinvestigation
GET/api/storage/record/trace/{traceId}sp record traceinvestigation
GET/api/storage/record/completenesssp record completenessinvestigation
POST/api/storage/record/save——
*/api/storage/replay/query/*sp replay case list (partial)investigation
GET/api/storage/replay-mock-tree/{replayId}sp replay mock-treeinvestigation

Logs ​

MethodPathCLICategory
GET/api/recorder/logssp logsinvestigation

旧的 /api/record-logs/* 和 /api/replay-logs/* 接口以及 sp record logs / sp replay logs 命令已移除,见 sp logs。

Reports (subset) ​

MethodPathCLICategory
GET/api/report/queryDiffMsgById/{id}sp replay diff get, sp diagnose replayinvestigation
POST/api/report/queryPlanFailCasesp replay case list --plan (without --plan-item), sp diagnose replayinvestigation
POST/api/report/queryReplayCasesp replay case list --plan-item, sp replay case getinvestigation
POST/api/report/queryPlanStatisticssp replay statisticsinvestigation
POST/api/report/queryPlanStatisticsp replay reportinvestigation
POST/api/report/init— (not exposed)investigation
*/api/report/* (others)— (not exposed)investigation

Agent config ​

MethodPathCLICategory
POST/api/config/agent/loadsp config agent loadinvestigation
POST/api/config/agent/agentStatus— or sp app statusinvestigation

Legacy config ​

MethodPathCLICategory
GET/POST/api/config/{resource}/*— (not exposed; sp config legacy was removed)investigation

User groups ​

MethodPathCLICategory
*/api/userGroup/*sp group …investigation
*/api/appGrant/*sp grant …investigation

Health & ops ​

MethodPathCLICategory
GET/vi/healthsp healthplatform
GET/vi/storage/*sp ops storage …investigation
GET/vi/schedule/monitorsp ops schedule monitorinvestigation

Not exposed ​

MethodPathReason
POST/v1/tracesOTLP
POST/api/storage/record/saveAgent write
*/api/replay/local/*Local runner

Controller 源码:sp-tr-api/sp-web-api, sp-storage/sp-storage-web-api, sp-replay-schedule/sp-schedule-web-api.

捕获 Session · 审查 Steps · 改进关键所在