curl --request GET \
--url http://localhost:3000/api/v1/portal/{slug}/siteimport requests
url = "http://localhost:3000/api/v1/portal/{slug}/site"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/api/v1/portal/{slug}/site', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/portal/{slug}/site",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/api/v1/portal/{slug}/site"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/v1/portal/{slug}/site")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portal/{slug}/site")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"portal": {
"slug": "<string>",
"name": "<string>",
"theme": {
"logo": "<string>",
"accent": "<string>",
"background": "<string>",
"icon": "<string>",
"product": "<string>"
},
"site": {
"footer": {
"text": "<string>",
"links": [
{
"label": "<string>",
"href": "<string>"
}
],
"credit": "<string>",
"feedback": "<string>"
},
"quick": [
{
"label": "<string>",
"brand": "<string>",
"page": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>"
}
],
"terms": "<string>",
"listed": true
},
"brands": [
{
"slug": "<string>",
"name": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"assets": true,
"level": "everyone"
},
"canonical": "<string>",
"redirect": true,
"view": {
"brand": {
"slug": "<string>",
"name": "<string>"
},
"version": {
"number": 0,
"publishedAt": "2023-11-07T05:31:56Z"
},
"context": "<string>",
"contexts": [
"<string>"
],
"lang": "<string>",
"theme": {
"v1": {},
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"onDark": "<string>",
"mutedOnDark": "<string>",
"accent": "<string>",
"accentText": "<string>",
"onAccent": "<string>",
"accentUse": "fill",
"line": "<string>",
"faces": {
"head": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"body": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"label": {
"family": "<string>",
"case": "<string>",
"tracking": 123,
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
}
},
"radius": 123,
"width": "narrow",
"density": "compact",
"scale": 123,
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logo": {
"key": "<string>"
},
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
],
"settings": {
"accent": "<string>",
"accentUse": "fill",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"width": "narrow",
"density": "compact",
"scale": 1.3425,
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"languages": [
{
"code": "<string>",
"label": "<string>",
"dir": "ltr"
}
]
}
},
"nav": [
{
"slug": "<string>",
"title": "<string>",
"parent": "<string>",
"position": 0,
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"home": true,
"locked": true,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": {
"slug": "<string>",
"title": "<string>",
"parent": "<string>",
"position": 0,
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"home": true,
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"aliases": [
"<string>"
],
"layout": "book"
},
"locked": true,
"rules": [
{
"key": "<string>",
"label": "<string>",
"context": "<string>",
"type": "color",
"value": "<string>",
"spec": {},
"usage": "<string>",
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rendition": "<string>",
"title": "<string>",
"filename": "<string>",
"mime": "<string>",
"width": 0,
"height": 0,
"size": 0,
"preview": true
}
]
}
],
"media": {},
"collections": {},
"signed": {},
"warnings": [
"<string>"
],
"missing": [
"<string>"
],
"redirect": "<string>",
"updates": [
{
"version": 0,
"publishedAt": "2023-11-07T05:31:56Z",
"publishedBy": "<string>",
"note": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"rules": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"pages": {
"added": [
{
"slug": "<string>",
"title": "<string>"
}
],
"changed": [
{
"slug": "<string>",
"title": "<string>"
}
],
"removed": [
{
"slug": "<string>",
"title": "<string>"
}
]
}
}
}
]
}
}
}{
"error": {
"code": "password",
"message": "<string>",
"detail": {
"name": "<string>",
"access": "password",
"theme": {
"logo": "<string>",
"accent": "<string>",
"background": "<string>",
"icon": "<string>",
"product": "<string>"
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}A page of a portal's brand book
A page of one of the portal’s brands, from its latest publish (never the draft), as this visitor may read it, behind the same door as the portal. path is what follows /p/: nothing for the first brand’s first page, {page} for a page of the first brand (else another brand’s first page), {brand}/{page}. Pages above the visitor (portal.level) are listed with a lock and carry nothing; sections above them and hidden ones are left out. Every asset URL comes signed. redirect: the path was an old slug or a long form, so send the reader to canonical. A portal showing no brand answers view: null.
No key needed.
curl --request GET \
--url http://localhost:3000/api/v1/portal/{slug}/siteimport requests
url = "http://localhost:3000/api/v1/portal/{slug}/site"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/api/v1/portal/{slug}/site', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/portal/{slug}/site",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/api/v1/portal/{slug}/site"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/v1/portal/{slug}/site")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/portal/{slug}/site")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"portal": {
"slug": "<string>",
"name": "<string>",
"theme": {
"logo": "<string>",
"accent": "<string>",
"background": "<string>",
"icon": "<string>",
"product": "<string>"
},
"site": {
"footer": {
"text": "<string>",
"links": [
{
"label": "<string>",
"href": "<string>"
}
],
"credit": "<string>",
"feedback": "<string>"
},
"quick": [
{
"label": "<string>",
"brand": "<string>",
"page": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"href": "<string>"
}
],
"terms": "<string>",
"listed": true
},
"brands": [
{
"slug": "<string>",
"name": "<string>",
"publishedAt": "2023-11-07T05:31:56Z"
}
],
"assets": true,
"level": "everyone"
},
"canonical": "<string>",
"redirect": true,
"view": {
"brand": {
"slug": "<string>",
"name": "<string>"
},
"version": {
"number": 0,
"publishedAt": "2023-11-07T05:31:56Z"
},
"context": "<string>",
"contexts": [
"<string>"
],
"lang": "<string>",
"theme": {
"v1": {},
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"onDark": "<string>",
"mutedOnDark": "<string>",
"accent": "<string>",
"accentText": "<string>",
"onAccent": "<string>",
"accentUse": "fill",
"line": "<string>",
"faces": {
"head": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"body": {
"family": "<string>",
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
},
"label": {
"family": "<string>",
"case": "<string>",
"tracking": 123,
"weight": 123,
"file": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"files": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime": "<string>"
}
],
"fallback": "<string>",
"google": true
}
},
"radius": 123,
"width": "narrow",
"density": "compact",
"scale": 123,
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"logo": {
"key": "<string>"
},
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"checks": [
{
"pair": "<string>",
"fg": "<string>",
"bg": "<string>",
"ratio": 123,
"need": 123,
"ok": true,
"used": "<string>"
}
],
"settings": {
"accent": "<string>",
"accentUse": "fill",
"surface": "<string>",
"panel": "<string>",
"dark": "<string>",
"ink": "<string>",
"muted": "<string>",
"head": "<string>",
"body": "<string>",
"label": "<string>",
"logo": "<string>",
"device": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"radius": 20,
"width": "narrow",
"density": "compact",
"scale": 1.3425,
"nav": "sidebar",
"band": true,
"header": "plain",
"separation": "space",
"numbering": true,
"motion": "none",
"toc": "side",
"languages": [
{
"code": "<string>",
"label": "<string>",
"dir": "ltr"
}
]
}
},
"nav": [
{
"slug": "<string>",
"title": "<string>",
"parent": "<string>",
"position": 0,
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"home": true,
"locked": true,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"page": {
"slug": "<string>",
"title": "<string>",
"parent": "<string>",
"position": 0,
"eyebrow": "<string>",
"lede": "<string>",
"cover": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"audience": "everyone",
"tabs": true,
"home": true,
"updatedAt": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "<string>",
"template": "<string>",
"title": "<string>",
"body": "<string>",
"width": "text",
"columns": 0,
"tone": "<string>",
"hidden": true,
"keys": [
"<string>"
],
"props": {},
"eyebrow": "<string>",
"lede": "<string>",
"aside": "<string>",
"tab": "<string>",
"background": {
"color": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scrim": 123
},
"items": [
{
"key": "<string>",
"asset": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"text": "<string>",
"verdict": "do",
"caption": "<string>",
"link": "<string>",
"label": "<string>",
"icon": "<string>",
"download": true
}
],
"audience": "everyone",
"contexts": [
"<string>"
],
"only": "<string>",
"translations": {}
}
],
"aliases": [
"<string>"
],
"layout": "book"
},
"locked": true,
"rules": [
{
"key": "<string>",
"label": "<string>",
"context": "<string>",
"type": "color",
"value": "<string>",
"spec": {},
"usage": "<string>",
"assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rendition": "<string>",
"title": "<string>",
"filename": "<string>",
"mime": "<string>",
"width": 0,
"height": 0,
"size": 0,
"preview": true
}
]
}
],
"media": {},
"collections": {},
"signed": {},
"warnings": [
"<string>"
],
"missing": [
"<string>"
],
"redirect": "<string>",
"updates": [
{
"version": 0,
"publishedAt": "2023-11-07T05:31:56Z",
"publishedBy": "<string>",
"note": "<string>",
"image": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changes": {
"rules": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"pages": {
"added": [
{
"slug": "<string>",
"title": "<string>"
}
],
"changed": [
{
"slug": "<string>",
"title": "<string>"
}
],
"removed": [
{
"slug": "<string>",
"title": "<string>"
}
]
}
}
}
]
}
}
}{
"error": {
"code": "password",
"message": "<string>",
"detail": {
"name": "<string>",
"access": "password",
"theme": {
"logo": "<string>",
"accent": "<string>",
"background": "<string>",
"icon": "<string>",
"product": "<string>"
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"detail": "<unknown>"
}
}Path Parameters
The portal's address
Query Parameters
The portal path, e.g. logo or other-brand/logo
The context the reader starts in, e.g. dark-background
The reader's language, a lowercase tag: ar, en-gb
Response
The page
Show child attributes
Show child attributes