List Sources
Lists the sources of a knowledge base in ascending source ID order, with each source’s sync schedule, its last completed sync or import, and its current run, or its latest sync when none is running.
A source leaves this listing as soon as its deletion is accepted.
For how to start and follow a sync, see Sync and Schedule Sources.
curl --request GET \
--url https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources"
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}/knowledge-fs/spaces/{knowledge_base_id}/sources', 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}/knowledge-fs/spaces/{knowledge_base_id}/sources",
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}/knowledge-fs/spaces/{knowledge_base_id}/sources"
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}/knowledge-fs/spaces/{knowledge_base_id}/sources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources")
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{
"data": [
{
"connection_id": "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
"created_at": "2026-09-01T08:00:00Z",
"credential_configured": null,
"id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"last_synced_at": "2026-09-05T10:12:00Z",
"metadata": {
"client_request_id": "source-20260907-0001",
"providerKind": "website",
"tenantId": "2f1e0d9c-8b7a-4695-8473-2a1b0c9d8e7f"
},
"name": "Docs site",
"permission_scope": [],
"status": "active",
"sync_policy": {
"created_at": "2026-09-01T08:05:00Z",
"custom_interval_seconds": null,
"enabled": true,
"expected_source_version": 7,
"id": "8e7d6c5b-4a39-4f28-9e17-0d1c2b3a4f5e",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"mode": "interval",
"next_run_at": "2026-09-06T10:00:00Z",
"revision": 2,
"source_id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"updated_at": "2026-09-05T10:00:00Z"
},
"sync_workflow": {
"canceled_at": null,
"checkpoint": "source-committed",
"completed_at": "2026-09-05T10:12:00Z",
"created_at": "2026-09-05T10:00:00Z",
"cursor": "ss1:eyJmaW5nZXJwcmludCI6IjgxZDk5OWY4YjI4ZDZhMGFlMTVmNjQxYzE2NjE3ZWNlMTBjYTcxMzE3OWU1MmVhMTYwODYyMzExMDcyYmQ4YmUiLCJraW5kIjoid2Vic2l0ZSIsIm9mZnNldCI6MCwicGhhc2UiOiJlb2YiLCJwcm9ncmVzc0NvbXBsZXRlZCI6NDUsInByb2dyZXNzVG90YWwiOjQ1fQ",
"execution_attempts": 1,
"failure": null,
"id": "d4c3b2a1-6f5e-4d7c-8b9a-0f1e2d3c4b5a",
"kind": "sync",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"last_error_code": null,
"max_execution_attempts": 5,
"progress_completed": 45,
"progress_failed": 0,
"progress_skipped": 0,
"progress_total": 45,
"source_id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"state": "completed",
"updated_at": "2026-09-05T10:12:00Z"
},
"type": "web",
"updated_at": "2026-09-03T09:20:00Z",
"uri": "https://docs.example.com",
"version": 7
}
],
"next_cursor": null
}Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Path Parameters
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.
Query Parameters
Cursor from the previous page's next_cursor.
1 - 1000Sources per page.
1 <= x <= 100Was this page helpful?
curl --request GET \
--url https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources"
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}/knowledge-fs/spaces/{knowledge_base_id}/sources', 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}/knowledge-fs/spaces/{knowledge_base_id}/sources",
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}/knowledge-fs/spaces/{knowledge_base_id}/sources"
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}/knowledge-fs/spaces/{knowledge_base_id}/sources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/sources")
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{
"data": [
{
"connection_id": "c3d4e5f6-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
"created_at": "2026-09-01T08:00:00Z",
"credential_configured": null,
"id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"last_synced_at": "2026-09-05T10:12:00Z",
"metadata": {
"client_request_id": "source-20260907-0001",
"providerKind": "website",
"tenantId": "2f1e0d9c-8b7a-4695-8473-2a1b0c9d8e7f"
},
"name": "Docs site",
"permission_scope": [],
"status": "active",
"sync_policy": {
"created_at": "2026-09-01T08:05:00Z",
"custom_interval_seconds": null,
"enabled": true,
"expected_source_version": 7,
"id": "8e7d6c5b-4a39-4f28-9e17-0d1c2b3a4f5e",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"mode": "interval",
"next_run_at": "2026-09-06T10:00:00Z",
"revision": 2,
"source_id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"updated_at": "2026-09-05T10:00:00Z"
},
"sync_workflow": {
"canceled_at": null,
"checkpoint": "source-committed",
"completed_at": "2026-09-05T10:12:00Z",
"created_at": "2026-09-05T10:00:00Z",
"cursor": "ss1:eyJmaW5nZXJwcmludCI6IjgxZDk5OWY4YjI4ZDZhMGFlMTVmNjQxYzE2NjE3ZWNlMTBjYTcxMzE3OWU1MmVhMTYwODYyMzExMDcyYmQ4YmUiLCJraW5kIjoid2Vic2l0ZSIsIm9mZnNldCI6MCwicGhhc2UiOiJlb2YiLCJwcm9ncmVzc0NvbXBsZXRlZCI6NDUsInByb2dyZXNzVG90YWwiOjQ1fQ",
"execution_attempts": 1,
"failure": null,
"id": "d4c3b2a1-6f5e-4d7c-8b9a-0f1e2d3c4b5a",
"kind": "sync",
"knowledge_space_id": "0a9d3c2e-5b6f-4e1a-8c7d-2f3e4a5b6c7d",
"last_error_code": null,
"max_execution_attempts": 5,
"progress_completed": 45,
"progress_failed": 0,
"progress_skipped": 0,
"progress_total": 45,
"source_id": "6f1c2b0e-3d0b-4a5e-9f4c-1c0e6a7b8d90",
"state": "completed",
"updated_at": "2026-09-05T10:12:00Z"
},
"type": "web",
"updated_at": "2026-09-03T09:20:00Z",
"uri": "https://docs.example.com",
"version": 7
}
],
"next_cursor": null
}