Depot workflows
Registers the workflow routes.
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/workflows
Section titled “GET /api/v1/workflows”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
listWorkflows lists practice workflows and every client’s legacy rules.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
entity | 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. |
source | query | string | No | |
triggerKind | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowListView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of WorkflowView | |
items[].actions24hrequired | integer | |
items[].client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
items[].client.idrequired | string | |
items[].client.namerequired | string | |
items[].createdAtrequired | string (date-time) | |
items[].definitionrequired | any | Arbitrary JSON. |
items[].descriptionrequired | string | |
items[].enabledrequired | boolean | |
items[].idrequired | string | |
items[].issuesrequired | array of WorkflowIssue | |
items[].issues[].clientsrequired | array of string | |
items[].issues[].coderequired | string | |
items[].issues[].messagerequired | string | |
items[].issues[].path | string | |
items[].lastRunAt | string (date-time) or null | |
items[].namerequired | string | |
items[].nextRunAt | string (date-time) or null | |
items[].pausedAt | string (date-time) or null | |
items[].pausedReason | string or null | |
items[].presetKey | string or null | |
items[].rowVersionrequired | integer | int64. |
items[].runOrderrequired | integer | |
items[].scoperequired | WorkflowScopeView | |
items[].scope.clientsrequired | array of WorkflowRef | |
items[].scope.clients[].idrequired | string | |
items[].scope.clients[].namerequired | string | |
items[].scope.moderequired | string, one of all, except, only | |
items[].sourcerequired | string | |
items[].statusrequired | string, one of needs_attention, off, on, paused | |
items[].triggerKindrequired | string | |
items[].updatedAtrequired | string (date-time) | |
items[].updatedBy | string or null | |
pagerequired | integer | |
pageSizerequired | integer | |
pausedrequired | boolean | |
totalrequired | integer | |
unavailableClientsrequired | array of WorkflowRef | |
unavailableClients[].idrequired | string | |
unavailableClients[].namerequired | 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/workflows?entity=<entity>&page=0&pageSize=0&q=<q>&source=<source>&triggerKind=<triggerKind>' \ -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/workflows?entity=<entity>&page=0&pageSize=0&q=<q>&source=<source>&triggerKind=<triggerKind>' ` -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/workflows"params = { "entity": "<entity>", "page": "0", "pageSize": "0", "q": "<q>", "source": "<source>", "triggerKind": "<triggerKind>",}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/workflows?entity=<entity>&page=0&pageSize=0&q=<q>&source=<source>&triggerKind=<triggerKind>", 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/workflows");url.searchParams.set("entity", "<entity>");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("q", "<q>");url.searchParams.set("source", "<source>");url.searchParams.set("triggerKind", "<triggerKind>");
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/workflows?entity=<entity>&page=0&pageSize=0&q=<q>&source=<source>&triggerKind=<triggerKind>");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/workflows
Section titled “POST /api/v1/workflows”POSTautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Create workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
entity | query | string | No |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | any | Arbitrary JSON. |
description | string or null | |
enabled | boolean or null | |
name | string or null | |
runOrder | integer or null | |
scope | WorkflowScopeInput | |
scope.clientIdsrequired | array of string | |
scope.moderequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, WorkflowSaveView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
conflictsrequired | array of WorkflowConflict | |
conflicts[].fieldrequired | string | |
conflicts[].messagerequired | string | |
conflicts[].workflowIdrequired | string | |
conflicts[].workflowNamerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | string or null |
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/workflows?entity=<entity>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "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 = @'{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/workflows?entity=<entity>' ` -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/workflows"params = { "entity": "<entity>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": "string", "description": "string", "enabled": False, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string", ], "mode": "string", },}
response = requests.post(url, params=params, 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(`{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/workflows?entity=<entity>", 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 = new URL("https://depot.example.com/api/v1/workflows");url.searchParams.set("entity", "<entity>");
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({ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "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 = """{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/workflows?entity=<entity>");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/workflows/{workflowID}
Section titled “GET /api/v1/workflows/{workflowID}”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Get workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | 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 GET 'https://depot.example.com/api/v1/workflows/<workflowID>' \ -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/workflows/<workflowID>' ` -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/workflows/<workflowID>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/workflows/<workflowID>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/workflows/<workflowID>";
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/workflows/<workflowID>");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());PATCH /api/v1/workflows/{workflowID}
Section titled “PATCH /api/v1/workflows/{workflowID}”PATCHautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Update workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | any | Arbitrary JSON. |
description | string or null | |
enabled | boolean or null | |
name | string or null | |
runOrder | integer or null | |
scope | WorkflowScopeInput | |
scope.clientIdsrequired | array of string | |
scope.moderequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowSaveView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
conflictsrequired | array of WorkflowConflict | |
conflicts[].fieldrequired | string | |
conflicts[].messagerequired | string | |
conflicts[].workflowIdrequired | string | |
conflicts[].workflowNamerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | string or null |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X PATCH 'https://depot.example.com/api/v1/workflows/<workflowID>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "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 = @'{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}'@
$response = Invoke-RestMethod ` -Method Patch ` -Uri 'https://depot.example.com/api/v1/workflows/<workflowID>' ` -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/workflows/<workflowID>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": "string", "description": "string", "enabled": False, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string", ], "mode": "string", },}
response = requests.patch(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(`{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}`)
req, err := http.NewRequest(http.MethodPatch, "https://depot.example.com/api/v1/workflows/<workflowID>", 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/workflows/<workflowID>";
const response = await fetch(url, { method: "PATCH", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "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 = """{ "definition": "string", "description": "string", "enabled": false, "name": "string", "runOrder": 0, "scope": { "clientIds": [ "string" ], "mode": "string" }}""";
var request = new HttpRequestMessage(HttpMethod.Patch, "https://depot.example.com/api/v1/workflows/<workflowID>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/workflows/{workflowID}
Section titled “DELETE /api/v1/workflows/{workflowID}”DELETEautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Delete workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/workflows/<workflowID>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/workflows/<workflowID>' ` -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/workflows/<workflowID>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/workflows/<workflowID>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/workflows/<workflowID>";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/workflows/<workflowID>");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/workflows/{workflowID}/duplicate
Section titled “POST /api/v1/workflows/{workflowID}/duplicate”POSTautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Duplicate workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, WorkflowSaveView | Created. |
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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
conflictsrequired | array of WorkflowConflict | |
conflicts[].fieldrequired | string | |
conflicts[].messagerequired | string | |
conflicts[].workflowIdrequired | string | |
conflicts[].workflowNamerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | string or null |
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/workflows/<workflowID>/duplicate' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/workflows/<workflowID>/duplicate' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/workflows/<workflowID>/duplicate"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/workflows/<workflowID>/duplicate", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/workflows/<workflowID>/duplicate";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/workflows/<workflowID>/duplicate");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/workflows/{workflowID}/resume
Section titled “POST /api/v1/workflows/{workflowID}/resume”POSTautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Resume workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | string or null |
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/workflows/<workflowID>/resume' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/workflows/<workflowID>/resume' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/workflows/<workflowID>/resume"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/workflows/<workflowID>/resume", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/workflows/<workflowID>/resume";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/workflows/<workflowID>/resume");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/workflows/{workflowID}/runs
Section titled “GET /api/v1/workflows/{workflowID}/runs”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
List workflow runs
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
workflowID | path | string | Yes | A uuid. |
client | query | string | No | |
outcome | 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, PagedResultOppWorkflowRunView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches that id. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of OppWorkflowRunView | |
items[].errorrequired | string | |
items[].occurredAtrequired | string (date-time) | |
items[].opportunityId | string or null | |
items[].opportunityName | string or null | |
items[].outcomerequired | string | |
items[].pathrequired | any | Arbitrary JSON. |
items[].publicIdrequired | string | |
items[].reason | string or null | |
items[].trigger | string or null | |
items[].workflowIdrequired | string | |
items[].workflowNamerequired | string | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/workflows/<workflowID>/runs?client=<client>&outcome=<outcome>&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/workflows/<workflowID>/runs?client=<client>&outcome=<outcome>&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/workflows/<workflowID>/runs"params = { "client": "<client>", "outcome": "<outcome>", "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/workflows/<workflowID>/runs?client=<client>&outcome=<outcome>&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/workflows/<workflowID>/runs");url.searchParams.set("client", "<client>");url.searchParams.set("outcome", "<outcome>");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/workflows/<workflowID>/runs?client=<client>&outcome=<outcome>&page=0&pageSize=0");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/workflows/library
Section titled “GET /api/v1/workflows/library”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
List workflow library
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
entity | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowLibraryView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of WorkflowPresetView | |
items[].definitionrequired | any | Arbitrary JSON. |
items[].descriptionrequired | string | |
items[].installedrequired | boolean | |
items[].keyrequired | string | |
items[].namerequired | string | |
items[].triggerKindrequired | string | |
items[].usesAirequired | boolean |
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/workflows/library?entity=<entity>' \ -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/workflows/library?entity=<entity>' ` -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/workflows/library"params = { "entity": "<entity>",}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/workflows/library?entity=<entity>", 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/workflows/library");url.searchParams.set("entity", "<entity>");
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/workflows/library?entity=<entity>");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/workflows/library/{key}/install
Section titled “POST /api/v1/workflows/library/{key}/install”POSTautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Install workflow preset
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
name | string or null | |
scope | WorkflowScopeInput | |
scope.clientIdsrequired | array of string | |
scope.moderequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, WorkflowSaveView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No library workflow has that key. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
actions24hrequired | integer | |
client | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
client.idrequired | string | |
client.namerequired | string | |
conflictsrequired | array of WorkflowConflict | |
conflicts[].fieldrequired | string | |
conflicts[].messagerequired | string | |
conflicts[].workflowIdrequired | string | |
conflicts[].workflowNamerequired | string | |
createdAtrequired | string (date-time) | |
definitionrequired | any | Arbitrary JSON. |
descriptionrequired | string | |
enabledrequired | boolean | |
idrequired | string | |
issuesrequired | array of WorkflowIssue | |
issues[].clientsrequired | array of string | |
issues[].coderequired | string | |
issues[].messagerequired | string | |
issues[].path | string | |
lastRunAt | string (date-time) or null | |
namerequired | string | |
nextRunAt | string (date-time) or null | |
pausedAt | string (date-time) or null | |
pausedReason | string or null | |
presetKey | string or null | |
rowVersionrequired | integer | int64. |
runOrderrequired | integer | |
scoperequired | WorkflowScopeView | |
scope.clientsrequired | array of WorkflowRef | |
scope.clients[].idrequired | string | |
scope.clients[].namerequired | string | |
scope.moderequired | string, one of all, except, only | |
sourcerequired | string | |
statusrequired | string, one of needs_attention, off, on, paused | |
triggerKindrequired | string | |
updatedAtrequired | string (date-time) | |
updatedBy | string or null |
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/workflows/library/<key>/install' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "name": "string", "scope": { "clientIds": [ "string" ], "mode": "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 = @'{ "name": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/workflows/library/<key>/install' ` -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/workflows/library/<key>/install"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "name": "string", "scope": { "clientIds": [ "string", ], "mode": "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(`{ "name": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/workflows/library/<key>/install", 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/workflows/library/<key>/install";
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({ "name": "string", "scope": { "clientIds": [ "string" ], "mode": "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 = """{ "name": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/workflows/library/<key>/install");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/workflows/references
Section titled “GET /api/v1/workflows/references”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Get workflow references
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clients | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowReferencesView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
groupsrequired | array of WorkflowNamedRefView | |
groups[].missingInrequired | array of string | |
groups[].namerequired | string | |
queuesrequired | array of WorkflowNamedRefView | |
queues[].missingInrequired | array of string | |
queues[].namerequired | string | |
schedulesrequired | array of WorkflowNamedRefView | |
schedules[].missingInrequired | array of string | |
schedules[].namerequired | string | |
statusesrequired | array of WorkflowNamedRefView | |
statuses[].missingInrequired | array of string | |
statuses[].namerequired | string | |
templatesrequired | array of WorkflowNamedRefView | |
templates[].missingInrequired | array of string | |
templates[].namerequired | string | |
unavailableClientsrequired | array of WorkflowRef | |
unavailableClients[].idrequired | string | |
unavailableClients[].namerequired | 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/workflows/references?clients=<clients>' \ -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/workflows/references?clients=<clients>' ` -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/workflows/references"params = { "clients": "<clients>",}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/workflows/references?clients=<clients>", 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/workflows/references");url.searchParams.set("clients", "<clients>");
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/workflows/references?clients=<clients>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/workflows/registry
Section titled “GET /api/v1/workflows/registry”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Get workflow registry
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
entity | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowRegistryView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
airequired | WorkflowAIAvailability | |
ai.availablerequired | boolean | |
ai.linkrequired | string | |
ai.messagerequired | string | |
ai.reasonrequired | string | |
fieldsrequired | array of WorkflowFieldView | |
fields[].byNamerequired | boolean | |
fields[].enumrequired | array of string | |
fields[].kindrequired | string | |
fields[].labelrequired | string | |
fields[].namerequired | string | |
fields[].operatorsrequired | array of string | |
fields[].timeBasedrequired | boolean | |
fields[].writablerequired | boolean | |
limitsrequired | WorkflowLimitsView | |
limits.maxAiStepsrequired | integer | |
limits.maxDepthrequired | integer | |
limits.maxStepsrequired | integer | |
mspModerequired | boolean | |
placeholdersrequired | array of WorkflowPlaceholderView | |
placeholders[].aiOnlyrequired | boolean | |
placeholders[].tokenrequired | string | |
placeholders[].triggersrequired | array of string | |
recipientsrequired | object | |
rolesrequired | array of WorkflowRef | |
roles[].idrequired | string | |
roles[].namerequired | string | |
stepTypesrequired | object |
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/workflows/registry?entity=<entity>' \ -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/workflows/registry?entity=<entity>' ` -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/workflows/registry"params = { "entity": "<entity>",}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/workflows/registry?entity=<entity>", 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/workflows/registry");url.searchParams.set("entity", "<entity>");
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/workflows/registry?entity=<entity>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/workflows/settings
Section titled “GET /api/v1/workflows/settings”GETautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Get workflow settings
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowSettingsView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
maxActionsPerHourrequired | integer | |
maxClientEmailsPerTicketDayrequired | integer | |
pausedrequired | boolean | |
rowVersionrequired | integer | int64. |
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/workflows/settings' \ -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/workflows/settings' ` -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/workflows/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/workflows/settings", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/workflows/settings";
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/workflows/settings");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/workflows/settings
Section titled “PUT /api/v1/workflows/settings”PUTautomation:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Put workflow settings
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
maxActionsPerHourrequired | integer | |
maxClientEmailsPerTicketDayrequired | integer | |
pausedrequired | boolean | |
rowVersionrequired | integer | int64. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, WorkflowSettingsView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
maxActionsPerHourrequired | integer | |
maxClientEmailsPerTicketDayrequired | integer | |
pausedrequired | boolean | |
rowVersionrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/workflows/settings' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": false, "rowVersion": 0}'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": false, "rowVersion": 0}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/workflows/settings' ` -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/workflows/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": False, "rowVersion": 0,}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": false, "rowVersion": 0}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/workflows/settings", 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/workflows/settings";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": false, "rowVersion": 0 }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "maxActionsPerHour": 0, "maxClientEmailsPerTicketDay": 0, "paused": false, "rowVersion": 0}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/workflows/settings");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());POST /api/v1/workflows/test
Section titled “POST /api/v1/workflows/test”POSTautomation:manageshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
Test workflow
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
entity | query | string | No |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | any | Arbitrary JSON. |
opportunityIdrequired | string | |
scope | WorkflowScopeInput | |
scope.clientIdsrequired | array of string | |
scope.moderequired | string | |
sourcerequired | string | |
workflowIdrequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, OppWorkflowTestView | 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 automation:manage. |
404 | application/problem+json, ProblemDetails | No resource matches. |
422 | application/problem+json, ProblemDetails | Opportunity workflows run on the sales pipeline, which only an MSP practice has. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no practice database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
entityrequired | string | |
matchesrequired | array of OppTestMatchView | |
matches[].activitiesrequired | array of string | |
matches[].aiStep | string or null | |
matches[].changesrequired | array of WorkflowChangeView | |
matches[].changes[].fieldrequired | string | |
matches[].changes[].fromrequired | string | |
matches[].changes[].torequired | string | |
matches[].emailsrequired | array of string | |
matches[].missingrequired | array of MissingRef | |
matches[].missing[].namerequired | string | |
matches[].missing[].steprequired | string | |
matches[].opportunityrequired | WorkflowRef | workflowRef is any named thing the console shows: a client, a user, a role. |
matches[].opportunity.idrequired | string | |
matches[].opportunity.namerequired | string | |
matches[].pathrequired | array of string | |
matches[].recipientsrequired | array of WorkflowRecipientView | |
matches[].recipients[].kindrequired | string | |
matches[].recipients[].labelrequired | string | |
matches[].recipients[].missingrequired | boolean | |
matches[].skipped | string or null | |
matches[].wouldCreaterequired | array of string | |
totalMatchedrequired | integer | |
truncatedrequired | boolean |
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/workflows/test?entity=<entity>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }, "source": "string", "workflowId": "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 = @'{ "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }, "source": "string", "workflowId": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/workflows/test?entity=<entity>' ` -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/workflows/test"params = { "entity": "<entity>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string", ], "mode": "string", }, "source": "string", "workflowId": "string",}
response = requests.post(url, params=params, 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(`{ "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }, "source": "string", "workflowId": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/workflows/test?entity=<entity>", 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 = new URL("https://depot.example.com/api/v1/workflows/test");url.searchParams.set("entity", "<entity>");
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({ "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }, "source": "string", "workflowId": "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 = """{ "definition": "string", "opportunityId": "string", "scope": { "clientIds": [ "string" ], "mode": "string" }, "source": "string", "workflowId": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/workflows/test?entity=<entity>");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.