Update a data source view
curl --request PATCH \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parentsIn": [
"<string>"
]
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}"
payload = { "parentsIn": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parentsIn: ['<string>']})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'parentsIn' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}"
payload := strings.NewReader("{\n \"parentsIn\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parentsIn\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parentsIn\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 123,
"dataSource": {
"id": 12345,
"createdAt": 1625097600,
"name": "Customer Knowledge Base",
"description": "Contains all customer-related information and FAQs",
"dustAPIProjectId": "5e9d8c7b6a",
"connectorId": "1f3e5d7c9b",
"connectorProvider": "webcrawler",
"assistantDefaultSelected": true
},
"editedByUser": {
"fullName": "<string>",
"editedAt": 123
},
"id": 123,
"parentsIn": [
"<string>"
],
"sId": "<string>",
"updatedAt": 123,
"spaceId": "<string>"
}DatasourceViews
Update a data source view
PATCH
/
api
/
v1
/
w
/
{wId}
/
spaces
/
{spaceId}
/
data_source_views
/
{dsvId}
Update a data source view
curl --request PATCH \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"parentsIn": [
"<string>"
]
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}"
payload = { "parentsIn": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({parentsIn: ['<string>']})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'parentsIn' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}"
payload := strings.NewReader("{\n \"parentsIn\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"parentsIn\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/data_source_views/{dsvId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parentsIn\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"createdAt": 123,
"dataSource": {
"id": 12345,
"createdAt": 1625097600,
"name": "Customer Knowledge Base",
"description": "Contains all customer-related information and FAQs",
"dustAPIProjectId": "5e9d8c7b6a",
"connectorId": "1f3e5d7c9b",
"connectorProvider": "webcrawler",
"assistantDefaultSelected": true
},
"editedByUser": {
"fullName": "<string>",
"editedAt": 123
},
"id": 123,
"parentsIn": [
"<string>"
],
"sId": "<string>",
"updatedAt": 123,
"spaceId": "<string>"
}Authorizations
Your DUST API key is a Bearer token.
Body
application/json
- Option 1
- Option 2
Response
Successful response
The category of the data source view
Available options:
managed, folder, website, apps Timestamp of when the data source view was created
Show child attributes
Show child attributes
The user who last edited the data source view
Show child attributes
Show child attributes
Unique identifier for the data source view
The kind of the data source view
Available options:
default, custom List of IDs included in this view, null if complete data source is taken
Unique string identifier for the data source view
Timestamp of when the data source view was last updated
ID of the space containing the data source view
⌘I