Depot branding
Registers the guarded write routes on the tenant API mux.
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
GET /api/v1/console/branding
Section titled “GET /api/v1/console/branding”GETNo permission neededpublic facehosteditmspremoteIdempotent
Source: [object Object]
getBranding answers what the sign-in page needs to draw its heading.
Unauthenticated. It reads the tenant the hostname already resolved to, so the only organization it can name is the one whose sign-in page is being asked for, and that name is on the certificate, in the hostname, and printed on the invoice: nothing here is a disclosure.
EVERY FAILURE DEGRADES RATHER THAN ERRORS. A missing tenant, a missing store, or a store that will not answer all produce a 200 with an empty name and no logo. This is the first call the login page makes and the last thing it should be able to do is prevent somebody signing in; the page is designed to render identically when this returns nothing, so returning nothing is a complete answer rather than a swallowed error.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BrandingView | Success. |
200 response body
| Field | Type | Description |
|---|---|---|
logoUrl | string or null | |
organizationNamerequired | string |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/branding' \ -H 'Accept: application/json'# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'Accept' = 'application/json'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/branding' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/branding"headers = { "Accept": "application/json",}
response = requests.get(url, headers=headers, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/branding", nil) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
const url = "https://depot.example.com/api/v1/console/branding";
const response = await fetch(url, { method: "GET", headers: { "Accept": "application/json", },});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/branding");request.Headers.TryAddWithoutValidation("Accept", "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/console/branding/logo
Section titled “GET /api/v1/console/branding/logo”GETNo permission neededpublic facehosteditmspremoteIdempotentdownloadNot fully resolved
What this page does not know
- response
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
downloadLogo streams the logo to anybody who asks.
Read the file header before changing any header this writes.
The Cache-Control here is “public”, which is the exact OPPOSITE of what downloadTicketAttachment sets, for the exact opposite reason. An attachment is one customer’s private file reached by a URL that carries no credential, so no shared cache may hold it. A logo is deliberately shown to strangers, and the only thing that varies it is the hostname, which IS the tenant boundary and is part of every cache key there is. Five minutes is short enough that a replaced logo appears promptly and long enough that a sign-in page under load does not re-read a blob store for every visitor.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
304 | None | Success. |
404 | application/problem+json, ProblemDetails | No logo has been uploaded. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
502 | application/problem+json, ProblemDetails | The logo could not be read. |
503 | application/problem+json, ProblemDetails | Logo storage is not configured on this Depot. |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/branding/logo' \ -H 'Accept: application/json'# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'Accept' = 'application/json'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/branding/logo' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/branding/logo"headers = { "Accept": "application/json",}
response = requests.get(url, headers=headers, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/branding/logo", nil) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
const url = "https://depot.example.com/api/v1/console/branding/logo";
const response = await fetch(url, { method: "GET", headers: { "Accept": "application/json", },});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/branding/logo");request.Headers.TryAddWithoutValidation("Accept", "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/organization/branding/logo
Section titled “PUT /api/v1/organization/branding/logo”PUTclient:managetenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
uploadLogo takes one image as the raw request body.
Raw body rather than multipart, following uploadTicketAttachment: there is one file and no other fields, so multipart would add a parser, a spool and its own limits to carry no information. The type travels in Content-Type, which is where an HTTP client already puts it.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BrandingView | Success. |
400 | application/problem+json, ProblemDetails | The request body could not be read. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold client:manage. |
413 | application/problem+json, ProblemDetails | The request was refused. |
415 | application/problem+json, ProblemDetails | A logo must be a PNG, JPEG or WebP image. SVG is not accepted, because it can carry script. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
502 | application/problem+json, ProblemDetails | The logo could not be stored. The previous logo is unchanged. |
503 | application/problem+json, ProblemDetails | Logo storage is not configured on this Depot. |
507 | application/problem+json, ProblemDetails | This client’s storage is full. Raise the quota or remove old attachments. |
200 response body
| Field | Type | Description |
|---|---|---|
logoUrl | string or null | |
organizationNamerequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/organization/branding/logo' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/organization/branding/logo' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/organization/branding/logo"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.put(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/organization/branding/logo", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/organization/branding/logo";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/organization/branding/logo");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/organization/branding/logo
Section titled “DELETE /api/v1/organization/branding/logo”DELETEclient:managetenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
deleteLogo returns the sign-in page to the default wordmark.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold client:manage. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
502 | application/problem+json, ProblemDetails | The logo could not be read. |
503 | application/problem+json, ProblemDetails | Logo storage is not configured on this Depot. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/organization/branding/logo' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/organization/branding/logo' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/organization/branding/logo"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/organization/branding/logo", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/organization/branding/logo";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/organization/branding/logo");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.