Depot assets msp
Registers the /msp/assets routes on the control-plane 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/msp/assets
Section titled “GET /api/v1/msp/assets”GETassets:readmsp facemspIdempotent
Source: [object Object]
list is every client’s assets plus the practice’s own.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
category | query | string, one of accessory, component, desktop, laptop, license, monitor, network, other, peripheral, phone, printer, server, tablet | No | Comma-separated set. An unrecognised value is refused. |
client | query | string | No | |
dir | query | string, one of asc, desc | No | Sort direction. |
holderKind | 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. |
q | query | string | No | Free-text search term. |
sort | query | string, one of name, purchased, state, tag, warranty | No | Sort key. |
state | query | string, one of deployed, disposed, in_repair, in_stock, lost, purchased, retired, rma | No | Comma-separated set. An unrecognised value is refused. |
unlinked | query | string | No | |
warrantyBefore | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PsaFanOutPageAssetView | 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 assets:read. |
500 | application/problem+json, ProblemDetails | Could not list clients. |
503 | application/problem+json, ProblemDetails | This Depot cannot reach its clients. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of AssetView | |
items[].assetTag | string or null | |
items[].categoryrequired | string | |
items[].clientId | string or null | |
items[].clientName | string or null | |
items[].createdAtrequired | string | |
items[].disposalMethod | string or null | |
items[].endpointAgentId | string or null | |
items[].endpointLinkKind | string or null | |
items[].endpointName | string or null | |
items[].holderId | string or null | |
items[].holderKind | string or null | |
items[].holderName | string or null | |
items[].landedCostCentsrequired | integer | int64. |
items[].manufacturerrequired | string | |
items[].modelrequired | string | |
items[].namerequired | string | |
items[].notesrequired | string | |
items[].poNumber | string or null | |
items[].publicIdrequired | string | |
items[].purchaseCostCentsrequired | integer | int64. |
items[].purchaseOrderId | string or null | |
items[].purchasedOn | string or null | |
items[].rowVersionrequired | integer | int64. |
items[].salesOrderId | string or null | |
items[].salesOrderNumber | string or null | |
items[].serialNumberrequired | string | |
items[].siteId | string or null | |
items[].siteName | string or null | |
items[].sourcerequired | string | |
items[].staterequired | string | |
items[].stateChangedAtrequired | string | |
items[].stockItemId | string or null | |
items[].stockLocationId | string or null | |
items[].stockLocationName | string or null | |
items[].updatedAtrequired | string | |
items[].warrantyCheckedAt | string or null | |
items[].warrantyEndsOn | string or null | |
items[].warrantyErrorrequired | string | |
items[].warrantySource | string or null | |
items[].warrantyStartsOn | string or null | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer | |
totalClientsrequired | integer | |
unavailableClientsrequired | 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/msp/assets?category=accessory&client=<client>&dir=asc&holderKind=<holderKind>&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/msp/assets?category=accessory&client=<client>&dir=asc&holderKind=<holderKind>&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/msp/assets"params = { "category": "accessory", "client": "<client>", "dir": "asc", "holderKind": "<holderKind>", "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/msp/assets?category=accessory&client=<client>&dir=asc&holderKind=<holderKind>&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/msp/assets");url.searchParams.set("category", "accessory");url.searchParams.set("client", "<client>");url.searchParams.set("dir", "asc");url.searchParams.set("holderKind", "<holderKind>");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/msp/assets?category=accessory&client=<client>&dir=asc&holderKind=<holderKind>&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());POST /api/v1/msp/assets/{id}/deploy
Section titled “POST /api/v1/msp/assets/{id}/deploy”POSTassets:writemsp facemspIdempotent
Source: [object Object]
deploy moves practice-held hardware into a client’s register (the row, its history and its custody records keep their ids) and marks it deployed.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | A uuid. |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, AssetView | Success. |
400 | application/problem+json, ProblemDetails | The request body is not valid JSON. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold assets:write. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
409 | application/problem+json, ProblemDetails | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This asset changed since it was read. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot cannot reach its clients. |
200 response body
| Field | Type | Description |
|---|---|---|
assetTag | string or null | |
categoryrequired | string | |
clientId | string or null | |
clientName | string or null | |
createdAtrequired | string | |
disposalMethod | string or null | |
endpointAgentId | string or null | |
endpointLinkKind | string or null | |
endpointName | string or null | |
holderId | string or null | |
holderKind | string or null | |
holderName | string or null | |
landedCostCentsrequired | integer | int64. |
manufacturerrequired | string | |
modelrequired | string | |
namerequired | string | |
notesrequired | string | |
poNumber | string or null | |
publicIdrequired | string | |
purchaseCostCentsrequired | integer | int64. |
purchaseOrderId | string or null | |
purchasedOn | string or null | |
rowVersionrequired | integer | int64. |
salesOrderId | string or null | |
salesOrderNumber | string or null | |
serialNumberrequired | string | |
siteId | string or null | |
siteName | string or null | |
sourcerequired | string | |
staterequired | string | |
stateChangedAtrequired | string | |
stockItemId | string or null | |
stockLocationId | string or null | |
stockLocationName | string or null | |
updatedAtrequired | string | |
warrantyCheckedAt | string or null | |
warrantyEndsOn | string or null | |
warrantyErrorrequired | string | |
warrantySource | string or null | |
warrantyStartsOn | string or null |
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 POST 'https://depot.example.com/api/v1/msp/assets/<id>/deploy' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# 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 = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/msp/assets/<id>/deploy' ` -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/msp/assets/<id>/deploy"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
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.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/msp/assets/<id>/deploy", 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/msp/assets/<id>/deploy";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
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 = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/msp/assets/<id>/deploy");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());GET /api/v1/msp/assets/forecast
Section titled “GET /api/v1/msp/assets/forecast”GETassets:readmsp facemspIdempotent
Source: [object Object]
forecast is the refresh forecast across every client, the practice’s RefreshAgeMonths applied to all of them.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
client | query | string | No | |
horizonDays | 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, PsaFanOutPageMspForecastView | 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 assets:read. |
500 | application/problem+json, ProblemDetails | Could not list clients. |
503 | application/problem+json, ProblemDetails | This Depot cannot reach its clients. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of MspForecastView | |
items[].assetrequired | AssetView | |
items[].asset.assetTag | string or null | |
items[].asset.categoryrequired | string | |
items[].asset.clientId | string or null | |
items[].asset.clientName | string or null | |
items[].asset.createdAtrequired | string | |
items[].asset.disposalMethod | string or null | |
items[].asset.endpointAgentId | string or null | |
items[].asset.endpointLinkKind | string or null | |
items[].asset.endpointName | string or null | |
items[].asset.holderId | string or null | |
items[].asset.holderKind | string or null | |
items[].asset.holderName | string or null | |
items[].asset.landedCostCentsrequired | integer | int64. |
items[].asset.manufacturerrequired | string | |
items[].asset.modelrequired | string | |
items[].asset.namerequired | string | |
items[].asset.notesrequired | string | |
items[].asset.poNumber | string or null | |
items[].asset.publicIdrequired | string | |
items[].asset.purchaseCostCentsrequired | integer | int64. |
items[].asset.purchaseOrderId | string or null | |
items[].asset.purchasedOn | string or null | |
items[].asset.rowVersionrequired | integer | int64. |
items[].asset.salesOrderId | string or null | |
items[].asset.salesOrderNumber | string or null | |
items[].asset.serialNumberrequired | string | |
items[].asset.siteId | string or null | |
items[].asset.siteName | string or null | |
items[].asset.sourcerequired | string | |
items[].asset.staterequired | string | |
items[].asset.stateChangedAtrequired | string | |
items[].asset.stockItemId | string or null | |
items[].asset.stockLocationId | string or null | |
items[].asset.stockLocationName | string or null | |
items[].asset.updatedAtrequired | string | |
items[].asset.warrantyCheckedAt | string or null | |
items[].asset.warrantyEndsOn | string or null | |
items[].asset.warrantyErrorrequired | string | |
items[].asset.warrantySource | string or null | |
items[].asset.warrantyStartsOn | string or null | |
items[].clientId | string or null | |
items[].clientName | string or null | |
items[].dueOnrequired | string | |
items[].reasonrequired | string | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer | |
totalClientsrequired | integer | |
unavailableClientsrequired | 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/msp/assets/forecast?client=<client>&horizonDays=<horizonDays>&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/msp/assets/forecast?client=<client>&horizonDays=<horizonDays>&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/msp/assets/forecast"params = { "client": "<client>", "horizonDays": "<horizonDays>", "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/msp/assets/forecast?client=<client>&horizonDays=<horizonDays>&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/msp/assets/forecast");url.searchParams.set("client", "<client>");url.searchParams.set("horizonDays", "<horizonDays>");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/msp/assets/forecast?client=<client>&horizonDays=<horizonDays>&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());POST /api/v1/msp/assets/replacement-quote
Section titled “POST /api/v1/msp/assets/replacement-quote”POSTcrm:writemsp facemsp
Source: [object Object]
replacementQuote drafts a quote for the client with one line per asset to replace.
Prices are left for the salesperson; the draft is never sent.
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, object | Created. |
400 | application/problem+json, ProblemDetails | The request body is not valid JSON. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold crm:write. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot cannot reach its clients. |
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/msp/assets/replacement-quote' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# 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' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/msp/assets/replacement-quote' ` -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.
import requests
url = "https://depot.example.com/api/v1/msp/assets/replacement-quote"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
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(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/msp/assets/replacement-quote", 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.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/msp/assets/replacement-quote";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
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 = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/msp/assets/replacement-quote");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());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.