Depot portal oauth
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/ai-approvals/{approvalID}
Section titled “GET /api/portal/v1/ai-approvals/{approvalID}”GETportal facemspIdempotent
Source: [object Object]
Ai approval read
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
approvalID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, AIApprovalView | Success. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
createdAtrequired | string (date-time) | |
expiresAtrequired | string (date-time) | |
idrequired | string | |
statusrequired | string, one of approved, denied, expired, pending, used | |
summaryrequired | any | Arbitrary JSON. |
toolrequired | 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/ai-approvals/<approvalID>' \ -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/ai-approvals/<approvalID>' ` -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/ai-approvals/<approvalID>"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/ai-approvals/<approvalID>", 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/ai-approvals/<approvalID>";
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/ai-approvals/<approvalID>");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/ai-approvals/{approvalID}/approve
Section titled “POST /api/portal/v1/ai-approvals/{approvalID}/approve”POSTportal facemspNot fully resolved
What this page does not know
- handler-body
- 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]
Serve HTTP
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
approvalID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | None | Success. The body shape was not resolved; see x-outpost-unresolved. |
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.curl -X POST 'https://depot.example.com/api/portal/v1/ai-approvals/<approvalID>/approve' \ -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/ai-approvals/<approvalID>/approve' ` -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/ai-approvals/<approvalID>/approve"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.post(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.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/portal/v1/ai-approvals/<approvalID>/approve", 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 = "https://depot.example.com/api/portal/v1/ai-approvals/<approvalID>/approve";
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/ai-approvals/<approvalID>/approve");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/ai-approvals/{approvalID}/deny
Section titled “POST /api/portal/v1/ai-approvals/{approvalID}/deny”POSTportal facemsp
Source: [object Object]
Ai approval deny
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
approvalID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, AIApprovalView | Success. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
createdAtrequired | string (date-time) | |
expiresAtrequired | string (date-time) | |
idrequired | string | |
statusrequired | string, one of approved, denied, expired, pending, used | |
summaryrequired | any | Arbitrary JSON. |
toolrequired | 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/ai-approvals/<approvalID>/deny' \ -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/ai-approvals/<approvalID>/deny' ` -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/ai-approvals/<approvalID>/deny"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.post(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.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/portal/v1/ai-approvals/<approvalID>/deny", 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 = "https://depot.example.com/api/portal/v1/ai-approvals/<approvalID>/deny";
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/ai-approvals/<approvalID>/deny");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/me/connected-apps
Section titled “GET /api/portal/v1/me/connected-apps”GETportal facemspIdempotent
Source: [object Object]
connectedApps lists the person’s live AI connections across their organizations, newest first.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, array of ConnectedApp | Success. |
200 response body
| Field | Type | Description |
|---|---|---|
[].appNamerequired | string | |
[].connectedAtrequired | string (date-time) | |
[].expiresAtrequired | string (date-time) | |
[].idrequired | string | |
[].lastUsedAt | string (date-time) or null | |
[].orgIdrequired | string | |
[].orgNamerequired | string | |
[].softwareId | 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/me/connected-apps' \ -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/me/connected-apps' ` -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/me/connected-apps"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/me/connected-apps", 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/me/connected-apps";
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/me/connected-apps");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());DELETE /api/portal/v1/me/connected-apps/{appID}
Section titled “DELETE /api/portal/v1/me/connected-apps/{appID}”DELETEportal facemspIdempotent
Source: [object Object]
disconnectApp revokes one of the person’s AI connections and its tokens.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
appID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
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 DELETE 'https://depot.example.com/api/portal/v1/me/connected-apps/<appID>' \ -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 Delete ` -Uri 'https://depot.example.com/api/portal/v1/me/connected-apps/<appID>' ` -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/me/connected-apps/<appID>"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.delete(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.MethodDelete, "https://depot.example.com/api/portal/v1/me/connected-apps/<appID>", 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/me/connected-apps/<appID>";
const response = await fetch(url, { method: "DELETE", 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.Delete, "https://depot.example.com/api/portal/v1/me/connected-apps/<appID>");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/oauth/requests/{requestID}
Section titled “GET /api/portal/v1/oauth/requests/{requestID}”GETportal facemspIdempotent
Source: [object Object]
Consent read
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
requestID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ConsentView | Success. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
appNamerequired | string | |
expiresAtrequired | string (date-time) | |
orgsrequired | array of OrgSummary | |
orgs[].clientIdrequired | string | |
orgs[].memberIdrequired | string | |
orgs[].namerequired | string | |
orgs[].statusrequired | string | |
redirectHostrequired | string | |
requestIdrequired | string | |
softwareId | 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/oauth/requests/<requestID>' \ -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/oauth/requests/<requestID>' ` -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/oauth/requests/<requestID>"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/oauth/requests/<requestID>", 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/oauth/requests/<requestID>";
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/oauth/requests/<requestID>");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/oauth/requests/{requestID}/approve
Section titled “POST /api/portal/v1/oauth/requests/{requestID}/approve”POSTportal facemsp
Source: [object Object]
Consent approve
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
requestID | 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 |
|---|---|---|
200 | application/json, ConsentResult | Success. |
400 | None | The request was refused. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
redirectUrlrequired | 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/oauth/requests/<requestID>/approve' \ -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/oauth/requests/<requestID>/approve' ` -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/oauth/requests/<requestID>/approve"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/oauth/requests/<requestID>/approve", 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/oauth/requests/<requestID>/approve";
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/oauth/requests/<requestID>/approve");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());POST /api/portal/v1/oauth/requests/{requestID}/deny
Section titled “POST /api/portal/v1/oauth/requests/{requestID}/deny”POSTportal facemsp
Source: [object Object]
Consent deny
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
requestID | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ConsentResult | Success. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
200 response body
| Field | Type | Description |
|---|---|---|
redirectUrlrequired | 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/oauth/requests/<requestID>/deny' \ -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/oauth/requests/<requestID>/deny' ` -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/oauth/requests/<requestID>/deny"headers = { "X-Csrf-Token": "<portal-csrf>", "Accept": "application/json",}cookies = { "__Host-portal_session": "<portal-session>",}
response = requests.post(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.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/portal/v1/oauth/requests/<requestID>/deny", 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 = "https://depot.example.com/api/portal/v1/oauth/requests/<requestID>/deny";
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/oauth/requests/<requestID>/deny");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.