获取数据源插件列表
curl --request GET \
--url https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins', 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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"node_id": "1719288585006",
"plugin_id": "langgenius/notion_datasource",
"provider_name": "notion",
"datasource_type": "online_document",
"title": "Notion Documents",
"user_input_variables": [],
"credentials": [
{
"id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"name": "Production Notion",
"type": "api-key",
"is_default": true
}
]
}
]{
"status": 400,
"code": "invalid_param",
"message": "Pipeline not found"
}{
"status": 403,
"code": "forbidden",
"message": "Dataset api access is not enabled."
}{
"status": 404,
"code": "not_found",
"message": "Dataset not found."
}知识流水线
获取数据源插件列表
返回知识流水线中已配置的数据源节点,每个节点包含其使用的插件,以及运行该节点所需的元数据。
GET
/
datasets
/
{dataset_id}
/
pipeline
/
datasource-plugins
获取数据源插件列表
curl --request GET \
--url https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins', 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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/datasets/{dataset_id}/pipeline/datasource-plugins")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"node_id": "1719288585006",
"plugin_id": "langgenius/notion_datasource",
"provider_name": "notion",
"datasource_type": "online_document",
"title": "Notion Documents",
"user_input_variables": [],
"credentials": [
{
"id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"name": "Production Notion",
"type": "api-key",
"is_default": true
}
]
}
]{
"status": 400,
"code": "invalid_param",
"message": "Pipeline not found"
}{
"status": 403,
"code": "forbidden",
"message": "Dataset api access is not enabled."
}{
"status": 404,
"code": "not_found",
"message": "Dataset not found."
}授权
查询参数
是否读取已发布流水线版本的节点,而非草稿版本。
响应
流水线中已配置的数据源节点列表。
提供该节点的数据源插件的 ID。
数据源插件注册的提供商名称。
数据源类型。取值为 local_file、online_document、online_drive、website_crawl 之一。
为该节点配置的显示标题。
调用方需要为该数据源提供的流水线输入变量,来自节点数据源参数中 {{#...#}} 引用的变量。每一项遵循工作流使用的流水线变量结构。
可用于对该数据源进行认证的凭证列表。
Show child attributes
Show child attributes
⌘I