工作流
列出工作流
列出經身份驗證用戶的所有工作流。
GET
/
api
/
v1
/
workflows
列出工作流
curl --request GET \
--url https://api.example.com/api/v1/workflowsimport requests
url = "https://api.example.com/api/v1/workflows"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/workflows', 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.example.com/api/v1/workflows",
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.example.com/api/v1/workflows"
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.example.com/api/v1/workflows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/workflows")
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{
"workflows": [
{}
]
}返回經身份驗證用戶擁有的所有工作流,按創建時間排序。
身份驗證
需要提供 Bearer 令牌。參見身份驗證。請求示例
curl https://www.hitheo.ai/api/v1/workflows \
-H "Authorization: Bearer $THEO_API_KEY"
const workflows = await theo.workflows();
響應
object[]
工作流對象數組,每個對象包含
id、name、triggerType、triggerConfig、steps、enabled、createdAt 和 updatedAt。端點
GET /api/v1/workflows
需要通過 Bearer 令牌進行身份驗證。參見身份驗證。這個頁面有幫助嗎?
列出工作流
curl --request GET \
--url https://api.example.com/api/v1/workflowsimport requests
url = "https://api.example.com/api/v1/workflows"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/workflows', 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.example.com/api/v1/workflows",
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.example.com/api/v1/workflows"
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.example.com/api/v1/workflows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/workflows")
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{
"workflows": [
{}
]
}