Kuaishou Genius Actual API Skill
Overview
This skill helps an agent quickly move from Genius 页面操作 to 可复用的接口调用地图与脚本化验证 for the management-yearly/actual workflow.
Use it when the goal is to identify core backend endpoints, validate request dependencies, and build repeatable checks for Genius Actual data retrieval.
Quick Start
- 1. Ensure login/session is valid for
genius.corp.kuaishou.com. - Capture network around page reload and key filter actions.
- Focus on
/budget-portal/api/* requests; ignore static assets and telemetry unless debugging auth/risk. - Run script-based endpoint probe/client:
CODEBLOCK0
- 5. Output a concise report with:
- reachable endpoints
- required params/payload hints
- dependency order
- known blockers/limitations
Supported Capabilities
- 1. Core API extraction
- Identify actual business endpoints used by
management-yearly/actual.
- 2. API map generation
- Build endpoint catalog: method, path, purpose, required params/body.
- 3. Workflow reconstruction
- Reconstruct request order from page load to ledger detail fetch.
- 4. Scripted probing
- Use
scripts/genius_api_probe.sh to quickly verify endpoint reachability and baseline responses.
- 5. Troubleshooting focus
- Distinguish business API failures from:
- SSO/session expiration
- fingerprint/risk controls
- telemetry noise
API Map (Core Business)
Base domain:
Core endpoints observed in Actual flow:
- Purpose: fetch user auth context.
- Purpose: org tree for selectors/permissions scope.
- Purpose: tab-level notification/meta.
- Purpose: latest actual update metadata.
- Purpose: available versions for selected year.
- Purpose: ledger detail dataset.
- Notes: requires JSON body shaped by current filters.
- Purpose: product/metric dimension data for current view.
- Notes: requires JSON body shaped by current filters.
Non-core but commonly seen (usually ignore unless diagnosing):
- -
log-sdk.ksapisrv.com/* telemetry - INLINECODE14 device/risk
- INLINECODE15 fingerprint
Workflow
1) Session check
- - Confirm not redirected to SSO login.
- Verify
accessproxy_session works for genius.corp.kuaishou.com.
2) Capture
-
https://genius.corp.kuaishou.com/management-yearly/actual
3) Filter to business APIs
- - Keep only
/budget-portal/api/ requests. - Group by: authority → metadata → versions → ledger POSTs.
4) Rebuild minimal call chain
- - Start with GET chain (auth/org/version).
- Then reproduce POST ledger calls with realistic payload.
5) Validate by script
- - Run
genius_api_probe.sh with cookie + year. - Record HTTP code + brief body snippet.
6) Report
Always output:
- - API list (method/path/purpose)
- call order
- required parameters/body fields (known/unknown)
- current blockers and next action
Script Usage
Script paths:
- - INLINECODE21
- INLINECODE22
What they do:
- -
genius_api_probe.sh: probes key GET APIs and sends placeholder POSTs for quick triage - INLINECODE24 : structured client for core APIs (single endpoint or full workflow), supports custom JSON payload files
Required inputs:
- -
--base-url (default https://genius.corp.kuaishou.com) - INLINECODE27 (must include valid
accessproxy_session=...)
Optional:
Known Limitations
- 1. SSO/session coupling
- Without valid session cookie, requests fall back to SSO and API probing is invalid.
- 2. Risk/fingerprint controls
- Some environments may require device/fingerprint side requests; replay outside browser may fail.
- 3. POST body incompleteness
-
actual-ledger/detail and
actual-ledger/products need accurate business payload fields from live capture.
- 4. Environment drift
- static bundle versions and backend schema may change; always re-capture when results diverge.
- 5. Permission scope
- org tree and ledger visibility depend on account permissions; data differences are expected across users.
快手Genius Actual API技能
概述
该技能帮助智能体从 Genius页面操作 快速过渡到 可复用的接口调用地图与脚本化验证,适用于 management-yearly/actual 工作流。
当目标是识别核心后端端点、验证请求依赖关系并为Genius Actual数据检索构建可重复检查时使用。
快速开始
- 1. 确保 genius.corp.kuaishou.com 的登录/会话有效。
- 捕获页面重新加载和关键筛选操作时的网络请求。
- 关注 /budget-portal/api/* 请求;忽略静态资源和遥测数据(除非调试认证/风险控制)。
- 运行基于脚本的端点探测/客户端:
bash
cd scripts
bash geniusapiprobe.sh \
--base-url https://genius.corp.kuaishou.com \
--cookie accessproxysession=COOKIE> \
--year 2026
python3 genius_client.py \
--cookie accessproxysession=COOKIE> \
workflow --year 2026
- 5. 输出简洁报告,包含:
- 可访问的端点
- 必需参数/负载提示
- 依赖顺序
- 已知阻塞/限制
支持的能力
- 1. 核心API提取
- 识别 management-yearly/actual 使用的实际业务端点。
- 2. API地图生成
- 构建端点目录:方法、路径、用途、必需参数/请求体。
- 3. 工作流重建
- 从页面加载到账本明细获取,重建请求顺序。
- 4. 脚本化探测
- 使用 scripts/genius
apiprobe.sh 快速验证端点可达性和基线响应。
- 5. 故障排查聚焦
- 区分业务API故障与:
- SSO/会话过期
- 指纹/风险控制
- 遥测噪声
API地图(核心业务)
基础域名:
- - https://genius.corp.kuaishou.com
Actual流程中观察到的核心端点:
- - GET /budget-portal/api/authority/user
- 用途:获取用户认证上下文。
- - GET /budget-portal/api/authority/org/tree
- 用途:用于选择器/权限范围的组织树。
- - GET /budget-portal/api/horse-race-lamp/query?tabCode=management-yearly%2Factual
- 用途:标签级通知/元数据。
- - GET /budget-portal/api/description/act-latest-update-date
- 用途:最新Actual更新元数据。
- - GET /budget-portal/api/annual-actual/versions?year=
- 用途:选定年份的可用版本。
- - POST /budget-portal/api/actual-ledger/detail
- 用途:账本明细数据集。
- 注意:需要由当前筛选条件构成的JSON请求体。
- - POST /budget-portal/api/actual-ledger/products
- 用途:当前视图的产品/指标维度数据。
- 注意:需要由当前筛选条件构成的JSON请求体。
非核心但常见(通常忽略,除非诊断时):
- - log-sdk.ksapisrv.com/ 遥测
- mobile-device-info.corp.kuaishou.com/ 设备/风险
- h5-fingerprint.corp.kuaishou.com/* 指纹
工作流
1) 会话检查
- - 确认未被重定向到SSO登录页面。
- 验证 accessproxy_session 对 genius.corp.kuaishou.com 有效。
2) 捕获
- https://genius.corp.kuaishou.com/management-yearly/actual
3) 筛选业务API
- - 仅保留 /budget-portal/api/ 请求。
- 按以下顺序分组:认证 → 元数据 → 版本 → 账本POST请求。
4) 重建最小调用链
- - 从GET请求链开始(认证/组织/版本)。
- 然后使用真实负载重现POST账本调用。
5) 通过脚本验证
- - 使用cookie和年份运行 geniusapiprobe.sh。
- 记录HTTP状态码和简要响应体片段。
6) 报告
始终输出:
- - API列表(方法/路径/用途)
- 调用顺序
- 必需参数/请求体字段(已知/未知)
- 当前阻塞项和下一步操作
脚本使用
脚本路径:
- - scripts/geniusapiprobe.sh
- scripts/genius_client.py
功能说明:
- - geniusapiprobe.sh:探测关键GET API并发送占位POST请求以快速分类
- genius_client.py:核心API的结构化客户端(单个端点或完整工作流),支持自定义JSON负载文件
必需输入:
- - --base-url(默认 https://genius.corp.kuaishou.com)
- --cookie(必须包含有效的 accessproxy_session=...)
可选:
已知限制
- 1. SSO/会话耦合
- 没有有效的会话cookie,请求将回退到SSO,API探测无效。
- 2. 风险/指纹控制
- 某些环境可能需要设备/指纹侧请求;在浏览器外重放可能失败。
- 3. POST请求体不完整
- actual-ledger/detail 和 actual-ledger/products 需要从实时捕获中获取准确的业务负载字段。
- 4. 环境漂移
- 静态包版本和后端模式可能变化;当结果不一致时始终重新捕获。
- 5. 权限范围
- 组织树和账本可见性取决于账户权限;不同用户间数据差异是预期的。