Files
MemRelay/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/平台工参导出接口.md
T
memrelay 130179dd04 update: 平台工参导出接口
MemRelay-Operation: memory-save:nqi-agent-gongcan-20261111-1
MemRelay-Resource: 84d426a9-a184-4d1c-b84c-6dba63f37777
2026-11-11 00:29:40 +08:00

54 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 平台工参导出接口
type: fact
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/平台工参导出接口
stable_id: 84d426a9-a184-4d1c-b84c-6dba63f37777
scope: project
memory_type: fact
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
status: active
revision: 7
request_id: nqi-agent-gongcan-20261111-1
created_at: '2026-11-10T13:40:51.351339+00:00'
updated_at: '2026-11-10T16:29:37.396918+00:00'
tags:
- NQI
- 工参
- 经纬度
- OpenCode
---
## 来源
nqi-opencode.chlz 是 OpenCode 页面抓包,没有 pro-assistant-server 的实际请求。导出说明在会话 ses_e3a7adae3ffe4QxrqaKUPgGATq,对应脚本 download-file-all-async.py。nqi-agent.chlz 是 2026-11-11 00:03 到 00:16 的 OpenCode 会话,里面已经有导出后的工参文件正文。
## 下载请求
- POST https://nqi.gmcc.net:20443/pro-assistant-server/smart/file/download
- 只有请求头 Content-Type: application/json,不发 Cookie。
- 查询参数 tickets 来自 OpenCode 运行环境的 OPENCODE_TOOL_TICKET。
- 请求体是 {"sql": "..."},响应是流式 CSV。另有查询接口 pro-assistant-server/smart/execSql,同样读这个环境变量。
- 2026-11-10 用账号池里 dwmoyingda 的 CASTGC 从线上服务器和本机请求,该路径均被 nginx 返回 403;同一会话访问即席查询正常。
## 这次抓包里的工参
- GET /pro-opencode/dwmoyingda/file/content?path=data/2026-11-09/4G小区工参.csv,正文 40334 行、74 列。city 全部是江门。longitude 有数值 40260、空 74,没有星号脱敏。latitude 同样。curr_flag true 35747、false 4587。
- 5G 文件 data/2026-11-09/5G小区工参.csv,23821 行、69 列。city 为江门的 23723 行。longitude 数值 23732,另有 68 个因 CSV 错列变成文字或 UUID,空 21。latitude 数值 23720。curr_flag true 12540、false 11263。有 36 行列数不足。
- 这是 2026-11-09 的一次导出快照,不是持续更新的接口。当前清单要筛 curr_flag=true。即席查询结果表里的经纬度仍然是脱敏值。
## 发送指令
nqi-agent.chlz 里发给 AI 的请求是 POST /pro-opencode/dwmoyingda/session/<会话>/prompt_async,返回 204。2026-11-11 00:04:55 的正文是导出江门 4G/5G 工参,00:14:00 的正文是清理下载数据。正文只有 messageID、agent、model、parts[].text,没有票据。
## 轮询
nqi-agent.chlz 从 00:04:09 到 00:15:59,GET /pro-opencode/dwmoyingda/global/health 73 次,间隔中位数 10 秒。每次都带与 CASTGC 相同的 tickets,以及 oc_castgc、opencode_route、oc_locale、metabase.DEVICE。
同一时段 GET /file 104 次,密集时间隔中位数 2 秒,中间有三次较长停顿。凭据与健康检查相同。
## 凭据
- OPENCODE_TOOL_TICKET 就是当前登录的 CASTGC。provision 的 token、跳转地址上的 tickets、prompt_async 的 tickets 与 Cookie CASTGC 完全相同。
- 登录抓包里 CASTGC、TGC 的 Set-Cookie 只有 Path,没有 Expires 和 Max-Age。
## 过期
导出和发送指令使用的票据都是门户登录的 CASTGC。账号登出或这张 TGT 在服务器上失效后,tickets 一起失效。
## 表
- 4G:appdbv3.a_common_cfg_lte_cellant_d。
- 5G:appdbv3.a_common_cfg_nr_cellant_d。
- 当前记录用 curr_flag = true,地市用 city = '江门'。