查询流向会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/paths/sessions?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"start": "app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"direction": "after",
"depth": 3,
"level": 1,
"to": "app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/paths/sessions?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"start": "app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"direction": "after",
"depth": 3,
"level": 1,
"to": "app_3fK9mQ2xLp7VbN4cR8dW1y:/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',
start: 'app_3fK9mQ2xLp7VbN4cR8dW1y:/cart',
direction: 'after',
depth: 3,
level: 1,
to: 'app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout'
})
};
fetch('https://api.flashcat.cloud/rum/journey/paths/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/paths/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',
'start' => 'app_3fK9mQ2xLp7VbN4cR8dW1y:/cart',
'direction' => 'after',
'depth' => 3,
'level' => 1,
'to' => 'app_3fK9mQ2xLp7VbN4cR8dW1y:/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/paths/sessions?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/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/paths/sessions?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/paths/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 \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"items": [
{
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30",
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"time": 1780280430555,
"device_type": "Desktop",
"has_replay": true,
"error_count": 1,
"path": [
"app_3fK9mQ2xLp7VbN4cR8dW1y:/home",
"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout"
],
"start_index": 1,
"more_before": false,
"more_after": false,
"user": "Alice Chen",
"usr_id": "u_1024",
"duration_ms": 1800000,
"view_count": 7,
"browser": "Chrome",
"os": "macOS",
"version": "4.12.0"
}
]
},
"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
/
paths
/
sessions
查询流向会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/rum/journey/paths/sessions?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"start": "app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"direction": "after",
"depth": 3,
"level": 1,
"to": "app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout"
}
'import requests
url = "https://api.flashcat.cloud/rum/journey/paths/sessions?app_key="
payload = {
"start_time": 1780272000000,
"end_time": 1780358400000,
"usr_id": "u_1024",
"start": "app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"direction": "after",
"depth": 3,
"level": 1,
"to": "app_3fK9mQ2xLp7VbN4cR8dW1y:/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',
start: 'app_3fK9mQ2xLp7VbN4cR8dW1y:/cart',
direction: 'after',
depth: 3,
level: 1,
to: 'app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout'
})
};
fetch('https://api.flashcat.cloud/rum/journey/paths/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/paths/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',
'start' => 'app_3fK9mQ2xLp7VbN4cR8dW1y:/cart',
'direction' => 'after',
'depth' => 3,
'level' => 1,
'to' => 'app_3fK9mQ2xLp7VbN4cR8dW1y:/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/paths/sessions?app_key="
payload := strings.NewReader("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/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/paths/sessions?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"start_time\": 1780272000000,\n \"end_time\": 1780358400000,\n \"usr_id\": \"u_1024\",\n \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/journey/paths/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 \"start\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart\",\n \"direction\": \"after\",\n \"depth\": 3,\n \"level\": 1,\n \"to\": \"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"items": [
{
"session_id": "3a1f8c2e-5b7d-4e9a-9c1f-2d6b8e4a7f30",
"application_id": "app_3fK9mQ2xLp7VbN4cR8dW1y",
"time": 1780280430555,
"device_type": "Desktop",
"has_replay": true,
"error_count": 1,
"path": [
"app_3fK9mQ2xLp7VbN4cR8dW1y:/home",
"app_3fK9mQ2xLp7VbN4cR8dW1y:/cart",
"app_3fK9mQ2xLp7VbN4cR8dW1y:/checkout"
],
"start_index": 1,
"more_before": false,
"more_after": false,
"user": "Alice Chen",
"usr_id": "u_1024",
"duration_ms": 1800000,
"view_count": 7,
"browser": "Chrome",
"os": "macOS",
"version": "4.12.0"
}
]
},
"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 即可调用 |
使用说明
- 窗口、
usr_id、start、direction与depth都要与POST /rum/journey/paths传入的一致:level、from、to用于指定该流向中的某个节点或连线。 level为 0 表示起始页本身,列出所有到达它的使用过程;大于 0 时to必填,from用于选定一条连线(省略则描述整个节点,不区分来源)。- 第 1 跳以上,连线不能来自「已离开」标记:已经离开的使用过程没有后续跳。
path是使用过程首次到达起始页前后的页面序列(跨该过程的所有会话);path[start_index]即起始页,more_before/more_after表示该过程在序列之外还有页面。- 最多返回 20 个会话,最近的在前;使用过程跨应用,因此会带
application_id。
授权
请求体
application/json
列出某个用户页面流向中某个节点或连线对应的会话。
此页面对您有帮助吗?