Search the data source view
curl --request GET \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search",
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search"
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search")
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{
"documents": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"parents": [
"<string>"
],
"timestamp": 123,
"data": {},
"score": 123
}
]
}DatasourceViews
Search the data source view
Search the data source view identified by in the workspace identified by .
GET
/
api
/
v1
/
w
/
{wId}
/
spaces
/
{spaceId}
/
data_source_views
/
{dsvId}
/
search
Search the data source view
curl --request GET \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search",
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search"
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}/search")
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{
"documents": [
{
"id": "<string>",
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"parents": [
"<string>"
],
"timestamp": 123,
"data": {},
"score": 123
}
]
}Authorizations
Your DUST API key is a Bearer token.
Path Parameters
ID of the workspace
ID of the space
ID of the data source view
Query Parameters
The search query
The number of results to return
Whether to return the full document content
The number of tokens in the target document
The timestamp to filter by
The timestamp to filter by
The tags to filter by
The tags to filter by
The parents to filter by
The parents to filter by
Response
The documents
Show child attributes
Show child attributes