查看仪表盘版本详情
curl --request POST \
--url 'https://api.flashcat.cloud/rum/dashboard/revisions/get?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"revision": 3
}
'import requests
url = "https://api.flashcat.cloud/rum/dashboard/revisions/get?app_key="
payload = {
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"revision": 3
}
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({dashboard_id: '0192f3a4-5b6c-7d8e-9f01-234567890abc', revision: 3})
};
fetch('https://api.flashcat.cloud/rum/dashboard/revisions/get?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/dashboard/revisions/get?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([
'dashboard_id' => '0192f3a4-5b6c-7d8e-9f01-234567890abc',
'revision' => 3
]),
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/dashboard/revisions/get?app_key="
payload := strings.NewReader("{\n \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\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/dashboard/revisions/get?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/dashboard/revisions/get?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 \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actor": {
"id": 2477033058177,
"name": "Mei Lin"
},
"created_at": 1792404240000,
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"definition": {
"default_time_range": {
"from": "now-1h",
"to": "now"
},
"description": "商城的加载耗时与错误率。",
"refresh_interval": "1m",
"tabs": [
{
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abd",
"sections": [
{
"collapsed": false,
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abe",
"panels": [
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"grid": {
"h": 8,
"w": 16,
"x": 0,
"y": 4
},
"id": "0192f3a4-5b6c-7d8e-9f01-234567890ac0",
"queries": [
{
"query": {
"args": {
"agg": "p95",
"application_id": "qLpu24Dz4CAzWsESPbJYWA",
"draw_style": "bar",
"field": "view.loading_time",
"group_by": "view.url_path",
"limit": "20",
"scope": "view"
},
"expr": "page:${page}",
"min_step_seconds": 60,
"mode": "range"
},
"ref_id": "A"
}
],
"title": "Slowest pages by p95",
"viz_config": {
"column_options": {
"A": {
"display_name": "p95",
"threshold": {
"critical": 3000,
"mode": "higher_is_worse",
"warning": 1500
},
"threshold_display": "background",
"unit": "milliseconds"
},
"view.url_path": {
"display_name": "Page",
"width_px": 320
}
},
"kind": "table",
"link_columns": [
{
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890ac1",
"pass_time": true,
"variable_mappings": {
"page": {
"column": "view.url_path",
"source": "row_column"
}
}
}
],
"options": {
"dense": true
},
"sort": [
{
"direction": "desc",
"field": "A"
}
]
}
}
],
"title": "Slowest pages"
}
],
"title": "Overview",
"top_panels": [
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"grid": {
"h": 4,
"w": 8,
"x": 0,
"y": 0
},
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abf",
"queries": [
{
"legend_alias": "p95 loading time",
"query": {
"args": {
"agg": "p95",
"application_id": "qLpu24Dz4CAzWsESPbJYWA",
"field": "view.loading_time",
"scope": "view"
},
"expr": "env:${env}",
"min_step_seconds": 60,
"mode": "range"
},
"ref_id": "A"
}
],
"title": "p95 loading time",
"viz_config": {
"decimals": 0,
"kind": "stat",
"options": {
"sparkline": true
},
"reducer": "max",
"unit": "milliseconds",
"value_fields": [
"view.loading_time"
]
}
}
]
}
],
"title": "Web 性能概览",
"variables": [
{
"default": {
"kind": "all"
},
"kind": "custom",
"label": "Environment",
"name": "env",
"options": [
{
"text": "Production",
"value": "prod"
},
{
"text": "Staging",
"value": "staging"
}
],
"selection": {
"include_all": true,
"mode": "multi"
}
},
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"default": {
"kind": "values",
"values": [
"/checkout"
]
},
"kind": "query",
"label": "Page",
"name": "page",
"refresh": "on_dashboard_load",
"selection": {
"include_all": false,
"mode": "single"
},
"variable_query": {
"field": "view.url_path",
"kind": "rum_field"
}
}
]
},
"message": "Raise the p95 threshold",
"revision": 3,
"schema_version": "dashboard.v1"
},
"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": "InvalidParameter",
"message": "The specified parameter template_id is not valid."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InvalidParameter",
"message": "The specified parameter template_id is not valid."
},
"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
/
dashboard
/
revisions
/
get
查看仪表盘版本详情
curl --request POST \
--url 'https://api.flashcat.cloud/rum/dashboard/revisions/get?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"revision": 3
}
'import requests
url = "https://api.flashcat.cloud/rum/dashboard/revisions/get?app_key="
payload = {
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"revision": 3
}
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({dashboard_id: '0192f3a4-5b6c-7d8e-9f01-234567890abc', revision: 3})
};
fetch('https://api.flashcat.cloud/rum/dashboard/revisions/get?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/dashboard/revisions/get?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([
'dashboard_id' => '0192f3a4-5b6c-7d8e-9f01-234567890abc',
'revision' => 3
]),
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/dashboard/revisions/get?app_key="
payload := strings.NewReader("{\n \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\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/dashboard/revisions/get?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/rum/dashboard/revisions/get?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 \"dashboard_id\": \"0192f3a4-5b6c-7d8e-9f01-234567890abc\",\n \"revision\": 3\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actor": {
"id": 2477033058177,
"name": "Mei Lin"
},
"created_at": 1792404240000,
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890abc",
"definition": {
"default_time_range": {
"from": "now-1h",
"to": "now"
},
"description": "商城的加载耗时与错误率。",
"refresh_interval": "1m",
"tabs": [
{
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abd",
"sections": [
{
"collapsed": false,
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abe",
"panels": [
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"grid": {
"h": 8,
"w": 16,
"x": 0,
"y": 4
},
"id": "0192f3a4-5b6c-7d8e-9f01-234567890ac0",
"queries": [
{
"query": {
"args": {
"agg": "p95",
"application_id": "qLpu24Dz4CAzWsESPbJYWA",
"draw_style": "bar",
"field": "view.loading_time",
"group_by": "view.url_path",
"limit": "20",
"scope": "view"
},
"expr": "page:${page}",
"min_step_seconds": 60,
"mode": "range"
},
"ref_id": "A"
}
],
"title": "Slowest pages by p95",
"viz_config": {
"column_options": {
"A": {
"display_name": "p95",
"threshold": {
"critical": 3000,
"mode": "higher_is_worse",
"warning": 1500
},
"threshold_display": "background",
"unit": "milliseconds"
},
"view.url_path": {
"display_name": "Page",
"width_px": 320
}
},
"kind": "table",
"link_columns": [
{
"dashboard_id": "0192f3a4-5b6c-7d8e-9f01-234567890ac1",
"pass_time": true,
"variable_mappings": {
"page": {
"column": "view.url_path",
"source": "row_column"
}
}
}
],
"options": {
"dense": true
},
"sort": [
{
"direction": "desc",
"field": "A"
}
]
}
}
],
"title": "Slowest pages"
}
],
"title": "Overview",
"top_panels": [
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"grid": {
"h": 4,
"w": 8,
"x": 0,
"y": 0
},
"id": "0192f3a4-5b6c-7d8e-9f01-234567890abf",
"queries": [
{
"legend_alias": "p95 loading time",
"query": {
"args": {
"agg": "p95",
"application_id": "qLpu24Dz4CAzWsESPbJYWA",
"field": "view.loading_time",
"scope": "view"
},
"expr": "env:${env}",
"min_step_seconds": 60,
"mode": "range"
},
"ref_id": "A"
}
],
"title": "p95 loading time",
"viz_config": {
"decimals": 0,
"kind": "stat",
"options": {
"sparkline": true
},
"reducer": "max",
"unit": "milliseconds",
"value_fields": [
"view.loading_time"
]
}
}
]
}
],
"title": "Web 性能概览",
"variables": [
{
"default": {
"kind": "all"
},
"kind": "custom",
"label": "Environment",
"name": "env",
"options": [
{
"text": "Production",
"value": "prod"
},
{
"text": "Staging",
"value": "staging"
}
],
"selection": {
"include_all": true,
"mode": "multi"
}
},
{
"datasource_ref": {
"datasource_type": "rum",
"kind": "fixed"
},
"default": {
"kind": "values",
"values": [
"/checkout"
]
},
"kind": "query",
"label": "Page",
"name": "page",
"refresh": "on_dashboard_load",
"selection": {
"include_all": false,
"mode": "single"
},
"variable_query": {
"field": "view.url_path",
"kind": "rum_field"
}
}
]
},
"message": "Raise the p95 threshold",
"revision": 3,
"schema_version": "dashboard.v1"
},
"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": "InvalidParameter",
"message": "The specified parameter template_id is not valid."
},
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"error": {
"code": "InvalidParameter",
"message": "The specified parameter template_id is not valid."
},
"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"
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 1,000 次/分钟;50 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
- 读取已被清理的版本会返回 HTTP 404。
- 位于回收站的仪表盘返回 HTTP 410
DashboardDeleted。
授权
在 Flashduty 控制台 我的 → APP Key 中创建的 APP Key。可通过 query 参数 app_key 或请求头 Fd-App-Key 传入。实际可访问范围是该 APP Key 的权限范围与创建者当前角色权限的交集,请妥善保管。
请求体
application/json
此页面对您有帮助吗?