Update a data source view
curl --request PATCH \
--url https://dust.tt/api/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/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/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/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/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/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/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{
"dataSourceView": {
"sId": "<string>",
"id": 123,
"spaceId": "<string>",
"dataSource": {
"sId": "<string>",
"id": 123,
"name": "<string>",
"createdAt": 123,
"description": "<string>",
"assistantDefaultSelected": true,
"dustAPIProjectId": "<string>",
"dustAPIDataSourceId": "<string>",
"connectorId": "<string>",
"connectorProvider": "<string>"
},
"createdAt": 123,
"updatedAt": 123,
"parentsIn": [
"<string>"
],
"editedByUser": {
"editedAt": 123,
"fullName": "<string>",
"imageUrl": "<string>",
"email": "<string>",
"userId": "<string>"
}
},
"connector": {}
}Private Spaces
Update a data source view
Updates a specific data source view.
PATCH
/
api
/
w
/
{wId}
/
spaces
/
{spaceId}
/
data_source_views
/
{dsvId}
Update a data source view
curl --request PATCH \
--url https://dust.tt/api/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/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/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/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/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/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/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{
"dataSourceView": {
"sId": "<string>",
"id": 123,
"spaceId": "<string>",
"dataSource": {
"sId": "<string>",
"id": 123,
"name": "<string>",
"createdAt": 123,
"description": "<string>",
"assistantDefaultSelected": true,
"dustAPIProjectId": "<string>",
"dustAPIDataSourceId": "<string>",
"connectorId": "<string>",
"connectorProvider": "<string>"
},
"createdAt": 123,
"updatedAt": 123,
"parentsIn": [
"<string>"
],
"editedByUser": {
"editedAt": 123,
"fullName": "<string>",
"imageUrl": "<string>",
"email": "<string>",
"userId": "<string>"
}
},
"connector": {}
}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
Body
application/json
⌘I