查看自己的 License 状态
curl --request POST \
--url 'https://api.flashcat.cloud/oncall/license/request/info?app_key='import requests
url = "https://api.flashcat.cloud/oncall/license/request/info?app_key="
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.flashcat.cloud/oncall/license/request/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/oncall/license/request/info?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/oncall/license/request/info?app_key="
req, _ := http.NewRequest("POST", url, nil)
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/oncall/license/request/info?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/oncall/license/request/info?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N",
"data": {
"holding": false,
"can_request": true,
"reason": "quota reached",
"window_start": 1793232000,
"window_end": 1795824000,
"request": null,
"admins": [
{
"person_id": 80001,
"person_name": "Wang Lei"
}
]
}
}{
"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."
}
}许可管理
查看自己的 License 状态
查看调用者本人的 On-call License 状态与申请,以及可以向谁申请名额。
POST
/
oncall
/
license
/
request
/
info
查看自己的 License 状态
curl --request POST \
--url 'https://api.flashcat.cloud/oncall/license/request/info?app_key='import requests
url = "https://api.flashcat.cloud/oncall/license/request/info?app_key="
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.flashcat.cloud/oncall/license/request/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/oncall/license/request/info?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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/oncall/license/request/info?app_key="
req, _ := http.NewRequest("POST", url, nil)
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/oncall/license/request/info?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/oncall/license/request/info?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"request_id": "01J0D5Y31GY2TWAHRP3Q8K4M6N",
"data": {
"holding": false,
"can_request": true,
"reason": "quota reached",
"window_start": 1793232000,
"window_end": 1795824000,
"request": null,
"admins": [
{
"person_id": 80001,
"person_name": "Wang Lei"
}
]
}
}{
"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 都可以调用此接口 |
使用说明
- 读取状态不会占用名额:这是只读接口。
holding表示调用者本窗口是否持有名额。reason说明没有名额的原因,holding为 true 时为空。can_request为 true 需要同时满足:所有者或管理员能够解决调用者的情况;调用者本人不是所有者或管理员(他们直接分配名额而不是申请);且本窗口还没有他的申请——每人每窗口只能有一条申请,无论状态如何。request是调用者本窗口的申请,未申请时为null。admins列出可以求助的所有者与管理员。账号没有 On-call 名额资源时window_start与window_end为0。
授权
此页面对您有帮助吗?