Fetch Space Breadcrumb
curl --request GET \
--url https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb', 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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb",
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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb"
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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb")
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{
"breadcrumb": [
{}
],
"depth": 123
}Space Endpoints
Fetch Space Breadcrumb
Get the ancestor chain of a space for breadcrumb navigation
Fetch Space Breadcrumb
curl --request GET \
--url https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb', 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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb",
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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb"
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.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/spaces/:spaceId/breadcrumb")
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{
"breadcrumb": [
{}
],
"depth": 123
}Returns an ordered list of spaces from the root ancestor down to and including the specified space itself, suitable for breadcrumb navigation. Authentication is optional; the path depends on who asks. A space the caller can’t see (a
See also: useFetchSpaceBreadcrumb
private space they aren’t an active member of, or a space under one) answers 404, exactly like a nonexistent space. See Space visibility. When the caller can see the space but not every space above it (they’re an active member of a private space nested under another private space they aren’t in), the list starts just below the lowest space above they can’t see, so it never names a hidden space and each entry is the parent of the next. depth is always the space’s own depth.
Path Parameters
Response
Ordered array of ancestor SpacePreview objects from the root down to the space itself. For a root-level space this array contains only that space. Each item includes:
id, shortId, name, slug, avatarFileId, parentSpaceId, depth.
