数据分析 API
1. "获取行为分析"
- route definition
- Url: /api/v1/analytics/behavior
- Method: GET
- Request:
AnalyticsBehaviorRequest - Response:
AnalyticsBehaviorResponse
- request definition
go
type AnalyticsBehaviorRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。2. "获取功能采用率"
- route definition
- Url: /api/v1/analytics/behavior/adoption
- Method: GET
- Request:
AnalyticsBehaviorAdoptionRequest - Response:
AnalyticsBehaviorAdoptionResponse
- request definition
go
type AnalyticsBehaviorAdoptionRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。3. "获取功能采用率明细"
- route definition
- Url: /api/v1/analytics/behavior/adoption/breakdown
- Method: GET
- Request:
AnalyticsBehaviorAdoptionBreakdownRequest - Response:
AnalyticsBehaviorAdoptionBreakdownResponse
- request definition
go
type AnalyticsBehaviorAdoptionBreakdownRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
Feature string `form:"feature,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。4. "获取行为事件"
- route definition
- Url: /api/v1/analytics/behavior/events
- Method: GET
- Request:
AnalyticsBehaviorEventsRequest - Response:
AnalyticsBehaviorEventsResponse
- request definition
go
type AnalyticsBehaviorEventsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
EventType string `form:"eventType,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。5. "获取行为漏斗"
- route definition
- Url: /api/v1/analytics/behavior/funnel
- Method: GET
- Request:
AnalyticsBehaviorFunnelRequest - Response:
AnalyticsBehaviorFunnelResponse
- request definition
go
type AnalyticsBehaviorFunnelRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
Steps []string `form:"steps,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。6. "获取行为路径"
- route definition
- Url: /api/v1/analytics/behavior/paths
- Method: GET
- Request:
AnalyticsBehaviorPathsRequest - Response:
AnalyticsBehaviorPathsResponse
- request definition
go
type AnalyticsBehaviorPathsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。7. "获取分析过滤器"
- route definition
- Url: /api/v1/analytics/filters
- Method: GET
- Request:
AnalyticsFiltersGetRequest - Response:
AnalyticsFiltersGetResponse
- request definition
go
type AnalyticsFiltersGetRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。8. "更新分析过滤器"
- route definition
- Url: /api/v1/analytics/filters
- Method: PUT
- Request:
AnalyticsFiltersUpdateRequest - Response:
AnalyticsFiltersUpdateResponse
- request definition
go
type AnalyticsFiltersUpdateRequest struct {
GameID string `json:"gameId"`
Env string `json:"env"`
Events []string `json:"events,optional"`
PaymentsEnabled bool `json:"paymentsEnabled,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。9. "采集分析数据"
- route definition
- Url: /api/v1/analytics/ingest
- Method: POST
- Request:
AnalyticsIngestRequest - Response:
AnalyticsIngestResponse
- request definition
go
type AnalyticsIngestRequest struct {
GameID string `json:"gameId"`
Env string `json:"env"`
Events []interface{} `json:"events"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。10. "获取等级分析"
- route definition
- Url: /api/v1/analytics/levels
- Method: GET
- Request:
AnalyticsLevelsRequest - Response:
AnalyticsLevelsResponse
- request definition
go
type AnalyticsLevelsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。11. "获取关卡分析"
- route definition
- Url: /api/v1/analytics/levels/episodes
- Method: GET
- Request:
AnalyticsLevelsEpisodesRequest - Response:
AnalyticsLevelsEpisodesResponse
- request definition
go
type AnalyticsLevelsEpisodesRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。12. "获取地图分析"
- route definition
- Url: /api/v1/analytics/levels/maps
- Method: GET
- Request:
AnalyticsLevelsMapsRequest - Response:
AnalyticsLevelsMapsResponse
- request definition
go
type AnalyticsLevelsMapsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。13. "获取分析概览"
- route definition
- Url: /api/v1/analytics/overview
- Method: GET
- Request:
AnalyticsOverviewRequest - Response:
AnalyticsOverviewResponse
- request definition
go
type AnalyticsOverviewRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。14. "获取支付分析"
- route definition
- Url: /api/v1/analytics/payments
- Method: GET
- Request:
AnalyticsPaymentsRequest - Response:
AnalyticsPaymentsResponse
- request definition
go
type AnalyticsPaymentsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。15. "采集支付数据"
- route definition
- Url: /api/v1/analytics/payments/ingest
- Method: POST
- Request:
AnalyticsPaymentsIngestRequest - Response:
AnalyticsPaymentsIngestResponse
- request definition
go
type AnalyticsPaymentsIngestRequest struct {
GameID string `json:"gameId"`
Env string `json:"env"`
Transactions []interface{} `json:"transactions"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。16. "获取产品趋势"
- route definition
- Url: /api/v1/analytics/payments/product-trend
- Method: GET
- Request:
AnalyticsPaymentsProductTrendRequest - Response:
AnalyticsPaymentsProductTrendResponse
- request definition
go
type AnalyticsPaymentsProductTrendRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
ProductID string `form:"productId,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。17. "获取支付摘要"
- route definition
- Url: /api/v1/analytics/payments/summary
- Method: GET
- Request:
AnalyticsPaymentsSummaryRequest - Response:
AnalyticsPaymentsSummaryResponse
- request definition
go
type AnalyticsPaymentsSummaryRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。18. "获取支付交易列表"
- route definition
- Url: /api/v1/analytics/payments/transactions
- Method: GET
- Request:
AnalyticsPaymentsTransactionsRequest - Response:
AnalyticsPaymentsTransactionsResponse
- request definition
go
type AnalyticsPaymentsTransactionsRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
Page int `form:"page,optional"`
PageSize int `form:"pageSize,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。19. "获取实时数据"
- route definition
- Url: /api/v1/analytics/realtime
- Method: GET
- Request:
AnalyticsRealtimeRequest - Response:
AnalyticsRealtimeResponse
- request definition
go
type AnalyticsRealtimeRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。20. "获取实时序列数据"
- route definition
- Url: /api/v1/analytics/realtime/series
- Method: GET
- Request:
AnalyticsRealtimeSeriesRequest - Response:
AnalyticsRealtimeSeriesResponse
- request definition
go
type AnalyticsRealtimeSeriesRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
Interval string `form:"interval,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。21. "获取留存分析"
- route definition
- Url: /api/v1/analytics/retention
- Method: GET
- Request:
AnalyticsRetentionRequest - Response:
AnalyticsRetentionResponse
- request definition
go
type AnalyticsRetentionRequest struct {
GameID string `form:"gameId,optional"`
Env string `form:"env,optional"`
StartDate string `form:"startDate,optional"`
EndDate string `form:"endDate,optional"`
}- response definition
go
// 实际响应为裸 payload(业务 DTO 直接 JSON 序列化),无 code/message envelope。
// 错误统一 { "error", "message", "details" }(见 rest.md)。