Depot topology
Registers the network map routes on the tenant API.
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/topology
Section titled “GET /api/v1/topology”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
getTopology returns the client’s network map, laid out.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
collapse | query | string | No | |
docs | query | string | No | |
network | query | string | No | |
site | query | string | No | |
view | query | string | No | |
vlan | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TopologyView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No site matches that id. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
200 response body
| Field | Type | Description |
|---|---|---|
generatedAtrequired | string (date-time) | |
graphrequired | Graph | Graph is the network map. |
graph.edgesrequired | array of Edge | |
graph.edges[].attrs | object | |
graph.edges[].bundle | string | |
graph.edges[].cableId | string | |
graph.edges[].class | string | |
graph.edges[].confidence | string | |
graph.edges[].fromrequired | string | |
graph.edges[].fromPortrequired | string | |
graph.edges[].hops | array of any | |
graph.edges[].idrequired | string | |
graph.edges[].kindrequired | string | |
graph.edges[].labelrequired | string | |
graph.edges[].labels | array of any | |
graph.edges[].lag | any | |
graph.edges[].manual | boolean | |
graph.edges[].media | string | |
graph.edges[].pointsrequired | array of any | |
graph.edges[].role | string | |
graph.edges[].sourcerequired | string | |
graph.edges[].speedMbps | integer | |
graph.edges[].stalerequired | boolean | |
graph.edges[].style | any | |
graph.edges[].torequired | string | |
graph.edges[].toPortrequired | string | |
graph.edges[].vlanrequired | integer | |
graph.edges[].vlans | array of any | |
graph.groupsrequired | array of Group | |
graph.groups[].hrequired | number | double. |
graph.groups[].headerH | number | double. |
graph.groups[].headerW | number | double. |
graph.groups[].idrequired | string | |
graph.groups[].kindrequired | string | |
graph.groups[].labelrequired | string | |
graph.groups[].labelXrequired | number | double. |
graph.groups[].labelYrequired | number | double. |
graph.groups[].membersrequired | array of any | |
graph.groups[].parentrequired | string | |
graph.groups[].wrequired | number | double. |
graph.groups[].xrequired | number | double. |
graph.groups[].yrequired | number | double. |
graph.heightrequired | number | double. |
graph.icons | object | |
graph.nodesrequired | array of Node | |
graph.nodes[].attrsrequired | object | |
graph.nodes[].collapsed | any | |
graph.nodes[].hrequired | number | double. |
graph.nodes[].icon | string | |
graph.nodes[].idrequired | string | |
graph.nodes[].iprequired | array of any | |
graph.nodes[].kindrequired | string | |
graph.nodes[].labelrequired | string | |
graph.nodes[].labelLines | array of any | |
graph.nodes[].labelSize | number | double. |
graph.nodes[].macrequired | string | |
graph.nodes[].ref | any | |
graph.nodes[].siterequired | string | |
graph.nodes[].statusrequired | string | |
graph.nodes[].vlanrequired | array of any | |
graph.nodes[].wrequired | number | double. |
graph.nodes[].xrequired | number | double. |
graph.nodes[].yrequired | number | double. |
graph.versionrequired | integer | |
graph.view | string | |
graph.widthrequired | number | double. |
refrequired | 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 GET 'https://depot.example.com/api/v1/topology?collapse=<collapse>&docs=<docs>&network=<network>&site=<site>&view=<view>&vlan=<vlan>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology?collapse=<collapse>&docs=<docs>&network=<network>&site=<site>&view=<view>&vlan=<vlan>' ` -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/topology"params = { "collapse": "<collapse>", "docs": "<docs>", "network": "<network>", "site": "<site>", "view": "<view>", "vlan": "<vlan>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology?collapse=<collapse>&docs=<docs>&network=<network>&site=<site>&view=<view>&vlan=<vlan>", 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 = new URL("https://depot.example.com/api/v1/topology");url.searchParams.set("collapse", "<collapse>");url.searchParams.set("docs", "<docs>");url.searchParams.set("network", "<network>");url.searchParams.set("site", "<site>");url.searchParams.set("view", "<view>");url.searchParams.set("vlan", "<vlan>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology?collapse=<collapse>&docs=<docs>&network=<network>&site=<site>&view=<view>&vlan=<vlan>");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());GET /api/v1/topology/diff
Section titled “GET /api/v1/topology/diff”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
diffTopology compares a snapshot (or the map as it was at a time) with another snapshot or with the live map.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | No | |
site | query | string | No | |
to | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, DiffResult | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Network map snapshots are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
changesrequired | array of DiffChange | |
changes[].afterrequired | string | |
changes[].beforerequired | string | |
changes[].fieldrequired | string | |
changes[].labelrequired | string | |
changes[].nodeIdrequired | string | |
edgesAddedrequired | array of DiffEdge | |
edgesAdded[].fromrequired | string | |
edgesAdded[].fromPortrequired | string | |
edgesAdded[].idrequired | string | |
edgesAdded[].torequired | string | |
edgesAdded[].toPortrequired | string | |
edgesMovedrequired | array of DiffMove | |
edgesMoved[].afterrequired | DiffAttach | DiffAttach is where a host was plugged in. |
edgesMoved[].after.peerrequired | string | |
edgesMoved[].after.peerLabelrequired | string | |
edgesMoved[].after.portrequired | string | |
edgesMoved[].beforerequired | DiffAttach | DiffAttach is where a host was plugged in. |
edgesMoved[].before.peerrequired | string | |
edgesMoved[].before.peerLabelrequired | string | |
edgesMoved[].before.portrequired | string | |
edgesMoved[].labelrequired | string | |
edgesMoved[].nodeIdrequired | string | |
edgesRemovedrequired | array of DiffEdge | |
edgesRemoved[].fromrequired | string | |
edgesRemoved[].fromPortrequired | string | |
edgesRemoved[].idrequired | string | |
edgesRemoved[].torequired | string | |
edgesRemoved[].toPortrequired | string | |
fromrequired | DiffEnd | DiffEnd names one side of a diff. |
from.idrequired | string | |
from.takenAtrequired | string | |
nodesAddedrequired | array of DiffNode | |
nodesAdded[].idrequired | string | |
nodesAdded[].kindrequired | string | |
nodesAdded[].labelrequired | string | |
nodesRemovedrequired | array of DiffNode | |
nodesRemoved[].idrequired | string | |
nodesRemoved[].kindrequired | string | |
nodesRemoved[].labelrequired | string | |
torequired | DiffEnd | DiffEnd names one side of a diff. |
to.idrequired | string | |
to.takenAtrequired | 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 GET 'https://depot.example.com/api/v1/topology/diff?from=<from>&site=<site>&to=<to>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/diff?from=<from>&site=<site>&to=<to>' ` -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/topology/diff"params = { "from": "<from>", "site": "<site>", "to": "<to>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/diff?from=<from>&site=<site>&to=<to>", 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 = new URL("https://depot.example.com/api/v1/topology/diff");url.searchParams.set("from", "<from>");url.searchParams.set("site", "<site>");url.searchParams.set("to", "<to>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/diff?from=<from>&site=<site>&to=<to>");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());POST /api/v1/topology/drift
Section titled “POST /api/v1/topology/drift”POSTdiscovery:readtenant facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
driftTopology compares a documented diagram (.drawio or .vsdx, a documentation file, an upload, or a diagram already parsed) with the live map.
Request body
Section titled “Request body”Required, sent as multipart/form-data.
The body is object.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, object | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold the required permission. |
404 | application/problem+json, ProblemDetails | No network diagram matches that id. |
422 | application/problem+json, ProblemDetails | The diagram’s current revision is not a diagram Outpost can read. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
501 | application/problem+json, ProblemDetails | That part of the documentation store is not available on this Depot yet. |
502 | application/problem+json, ProblemDetails | The file could not be read. |
503 | application/problem+json, ProblemDetails | Network diagrams are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
attrDiffsrequired | array of DriftAttr | |
attrDiffs[].docrequired | string | |
attrDiffs[].fieldrequired | string | |
attrDiffs[].liverequired | string | |
attrDiffs[].liveLabelrequired | string | |
attrDiffs[].liveNodeIdrequired | string | |
diagramIdrequired | string | |
documentNamerequired | string | |
linkDiffsrequired | array of DriftLink | |
linkDiffs[].detailrequired | string | |
linkDiffs[].docEdge | DriftEdgeEnd | DriftEdgeEnd is one side's view of a link. |
linkDiffs[].docEdge.fromrequired | string | |
linkDiffs[].docEdge.fromPortrequired | string | |
linkDiffs[].docEdge.torequired | string | |
linkDiffs[].docEdge.toPortrequired | string | |
linkDiffs[].kindrequired | string, one of missing, moved, new | |
linkDiffs[].liveEdge | DriftEdgeEnd | DriftEdgeEnd is one side's view of a link. |
linkDiffs[].liveEdge.fromrequired | string | |
linkDiffs[].liveEdge.fromPortrequired | string | |
linkDiffs[].liveEdge.torequired | string | |
linkDiffs[].liveEdge.toPortrequired | string | |
matchesrequired | array of DriftMatch | |
matches[].byrequired | string | |
matches[].confidencerequired | number | double. |
matches[].docLabelrequired | string | |
matches[].docNodeIdrequired | string | |
matches[].liveLabelrequired | string | |
matches[].liveNodeIdrequired | string | |
missingrequired | array of DriftDocNode | |
missing[].docLabelrequired | string | |
missing[].docNodeIdrequired | string | |
missing[].kindrequired | string | |
pagesrequired | array of string | |
scorerequired | number | double. |
summaryrequired | string | |
unknownrequired | array of DriftLiveNode | |
unknown[].kindrequired | string | |
unknown[].liveLabelrequired | string | |
unknown[].liveNodeIdrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/topology/drift' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -b 'outpost_console=<console-session>' \ --data '{}'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'multipart/form-data' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/topology/drift' ` -Headers $headers ` -ContentType 'multipart/form-data' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/topology/drift"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "multipart/form-data",}cookies = { "outpost_console": "<console-session>",}payload = {}
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/topology/drift", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "multipart/form-data") 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.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/topology/drift";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "multipart/form-data", }, credentials: "include", body: JSON.stringify({}),});
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.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/topology/drift");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "multipart/form-data");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/topology/export
Section titled “GET /api/v1/topology/export”GETdiscovery:readtenant facehosteditmspremoteIdempotentdownloadNot fully resolved
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
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]
exportTopology downloads the network map in any export format (18.2), as one view or, for .drawio, .vsdx and PDF, one page per view in pages.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
collapse | query | string | No | |
docs | query | string | No | |
format | query | string | No | |
network | query | string | No | |
pages | query | string | No | |
site | query | string | No | |
view | query | string | No | |
vlan | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No site matches that id. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
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 GET 'https://depot.example.com/api/v1/topology/export?collapse=<collapse>&docs=<docs>&format=<format>&network=<network>&pages=<pages>&site=<site>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/export?collapse=<collapse>&docs=<docs>&format=<format>&network=<network>&pages=<pages>&site=<site>' ` -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/topology/export"params = { "collapse": "<collapse>", "docs": "<docs>", "format": "<format>", "network": "<network>", "pages": "<pages>", "site": "<site>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/export?collapse=<collapse>&docs=<docs>&format=<format>&network=<network>&pages=<pages>&site=<site>", 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 = new URL("https://depot.example.com/api/v1/topology/export");url.searchParams.set("collapse", "<collapse>");url.searchParams.set("docs", "<docs>");url.searchParams.set("format", "<format>");url.searchParams.set("network", "<network>");url.searchParams.set("pages", "<pages>");url.searchParams.set("site", "<site>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/export?collapse=<collapse>&docs=<docs>&format=<format>&network=<network>&pages=<pages>&site=<site>");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());PUT /api/v1/topology/links/{edgeKey}
Section titled “PUT /api/v1/topology/links/{edgeKey}”PUTnetwork_map:edittenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
putLinkOverride replaces one link’s override.
The link must be on the map as the caller sees it; a field left out or null is cleared.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
edgeKey | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
cableId | string or null | |
label | string or null | |
media | string or null | |
notes | string or null | |
speedMbps | integer or null |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, LinkOverrideView | Success. |
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | Missing permission: discovery:read |
404 | application/problem+json, ProblemDetails | No link on the network map has that id. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Link details are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
cableId | string or null | |
edgeKeyrequired | string | |
label | string or null | |
media | string or null | |
notes | string or null | |
orphanedrequired | boolean | |
speedMbps | integer or null | |
updatedAtrequired | string (date-time) | |
updatedByrequired | 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/topology/links/<edgeKey>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0}'# 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' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/topology/links/<edgeKey>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$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/topology/links/<edgeKey>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0,}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, 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 ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/topology/links/<edgeKey>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "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/topology/links/<edgeKey>";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0 }),});
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 System.Text;
using var client = new HttpClient();
const string body = """{ "cableId": "string", "label": "string", "media": "string", "notes": "string", "speedMbps": 0}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/topology/links/<edgeKey>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/topology/links/{edgeKey}
Section titled “DELETE /api/v1/topology/links/{edgeKey}”DELETEnetwork_map:edittenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
deleteLinkOverride clears one link’s override.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
edgeKey | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold network_map:edit. |
404 | application/problem+json, ProblemDetails | That link has no saved details. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Link details are not available 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/topology/links/<edgeKey>' \ -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/topology/links/<edgeKey>' ` -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/topology/links/<edgeKey>"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/topology/links/<edgeKey>", 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/topology/links/<edgeKey>";
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/topology/links/<edgeKey>");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());GET /api/v1/topology/links/overrides
Section titled “GET /api/v1/topology/links/overrides”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
listLinkOverrides lists the client’s overrides, each saying whether its link is on the map now; orphaned=1 keeps only those that are not.
Without endpoint:read, overrides on endpoint links are left out, as the map leaves those links out.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
orphaned | query | string | No | |
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultLinkOverrideView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Link details are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of LinkOverrideView | |
items[].cableId | string or null | |
items[].edgeKeyrequired | string | |
items[].label | string or null | |
items[].media | string or null | |
items[].notes | string or null | |
items[].orphanedrequired | boolean | |
items[].speedMbps | integer or null | |
items[].updatedAtrequired | string (date-time) | |
items[].updatedByrequired | string | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
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 GET 'https://depot.example.com/api/v1/topology/links/overrides?orphaned=<orphaned>&page=0&pageSize=0' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/links/overrides?orphaned=<orphaned>&page=0&pageSize=0' ` -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/topology/links/overrides"params = { "orphaned": "<orphaned>", "page": "0", "pageSize": "0",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/links/overrides?orphaned=<orphaned>&page=0&pageSize=0", 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 = new URL("https://depot.example.com/api/v1/topology/links/overrides");url.searchParams.set("orphaned", "<orphaned>");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/links/overrides?orphaned=<orphaned>&page=0&pageSize=0");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());GET /api/v1/topology/snapshots
Section titled “GET /api/v1/topology/snapshots”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
listTopologySnapshots pages the stored daily snapshots, newest first.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
site | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultTopologySnapshotView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Network map snapshots are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of TopologySnapshotView | |
items[].edgeCountrequired | integer | |
items[].graph | Graph | Graph is the network map. |
items[].graph.edgesrequired | array of Edge | |
items[].graph.edges[].attrs | object | |
items[].graph.edges[].bundle | string | |
items[].graph.edges[].cableId | string | |
items[].graph.edges[].class | string | |
items[].graph.edges[].confidence | string | |
items[].graph.edges[].fromrequired | string | |
items[].graph.edges[].fromPortrequired | string | |
items[].graph.edges[].hops | array of any | |
items[].graph.edges[].idrequired | string | |
items[].graph.edges[].kindrequired | string | |
items[].graph.edges[].labelrequired | string | |
items[].graph.edges[].labels | array of any | |
items[].graph.edges[].lag | any | |
items[].graph.edges[].manual | boolean | |
items[].graph.edges[].media | string | |
items[].graph.edges[].pointsrequired | array of any | |
items[].graph.edges[].role | string | |
items[].graph.edges[].sourcerequired | string | |
items[].graph.edges[].speedMbps | integer | |
items[].graph.edges[].stalerequired | boolean | |
items[].graph.edges[].style | any | |
items[].graph.edges[].torequired | string | |
items[].graph.edges[].toPortrequired | string | |
items[].graph.edges[].vlanrequired | integer | |
items[].graph.edges[].vlans | array of any | |
items[].graph.groupsrequired | array of Group | |
items[].graph.groups[].hrequired | number | double. |
items[].graph.groups[].headerH | number | double. |
items[].graph.groups[].headerW | number | double. |
items[].graph.groups[].idrequired | string | |
items[].graph.groups[].kindrequired | string | |
items[].graph.groups[].labelrequired | string | |
items[].graph.groups[].labelXrequired | number | double. |
items[].graph.groups[].labelYrequired | number | double. |
items[].graph.groups[].membersrequired | array of any | |
items[].graph.groups[].parentrequired | string | |
items[].graph.groups[].wrequired | number | double. |
items[].graph.groups[].xrequired | number | double. |
items[].graph.groups[].yrequired | number | double. |
items[].graph.heightrequired | number | double. |
items[].graph.icons | object | |
items[].graph.nodesrequired | array of Node | |
items[].graph.nodes[].attrsrequired | object | |
items[].graph.nodes[].collapsed | any | |
items[].graph.nodes[].hrequired | number | double. |
items[].graph.nodes[].icon | string | |
items[].graph.nodes[].idrequired | string | |
items[].graph.nodes[].iprequired | array of any | |
items[].graph.nodes[].kindrequired | string | |
items[].graph.nodes[].labelrequired | string | |
items[].graph.nodes[].labelLines | array of any | |
items[].graph.nodes[].labelSize | number | double. |
items[].graph.nodes[].macrequired | string | |
items[].graph.nodes[].ref | any | |
items[].graph.nodes[].siterequired | string | |
items[].graph.nodes[].statusrequired | string | |
items[].graph.nodes[].vlanrequired | array of any | |
items[].graph.nodes[].wrequired | number | double. |
items[].graph.nodes[].xrequired | number | double. |
items[].graph.nodes[].yrequired | number | double. |
items[].graph.versionrequired | integer | |
items[].graph.view | string | |
items[].graph.widthrequired | number | double. |
items[].hashrequired | string | |
items[].idrequired | string | |
items[].nodeCountrequired | integer | |
items[].ref | string | |
items[].siteIdrequired | string | |
items[].takenAtrequired | string (date-time) | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
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 GET 'https://depot.example.com/api/v1/topology/snapshots?page=0&pageSize=0&site=<site>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/snapshots?page=0&pageSize=0&site=<site>' ` -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/topology/snapshots"params = { "page": "0", "pageSize": "0", "site": "<site>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/snapshots?page=0&pageSize=0&site=<site>", 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 = new URL("https://depot.example.com/api/v1/topology/snapshots");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("site", "<site>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/snapshots?page=0&pageSize=0&site=<site>");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());POST /api/v1/topology/snapshots
Section titled “POST /api/v1/topology/snapshots”POSTdiscovery:managetenant facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
takeTopologySnapshot snapshots the client’s map now, storing each site whose map changed since its last snapshot.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, object | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:manage. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Network map snapshots are not available on this Depot. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/topology/snapshots' \ -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.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/topology/snapshots' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/topology/snapshots"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(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.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/topology/snapshots", 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.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/topology/snapshots";
const response = await fetch(url, { method: "POST", 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.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/topology/snapshots");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());GET /api/v1/topology/snapshots/{snapshotId}
Section titled “GET /api/v1/topology/snapshots/{snapshotId}”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
getTopologySnapshot returns one stored snapshot with its graph laid out.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
snapshotId | path | string | Yes | A uuid. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TopologySnapshotView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Network map snapshots are not available on this Depot. |
200 response body
| Field | Type | Description |
|---|---|---|
edgeCountrequired | integer | |
graph | Graph | Graph is the network map. |
graph.edgesrequired | array of Edge | |
graph.edges[].attrs | object | |
graph.edges[].bundle | string | |
graph.edges[].cableId | string | |
graph.edges[].class | string | |
graph.edges[].confidence | string | |
graph.edges[].fromrequired | string | |
graph.edges[].fromPortrequired | string | |
graph.edges[].hops | array of any | |
graph.edges[].idrequired | string | |
graph.edges[].kindrequired | string | |
graph.edges[].labelrequired | string | |
graph.edges[].labels | array of any | |
graph.edges[].lag | any | |
graph.edges[].manual | boolean | |
graph.edges[].media | string | |
graph.edges[].pointsrequired | array of any | |
graph.edges[].role | string | |
graph.edges[].sourcerequired | string | |
graph.edges[].speedMbps | integer | |
graph.edges[].stalerequired | boolean | |
graph.edges[].style | any | |
graph.edges[].torequired | string | |
graph.edges[].toPortrequired | string | |
graph.edges[].vlanrequired | integer | |
graph.edges[].vlans | array of any | |
graph.groupsrequired | array of Group | |
graph.groups[].hrequired | number | double. |
graph.groups[].headerH | number | double. |
graph.groups[].headerW | number | double. |
graph.groups[].idrequired | string | |
graph.groups[].kindrequired | string | |
graph.groups[].labelrequired | string | |
graph.groups[].labelXrequired | number | double. |
graph.groups[].labelYrequired | number | double. |
graph.groups[].membersrequired | array of any | |
graph.groups[].parentrequired | string | |
graph.groups[].wrequired | number | double. |
graph.groups[].xrequired | number | double. |
graph.groups[].yrequired | number | double. |
graph.heightrequired | number | double. |
graph.icons | object | |
graph.nodesrequired | array of Node | |
graph.nodes[].attrsrequired | object | |
graph.nodes[].collapsed | any | |
graph.nodes[].hrequired | number | double. |
graph.nodes[].icon | string | |
graph.nodes[].idrequired | string | |
graph.nodes[].iprequired | array of any | |
graph.nodes[].kindrequired | string | |
graph.nodes[].labelrequired | string | |
graph.nodes[].labelLines | array of any | |
graph.nodes[].labelSize | number | double. |
graph.nodes[].macrequired | string | |
graph.nodes[].ref | any | |
graph.nodes[].siterequired | string | |
graph.nodes[].statusrequired | string | |
graph.nodes[].vlanrequired | array of any | |
graph.nodes[].wrequired | number | double. |
graph.nodes[].xrequired | number | double. |
graph.nodes[].yrequired | number | double. |
graph.versionrequired | integer | |
graph.view | string | |
graph.widthrequired | number | double. |
hashrequired | string | |
idrequired | string | |
nodeCountrequired | integer | |
ref | string | |
siteIdrequired | string | |
takenAtrequired | string (date-time) |
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 GET 'https://depot.example.com/api/v1/topology/snapshots/<snapshotId>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/snapshots/<snapshotId>' ` -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/topology/snapshots/<snapshotId>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(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.MethodGet, "https://depot.example.com/api/v1/topology/snapshots/<snapshotId>", 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/topology/snapshots/<snapshotId>";
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/snapshots/<snapshotId>");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());GET /api/v1/topology/snapshots/{snapshotId}/export
Section titled “GET /api/v1/topology/snapshots/{snapshotId}/export”GETdiscovery:readtenant facehosteditmspremoteIdempotentdownloadNot fully resolved
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
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]
exportTopologySnapshot downloads a stored snapshot in any export format, one view or one page per view, as the live export does (5.5a, 18.2).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
snapshotId | path | string | Yes | A uuid. |
format | query | string | No | |
pages | query | string | No | |
view | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
503 | application/problem+json, ProblemDetails | Network map snapshots are not available 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 GET 'https://depot.example.com/api/v1/topology/snapshots/<snapshotId>/export?format=<format>&pages=<pages>&view=<view>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/snapshots/<snapshotId>/export?format=<format>&pages=<pages>&view=<view>' ` -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/topology/snapshots/<snapshotId>/export"params = { "format": "<format>", "pages": "<pages>", "view": "<view>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/snapshots/<snapshotId>/export?format=<format>&pages=<pages>&view=<view>", 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 = new URL("https://depot.example.com/api/v1/topology/snapshots/<snapshotId>/export");url.searchParams.set("format", "<format>");url.searchParams.set("pages", "<pages>");url.searchParams.set("view", "<view>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/snapshots/<snapshotId>/export?format=<format>&pages=<pages>&view=<view>");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());GET /api/v1/topology/trace
Section titled “GET /api/v1/topology/trace”GETdiscovery:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
traceTopology walks the link path from one device to another, or to the internet.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | No | |
to | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TraceResult | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold discovery:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
500 | application/problem+json, ProblemDetails | No client store in request context. |
200 response body
| Field | Type | Description |
|---|---|---|
edgesrequired | array of string | |
foundrequired | boolean | |
fromrequired | string | |
highlightPathrequired | array of string | |
hopsrequired | array of TraceHop | |
hops[].edgeIdrequired | string | |
hops[].gatewayrequired | string | |
hops[].inPortrequired | string | |
hops[].inferredrequired | boolean | |
hops[].kindrequired | string | |
hops[].labelrequired | string | |
hops[].nodeIdrequired | string | |
hops[].outPortrequired | string | |
hops[].sourcerequired | string | |
hops[].stalerequired | boolean | |
hops[].vlanrequired | integer | |
pathrequired | array of string | |
refrequired | string | |
torequired | string | |
warningsrequired | array of 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 GET 'https://depot.example.com/api/v1/topology/trace?from=<from>&to=<to>' \ -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 Get ` -Uri 'https://depot.example.com/api/v1/topology/trace?from=<from>&to=<to>' ` -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/topology/trace"params = { "from": "<from>", "to": "<to>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, 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.MethodGet, "https://depot.example.com/api/v1/topology/trace?from=<from>&to=<to>", 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 = new URL("https://depot.example.com/api/v1/topology/trace");url.searchParams.set("from", "<from>");url.searchParams.set("to", "<to>");
const response = await fetch(url, { method: "GET", 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.Get, "https://depot.example.com/api/v1/topology/trace?from=<from>&to=<to>");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.