查看状态页草稿
curl --request GET \
--url 'https://api.flashcat.cloud/status-page/draft/info?app_key='import requests
url = "https://api.flashcat.cloud/status-page/draft/info?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/status-page/draft/info?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/status-page/draft/info?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/status-page/draft/info?app_key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flashcat.cloud/status-page/draft/info?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/status-page/draft/info?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5",
"status": "pending",
"page_id": 5750613685214,
"change_id": 0,
"type": "incident",
"draft": {
"v": 1,
"page_id": 5750613685214,
"type": "incident",
"name": "Web Console Degraded Performance",
"message": "We are investigating degraded performance affecting the web console.",
"affected_components": [
{
"component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
"status": "degraded"
}
]
},
"source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1",
"created_by": 2476444212131,
"created_at": 1788000000,
"consumed_at": 0,
"consumed_change_id": 0,
"consumed_by": 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."
}
}状态页
查看状态页草稿
查看一个状态页草稿及其是否已发布。
GET
/
status-page
/
draft
/
info
查看状态页草稿
curl --request GET \
--url 'https://api.flashcat.cloud/status-page/draft/info?app_key='import requests
url = "https://api.flashcat.cloud/status-page/draft/info?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/status-page/draft/info?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/status-page/draft/info?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/status-page/draft/info?app_key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flashcat.cloud/status-page/draft/info?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/status-page/draft/info?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"draft_id": "draft_3xK9mQ2vN7pR4wT8yH1sJ5",
"status": "pending",
"page_id": 5750613685214,
"change_id": 0,
"type": "incident",
"draft": {
"v": 1,
"page_id": 5750613685214,
"type": "incident",
"name": "Web Console Degraded Performance",
"message": "We are investigating degraded performance affecting the web console.",
"affected_components": [
{
"component_id": "01KC3GAZ6ZJE40H55GM31RPWZE",
"status": "degraded"
}
]
},
"source": "ai_sre:sess_01KC3H2A9ZQ8W7E6R5T4Y3U2I1",
"created_by": 2476444212131,
"created_at": 1788000000,
"consumed_at": 0,
"consumed_change_id": 0,
"consumed_by": 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."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 1,000 次/分钟;50 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
- 用于读回
POST /status-page/draft/create存下的草稿,例如确认是否已有人发布。 - 草稿通过
POST /status-page/change/create或POST /status-page/change/timeline/create发布前status为pending,发布后为published;pending时consumed_at、consumed_change_id、consumed_by均为 0。 draft_id不存在、属于其他账户,或草稿已删除(创建 30 天后)时返回ResourceNotFound。
授权
此页面对您有帮助吗?