Depot portal tickets
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/portal/v1/orgs/{clientID}/tickets
Section titled “GET /api/portal/v1/orgs/{clientID}/tickets”GETportal:tickets:read_ownportal facemspIdempotent
Source: [object Object]
listTickets is the member’s tickets, newest activity first.
?state=open keeps the ones still being worked, ?state=closed the resolved and closed. ?mine=true narrows a read_all holder to their own (the read_own scope), and ?q= matches the ticket reference.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes | |
mine | query | string | No | |
page | query | string | No | |
pageSize | query | string | No | |
q | query | string | No | |
state | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PageTicketSummary | Success. |
400 | None | The request was refused. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:read_own. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of TicketSummary | |
items[].category | string or null | |
items[].createdAtrequired | string (date-time) | |
items[].endpoint | TicketEndpointView | TicketEndpointView is the device a ticket is about. |
items[].endpoint.agentIdrequired | string | |
items[].endpoint.namerequired | string | |
items[].idrequired | string | |
items[].minerequired | boolean | |
items[].priorityrequired | string | |
items[].referencerequired | string | |
items[].requesterNamerequired | string | |
items[].resolvedAt | string (date-time) or null | |
items[].staterequired | string | |
items[].statusNamerequired | string | |
items[].subjectrequired | string | |
items[].updatedAtrequired | string (date-time) | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets?mine=<mine>&page=<page>&pageSize=<pageSize>&q=<q>&state=<state>' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -b '__Host-portal_session=<portal-session>'# Sign in first. __Host-portal_session 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' = '<portal-csrf>' 'Accept' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets?mine=<mine>&page=<page>&pageSize=<pageSize>&q=<q>&state=<state>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets"params = { "mine": "<mine>", "page": "<page>", "pageSize": "<pageSize>", "q": "<q>", "state": "<state>",}headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets?mine=<mine>&page=<page>&pageSize=<pageSize>&q=<q>&state=<state>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets");url.searchParams.set("mine", "<mine>");url.searchParams.set("page", "<page>");url.searchParams.set("pageSize", "<pageSize>");url.searchParams.set("q", "<q>");url.searchParams.set("state", "<state>");
const response = await fetch(url, { method: "GET", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets?mine=<mine>&page=<page>&pageSize=<pageSize>&q=<q>&state=<state>");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/portal/v1/orgs/{clientID}/tickets
Section titled “POST /api/portal/v1/orgs/{clientID}/tickets”POSTportal:tickets:createportal facemsp
Source: [object Object]
createTicket opens a ticket for the member through the desk’s own create path: the requester is their linked person, else their address.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes |
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, TicketDetail | Created. |
400 | None | The request was refused. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:create. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
201 response body
| Field | Type | Description |
|---|---|---|
category | string or null | |
createdAtrequired | string (date-time) | |
endpoint | TicketEndpointView | TicketEndpointView is the device a ticket is about. |
endpoint.agentIdrequired | string | |
endpoint.namerequired | string | |
idrequired | string | |
messagesrequired | array of TicketMessageView | |
messages[].attachmentsrequired | array of TicketAttachmentView | |
messages[].attachments[].contentTyperequired | string | |
messages[].attachments[].downloadUrlrequired | string | |
messages[].attachments[].fileNamerequired | string | |
messages[].attachments[].idrequired | string | |
messages[].attachments[].sizeBytesrequired | integer | int64. |
messages[].authorKindrequired | string | |
messages[].authorNamerequired | string | |
messages[].bodyrequired | string | |
messages[].createdAtrequired | string (date-time) | |
messages[].idrequired | string | |
minerequired | boolean | |
priorityrequired | string | |
referencerequired | string | |
requesterNamerequired | string | |
resolvedAt | string (date-time) or null | |
staterequired | string | |
statusNamerequired | string | |
subjectrequired | string | |
updatedAtrequired | string (date-time) |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b '__Host-portal_session=<portal-session>' \ --data '"string"'# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
$headers = @{ 'X-Csrf-Token' = '<portal-csrf>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "__Host-portal_session": "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets";
const response = await fetch(url, { method: "POST", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-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/portal/v1/orgs/{clientID}/tickets/{ticketID}
Section titled “GET /api/portal/v1/orgs/{clientID}/tickets/{ticketID}”GETportal:tickets:read_ownportal facemspIdempotent
Source: [object Object]
Get ticket
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes | |
ticketID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TicketDetail | Success. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:read_own. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
category | string or null | |
createdAtrequired | string (date-time) | |
endpoint | TicketEndpointView | TicketEndpointView is the device a ticket is about. |
endpoint.agentIdrequired | string | |
endpoint.namerequired | string | |
idrequired | string | |
messagesrequired | array of TicketMessageView | |
messages[].attachmentsrequired | array of TicketAttachmentView | |
messages[].attachments[].contentTyperequired | string | |
messages[].attachments[].downloadUrlrequired | string | |
messages[].attachments[].fileNamerequired | string | |
messages[].attachments[].idrequired | string | |
messages[].attachments[].sizeBytesrequired | integer | int64. |
messages[].authorKindrequired | string | |
messages[].authorNamerequired | string | |
messages[].bodyrequired | string | |
messages[].createdAtrequired | string (date-time) | |
messages[].idrequired | string | |
minerequired | boolean | |
priorityrequired | string | |
referencerequired | string | |
requesterNamerequired | string | |
resolvedAt | string (date-time) or null | |
staterequired | string | |
statusNamerequired | string | |
subjectrequired | string | |
updatedAtrequired | string (date-time) |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -b '__Host-portal_session=<portal-session>'# Sign in first. __Host-portal_session 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' = '<portal-csrf>' 'Accept' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>";
const response = await fetch(url, { method: "GET", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/attachments
Section titled “POST /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/attachments”POSTportal:tickets:createportal facemsp
Source: [object Object]
uploadTicketAttachment takes one file as the raw body (?fileName=, and ?messageId= naming the reply it rides on, required), with the console’s ceiling and storage pipeline.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes | |
ticketID | path | string | Yes | |
fileName | query | string | No | |
messageId | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, TicketAttachmentView | Created. |
400 | None | The request was refused. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:create. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
201 response body
| Field | Type | Description |
|---|---|---|
contentTyperequired | string | |
downloadUrlrequired | string | |
fileNamerequired | string | |
idrequired | string | |
sizeBytesrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments?fileName=<fileName>&messageId=<messageId>' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -b '__Host-portal_session=<portal-session>'# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
$headers = @{ 'X-Csrf-Token' = '<portal-csrf>' 'Accept' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments?fileName=<fileName>&messageId=<messageId>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments"params = { "fileName": "<fileName>", "messageId": "<messageId>",}headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.post(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments?fileName=<fileName>&messageId=<messageId>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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 = new URL("https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments");url.searchParams.set("fileName", "<fileName>");url.searchParams.set("messageId", "<messageId>");
const response = await fetch(url, { method: "POST", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments?fileName=<fileName>&messageId=<messageId>");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/attachments/{attachmentID}
Section titled “GET /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/attachments/{attachmentID}”GETportal:tickets:read_ownportal facemspIdempotentdownloadNot fully resolved
What this page does not know
- response
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
downloadTicketAttachment streams a file on a public reply of a ticket the member may see.
Always a download, never rendered: a generic type, attachment disposition and nosniff, as on the console.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
attachmentID | path | string | Yes | |
clientID | path | string | Yes | |
ticketID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:read_own. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -b '__Host-portal_session=<portal-session>'# Sign in first. __Host-portal_session 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' = '<portal-csrf>' 'Accept' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>";
const response = await fetch(url, { method: "GET", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/attachments/<attachmentID>");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/replies
Section titled “POST /api/portal/v1/orgs/{clientID}/tickets/{ticketID}/replies”POSTportal:tickets:createportal facemsp
Source: [object Object]
replyToTicket posts a public reply from the member.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes | |
ticketID | path | string | Yes |
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, TicketMessageView | Created. |
400 | None | The request was refused. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:create. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
201 response body
| Field | Type | Description |
|---|---|---|
attachmentsrequired | array of TicketAttachmentView | |
attachments[].contentTyperequired | string | |
attachments[].downloadUrlrequired | string | |
attachments[].fileNamerequired | string | |
attachments[].idrequired | string | |
attachments[].sizeBytesrequired | integer | int64. |
authorKindrequired | string | |
authorNamerequired | string | |
bodyrequired | string | |
createdAtrequired | string (date-time) | |
idrequired | string |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b '__Host-portal_session=<portal-session>' \ --data '"string"'# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
$headers = @{ 'X-Csrf-Token' = '<portal-csrf>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "__Host-portal_session": "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies";
const response = await fetch(url, { method: "POST", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/<ticketID>/replies");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-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/portal/v1/orgs/{clientID}/tickets/options
Section titled “GET /api/portal/v1/orgs/{clientID}/tickets/options”GETportal:tickets:createportal facemspIdempotent
Source: [object Object]
ticketOptions is what the new-ticket form can choose from: categories, the priorities and the devices the member can see.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TicketOptions | Success. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold portal:tickets:create. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
categoriesrequired | array of TicketCategoryOption | |
categories[].coderequired | string | |
categories[].namerequired | string | |
categories[].subcategories | array of TicketCategoryOption | |
categories[].subcategories[].coderequired | string | |
categories[].subcategories[].namerequired | string | |
categories[].subcategories[].subcategories | array of TicketCategoryOption | |
endpointsrequired | array of TicketEndpointView | |
endpoints[].agentIdrequired | string | |
endpoints[].namerequired | string | |
maxAttachmentBytesrequired | integer | int64. |
prioritiesrequired | array of string |
Request samples
Section titled “Request samples”# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/options' \ -H 'X-Csrf-Token: <portal-csrf>' \ -H 'Accept: application/json' \ -b '__Host-portal_session=<portal-session>'# Sign in first. __Host-portal_session 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' = '<portal-csrf>' 'Accept' = 'application/json' 'Cookie' = '__Host-portal_session=<portal-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/portal/v1/orgs/<clientID>/tickets/options' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/options"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/options", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-Csrf-Token", "<portal-csrf>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "__Host-portal_session", Value: "<portal-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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/options";
const response = await fetch(url, { method: "GET", headers: { "X-Csrf-Token": "<portal-csrf>", "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. __Host-portal_session 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/portal/v1/orgs/<clientID>/tickets/options");request.Headers.TryAddWithoutValidation("X-Csrf-Token", "<portal-csrf>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "__Host-portal_session=<portal-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.