curl --request GET \
--url https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents', 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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents",
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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents"
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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents")
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": [
{
"created_at": "<string>",
"format": "<string>",
"id": "<string>",
"knowledge_base_id": "<string>",
"searchable": true,
"source": "<string>",
"status": "queued",
"title": "<string>",
"updated_at": "<string>",
"account_id": "<string>",
"error": "<string>",
"external_id": "<string>",
"source_url": "<string>",
"url": "<string>"
}
],
"has_more": false,
"next_cursor": "<string>"
}List a knowledge base's documents
Pages through a knowledge base’s documents, most recently changed first. Filter with filter[<key>][<op>]=<value> (conditions are ANDed; in repeats the parameter): status (queued, indexing, ready, failed; eq or in), account (account ids; eq or in), external_id (eq or in), created_at and updated_at (a date, YYYY-MM-DD, UTC days; eq, gt, gte, lt or lte: updated_at gte the day of your last sync lists what changed since). Anything else is a 422. A document is indexed in the background after it arrives or changes: status is queued, indexing, ready or failed (error says why), and searchable whether a search finds it (a document being indexed again keeps answering from its previous version). url is the link a worker gives a customer when it answers from it. A document with an account_id is left out when a worker answers another account; a search for no account in particular (a worker going over its whole book, or knowledge_bases.search without account) includes it.
curl --request GET \
--url https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents', 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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents",
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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents"
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.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/knowledge_bases/{knowledge_base_id}/documents")
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": [
{
"created_at": "<string>",
"format": "<string>",
"id": "<string>",
"knowledge_base_id": "<string>",
"searchable": true,
"source": "<string>",
"status": "queued",
"title": "<string>",
"updated_at": "<string>",
"account_id": "<string>",
"error": "<string>",
"external_id": "<string>",
"source_url": "<string>",
"url": "<string>"
}
],
"has_more": false,
"next_cursor": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Query Parameters
Was this page helpful?