List spaces
curl --request GET \
--url https://dust.tt/api/w/{wId}/spaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://dust.tt/api/w/{wId}/spaces"
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/w/{wId}/spaces', 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",
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/w/{wId}/spaces"
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/w/{wId}/spaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/w/{wId}/spaces")
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{
"spaces": [
{
"sId": "<string>",
"name": "<string>",
"groupIds": [
"<string>"
],
"isRestricted": true,
"createdAt": 123,
"updatedAt": 123
}
]
}Private Spaces
List spaces
Returns all spaces in the workspace.
GET
/
api
/
w
/
{wId}
/
spaces
List spaces
curl --request GET \
--url https://dust.tt/api/w/{wId}/spaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://dust.tt/api/w/{wId}/spaces"
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/w/{wId}/spaces', 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",
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/w/{wId}/spaces"
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/w/{wId}/spaces")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/w/{wId}/spaces")
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{
"spaces": [
{
"sId": "<string>",
"name": "<string>",
"groupIds": [
"<string>"
],
"isRestricted": true,
"createdAt": 123,
"updatedAt": 123
}
]
}Authorizations
Your DUST API key is a Bearer token.
Path Parameters
ID of the workspace
Query Parameters
Filter by role (e.g. admin to list all workspace spaces)
Filter by one or more space kinds. Repeat the parameter to include several kinds.
Available options:
global, system, conversations, regular, project Response
Success
A space in the workspace.
- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I