跳转到主要内容
POST
/
rum
/
session-replay
/
segments
获取回放片段
curl --request POST \
  --url 'https://api.flashcat.cloud/rum/session-replay/segments?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_id": "<string>",
  "search_after_ctx": "<string>",
  "view_id": "<string>",
  "limit": 20,
  "ts": 123,
  "url_mode": true
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "data": {
    "items": [
      {
        "start": 123,
        "end": 123,
        "creation_reason": "init",
        "records_count": 123,
        "source": "browser",
        "application": {
          "id": "<string>"
        },
        "session": {
          "id": "<string>"
        },
        "view": {
          "id": "<string>"
        },
        "records": [
          {}
        ],
        "has_full_snapshot": true,
        "index_in_view": 123
      }
    ]
  },
  "search_after_ctx": "<string>"
}

授权

app_key
string
query
必填

请求头

Content-Type
string

请求体

application/json
session_id
string
必填

会话ID

search_after_ctx
string

起始查询游标

view_id
string

视图ID,如果指定则仅获取该视图下的回放片段

limit
integer
默认值:20

每页返回数量

必填范围: 1 <= x <= 100
ts
integer

起始查询时间(毫秒),当search_after_ctx为空时生效。用于按时间点进行跳跃播放。如果传入,系统将返回早于此时间点的全量快照记录之后的记录。

url_mode
boolean

是否启用URL模式,如果是,将返回segment下载地址,需要通过下载地址获取数据并解压。否则将返回json line格式的原始数据

响应

200 - application/json
error
object

错误

data
object

数据

search_after_ctx
string

如果存在额外数据,返回此游标