查询会话关键事件
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/events?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/events?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
start_time: 1780272000000,
end_time: 1780358400000,
application_id: 'app_3fK9mQ2xLp7VbN4cR8dW1y',
session_id: '3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30'
})
};
fetch('https://api.flashcat.cloud/rum/journey/events?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/rum/journey/events?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start_time' => 1780272000000,
'end_time' => 1780358400000,
'application_id' => 'app_3fK9mQ2xLp7VbN4cR8dW1y',
'session_id' => '3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/rum/journey/events?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/rum/journey/events?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/events?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"events": [
{
"time": 1780280412000,
"kind": "view",
"text": "/cart",
"duration_ms": 842,
"status": null,
"page": null
},
{
"time": 1780280430555,
"kind": "click",
"text": "Checkout",
"page": "/cart",
"duration_ms": null,
"status": null
},
{
"time": 1780280431200,
"kind": "failed_request",
"text": "POST /api/orders",
"status": 502,
"duration_ms": null,
"page": null
},
{
"time": 1780280441900,
"kind": "error",
"text": "TypeError: Cannot read properties of undefined (reading 'id')",
"duration_ms": null,
"status": null,
"page": null
}
],
"truncated": false
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "AccessDenied",
"message": "Access Denied."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}用户查询
查询会话关键事件
按时间顺序列出单个会话的页面、点击、失败请求、错误与崩溃。
POST
/
rum
/
journey
/
events
查询会话关键事件
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/events?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/events?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
start_time: 1780272000000,
end_time: 1780358400000,
application_id: 'app_3fK9mQ2xLp7VbN4cR8dW1y',
session_id: '3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30'
})
};
fetch('https://api.flashcat.cloud/rum/journey/events?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/rum/journey/events?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start_time' => 1780272000000,
'end_time' => 1780358400000,
'application_id' => 'app_3fK9mQ2xLp7VbN4cR8dW1y',
'session_id' => '3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/rum/journey/events?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/rum/journey/events?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/events?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"application_id\": \"app_3fK9mQ2xLp7VbN4cR8dW1y\",\n \"session_id\": \"3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"events": [
{
"time": 1780280412000,
"kind": "view",
"text": "/cart",
"duration_ms": 842,
"status": null,
"page": null
},
{
"time": 1780280430555,
"kind": "click",
"text": "Checkout",
"page": "/cart",
"duration_ms": null,
"status": null
},
{
"time": 1780280431200,
"kind": "failed_request",
"text": "POST /api/orders",
"status": 502,
"duration_ms": null,
"page": null
},
{
"time": 1780280441900,
"kind": "error",
"text": "TypeError: Cannot read properties of undefined (reading 'id')",
"duration_ms": null,
"status": null,
"page": null
}
],
"truncated": false
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "AccessDenied",
"message": "Access Denied."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 200 次/分钟;10 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
start_time与end_time为 Unix 毫秒时间戳,均必填;窗口不得超过 14 天,且会话必须在该窗口内开始,否则返回ResourceNotFound。- 会话 ID 仅在其应用内唯一,因此
application_id必填;调用方需对其有读权限,否则返回AccessDenied。 kind取view、click、failed_request、error或crash。- 页面的
duration_ms是该会话所在平台的加载耗时——Web 取最大内容绘制、小程序取首次渲染、原生应用取冷启动——未知时为 null。 - 失败请求指页面自身站点返回 5xx 或完全无响应;
text为方法与路径,status为 0 表示无响应。 - 错误的
text是其消息,超过 200 个字符会被截断。 - 最多返回 200 个页面、200 次点击和 200 个其他事件;任意一类被截断时
truncated为 true。
授权
请求体
application/json
列出某个会话在时间窗口内的关键事件。
此页面对您有帮助吗?