列出用户数据文件
curl --request GET \
--url https://cloud.comfy.org/api/userdata \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/userdata"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://cloud.comfy.org/api/userdata', 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://cloud.comfy.org/api/userdata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://cloud.comfy.org/api/userdata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.comfy.org/api/userdata")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/userdata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"path": "<string>",
"size": 123,
"modified": 123
}
]"<string>""<string>""<string>""<string>"user
列出用户数据文件
返回指定目录中的用户数据文件列表,可选递归并包含完整元数据。
GET
/
api
/
userdata
列出用户数据文件
curl --request GET \
--url https://cloud.comfy.org/api/userdata \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/userdata"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://cloud.comfy.org/api/userdata', 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://cloud.comfy.org/api/userdata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://cloud.comfy.org/api/userdata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cloud.comfy.org/api/userdata")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/userdata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"path": "<string>",
"size": 123,
"modified": 123
}
]"<string>""<string>""<string>""<string>"授权
API密钥认证。从您的用户设置中生成API密钥 位于https://platform.comfy.org/profile/api-keys。在X-API-Key头中传递密钥。
查询参数
要列出文件的目录路径。必须包含尾部斜杠。 示例:"workflows/"或"settings/"
如果为是,则包含子目录中的文件。否则仅列出指定目录中的文件。
是否按类型拆分文件信息。 注意: 为了兼容 ComfyUI API 而接受,但目前被忽略。
是否返回完整文件元数据。 注意: 为了兼容 ComfyUI API 而接受,但目前被忽略(始终返回完整信息)。
⌘I