下载或预览文件
curl --request GET \
--url 'https://api.flashcat.cloud/safari/artifact/stream?app_key='import requests
url = "https://api.flashcat.cloud/safari/artifact/stream?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/safari/artifact/stream?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/safari/artifact/stream?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/safari/artifact/stream?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/safari/artifact/stream?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/artifact/stream?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"<string>"{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"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
/
safari
/
artifact
/
stream
下载或预览文件
curl --request GET \
--url 'https://api.flashcat.cloud/safari/artifact/stream?app_key='import requests
url = "https://api.flashcat.cloud/safari/artifact/stream?app_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.flashcat.cloud/safari/artifact/stream?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/safari/artifact/stream?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/safari/artifact/stream?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/safari/artifact/stream?app_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/artifact/stream?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"<string>"{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"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."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个 app_key 100 次/分钟;10 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
- 成功响应有两种形式:302 重定向到短期有效的对象存储预签名 URL(存储在 S3 兼容存储中的文件),或 200 二进制流(托管在自托管 runner 上的文件)。请跟随重定向。
- 响应携带
Cache-Control: private, no-store—— 网关不会缓存。
授权
App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.
查询参数
由 POST /safari/artifact/sign 签发的令牌。与调用账号及成员绑定,有效期 5 分钟。
download(默认)以附件形式返回文件;preview 以 inline 方式返回供浏览器预览。其他取值按 download 处理。
可用选项:
download, preview 响应
文件内容流。当文件托管在自托管 runner 上时由服务端代理返回,Content-Disposition 随 mode 变化。
The response is of type file.
此页面对您有帮助吗?