查询用户会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/sessions?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"page": "/checkout"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/sessions?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"page": "/checkout"
}
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,
usr_id: 'u_1024',
page: '/checkout'
})
};
fetch('https://api.flashcat.cloud/rum/journey/sessions?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/sessions?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,
'usr_id' => 'u_1024',
'page' => '/checkout'
]),
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/sessions?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\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/sessions?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/sessions?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 \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user": {
"usr_id": "u_1024",
"usr_name": "Alice Chen",
"usr_email": "alice@example.com"
},
"sessions": [
{
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30",
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"start": 1780280400000,
"end": 1780282200000,
"live": false,
"device_type": "Desktop",
"os": "macOS",
"browser": "Chrome",
"version": "4.12.0",
"views": [
"/home",
"/cart",
"/checkout"
],
"view_count": 7,
"has_replay": true,
"errors": 1,
"crashes": 0,
"failed_requests": 2,
"requests_expired": false,
"slowest_load_ms": 842
}
],
"apps": [
{
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"sessions": 1
}
],
"truncated": false,
"matched": [
{
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
]
},
"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"
}用户查询
查询用户会话列表
列出某个用户在调用方可读的所有 RUM 应用中的会话,最新的在前。
POST
/
rum
/
journey
/
sessions
查询用户会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/sessions?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"page": "/checkout"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/sessions?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"page": "/checkout"
}
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,
usr_id: 'u_1024',
page: '/checkout'
})
};
fetch('https://api.flashcat.cloud/rum/journey/sessions?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/sessions?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,
'usr_id' => 'u_1024',
'page' => '/checkout'
]),
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/sessions?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\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/sessions?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/sessions?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 \"usr_id\": \"u_1024\",\n \"page\": \"/checkout\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"user": {
"usr_id": "u_1024",
"usr_name": "Alice Chen",
"usr_email": "alice@example.com"
},
"sessions": [
{
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30",
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"start": 1780280400000,
"end": 1780282200000,
"live": false,
"device_type": "Desktop",
"os": "macOS",
"browser": "Chrome",
"version": "4.12.0",
"views": [
"/home",
"/cart",
"/checkout"
],
"view_count": 7,
"has_replay": true,
"errors": 1,
"crashes": 0,
"failed_requests": 2,
"requests_expired": false,
"slowest_load_ms": 842
}
],
"apps": [
{
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"sessions": 1
}
],
"truncated": false,
"matched": [
{
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30"
}
]
},
"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 天会返回InvalidParameter。- 只有当会话最新一行记录的是该
usr_id时才计入:用户在最后一页之前已退出登录的会话不算。 - 最多列出 1000 个会话(最新的那些);窗口内超出时
truncated为 true,此时apps统计该用户在每个应用的全部会话,而非仅列出的部分。 views最多列出 6 个页面,连续重复的页面只计一次;view_count是该会话真实的页面数。- 会话开始时间超过 15 天时,其请求已不再保留,
failed_requests返回 null 且requests_expired为 true——数量是未知而非 0。 - 传入
page时,matched列出返回会话中访问过路径分组或页面名称包含该文本的会话(不区分大小写)。
授权
请求体
application/json
列出某个用户的会话,最新的在前。
此页面对您有帮助吗?