Schemas
Every request and response type of the HTTP API, with its fields. Each endpoint page links the types it uses.
TL;DR
| Question | Answer |
|---|---|
| What is a schema? | The shape of a JSON body: its fields, their types, and which are required. |
| Where do I find the one an endpoint uses? | On the endpoint page, whose request and response types link here. |
| Where is the machine-readable form? | GET /openapi.json returns every schema as OpenAPI 3.1 JSON Schema. |
| How many are there? | 507. |
HealthResponse
Liveness answer.
| Field | Type | Required | Description |
|---|---|---|---|
status | "ok" | yes | |
version | string | yes | Package version of the running service. |
kinds | string[] | yes | Diagram kinds this build can render. |
Accepted
| Field | Type | Required | Description |
|---|---|---|---|
accepted | true | yes |
ErrorResponse
Standard error envelope used by every failing response.
| Field | Type | Required | Description |
|---|---|---|---|
error | true | yes | Always true, so clients can branch without reading the status. |
errorCode | string | yes | Stable snake_case key such as validation.failed or diagram.invalid. |
message | string | yes | Safe, human-readable summary. |
details | any | no | Validation issues or diagnostics, JSON-safe. |
requestId | string | no | Trace id for correlating with logs. |
RequestCodeBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
turnstileToken | string | no | The token the Cloudflare Turnstile widget on the sign-in page gave. Required when the server has a Turnstile secret. at most 2048 characters. |
VerifyResponse
| Field | Type | Required | Description |
|---|
SignInResponse
| Field | Type | Required | Description |
|---|---|---|---|
user | Account | yes | |
user.id | string | yes | |
user.email | string | yes |
Account
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
email | string | yes |
TwoFactorStep
| Field | Type | Required | Description |
|---|---|---|---|
twoFactor | object | yes | |
twoFactor.challenge | string | yes | Send it back with the code. It lives ten minutes and takes five wrong codes. |
twoFactor.expiresAt | integer | yes | When the step ends, in milliseconds since the epoch. |
VerifyCodeBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
code | string | yes | pattern ^\d{6}$. |
TwoFactorSignInBody
| Field | Type | Required | Description |
|---|---|---|---|
challenge | string | yes | pattern ^[0-9a-f]{64}$. |
code | string | no | The six digits the authenticator app shows now. pattern ^\d{6}$. |
recoveryCode | string | no | One of the recovery codes made when two-step sign-in was turned on. Each works once. at least 10 characters; at most 32 characters. |
SsoDiscover
| Field | Type | Required | Description |
|---|---|---|---|
sso | boolean | yes | True when the address's domain signs in through an organisation's identity provider. Names no organisation. |
SsoDiscoverBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
SsoStart
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | The identity provider's authorization address to send the browser to. |
SsoStartBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
returnTo | string | no | Where to send the browser after signing in. Kept only when its origin is one of Plotwork's; otherwise the portal. at most 2000 characters. |
turnstileToken | string | no | The token the Cloudflare Turnstile widget on the sign-in page gave. Required when the server has a Turnstile secret. at most 2048 characters. |
SsoIssuerDocument
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | |
jwks_uri | string | yes | |
response_types_supported | string[] | yes | |
subject_types_supported | string[] | yes | |
id_token_signing_alg_values_supported | string[] | yes |
SsoJwks
| Field | Type | Required | Description |
|---|---|---|---|
keys | SsoPublicJwk[] | yes | |
keys[].kty | "RSA" | yes | |
keys[].n | string | yes | The modulus, base64url. |
keys[].e | string | yes | The public exponent, base64url. |
keys[].kid | string | yes | The key id: the key's RFC 7638 thumbprint. |
keys[].alg | "RS256" | yes | |
keys[].use | "sig" | yes |
SsoPublicJwk
| Field | Type | Required | Description |
|---|---|---|---|
kty | "RSA" | yes | |
n | string | yes | The modulus, base64url. |
e | string | yes | The public exponent, base64url. |
kid | string | yes | The key id: the key's RFC 7638 thumbprint. |
alg | "RS256" | yes | |
use | "sig" | yes |
ConnectorIssuerDocument
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | The federated credential's Issuer, exactly. |
jwks_uri | string | yes | |
response_types_supported | string[] | yes | |
subject_types_supported | string[] | yes | |
id_token_signing_alg_values_supported | string[] | yes | |
claims_supported | string[] | yes |
ConnectorJwks
| Field | Type | Required | Description |
|---|---|---|---|
keys | object[] | yes | |
keys[].kty | "RSA" | yes | |
keys[].n | string | yes | The modulus, base64url. |
keys[].e | string | yes | The public exponent, base64url. |
keys[].kid | string | yes | The key id: the key's RFC 7638 thumbprint. |
keys[].alg | "RS256" | yes | |
keys[].use | "sig" | yes |
OidcToken
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | A Plotwork token, pwo_ and 64 hex characters. Send it as X-API-Key or Authorization: Bearer. Never stored by Plotwork, only its hash. |
tokenType | "Bearer" | yes | |
expiresAt | integer | yes | When it stops working, in milliseconds since the epoch. |
expiresIn | integer | yes | Seconds until it stops working. |
organization | object | yes | |
organization.id | string | yes | |
organization.slug | string | yes | |
organization.name | string | yes | |
publisher | object | yes | |
publisher.id | string | yes | |
publisher.name | string | yes | |
permissions | ("diagrams" | "drift:write")[] | yes | diagrams: publish to the organisation's library (and read it and the style rules). drift:write: report drift runs to the Drift tab and read the style rules. |
OidcTokenBody
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | The job's ID token: a GitHub Actions token asked for with this API's origin as the audience, an Azure Pipelines token from System.OidcRequestUri, or a GitLab CI/CD token the job names in id_tokens with this API's origin as aud. at least 1 character; at most 16384 characters. |
organization | string | no | The organisation to sign in to, by slug or id. Needed only when several organisations trust the run. at least 1 character; at most 64 characters. |
AccountProfile
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
email | string | yes | |
name | string | null | yes | The name the account is shown by, or null for none. |
createdAt | integer | yes | When the account was made, in milliseconds since the epoch. |
ApiKeyList
| Field | Type | Required | Description |
|---|---|---|---|
items | ApiKeySummary[] | yes | |
items[].id | string | yes | |
items[].name | string | yes | |
items[].prefix | string | yes | |
items[].last4 | string | yes | |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
items[].revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
ApiKeySummary
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
prefix | string | yes | |
last4 | string | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
CreatedApiKey
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
prefix | string | yes | |
last4 | string | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
key | string | yes | The full key. When revealable is false this is the only time it is shown, so store it now. |
CreateApiKeyBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 60 characters; pattern \S. |
RevealedApiKey
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
key | string | yes | The full key. |
Approval
| Field | Type | Required | Description |
|---|---|---|---|
approval | string | yes | The signed approval. It carries the connection key sealed, so it is safe in an address. |
expiresIn | integer | yes | Seconds the approval stays usable. |
redirectTo | string | yes | Where to send the browser: the MCP server callback with the request and the approval already attached. |
ApproveConnectionBody
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | The signed authorization request, exactly as the MCP server put it in the address. at least 1 character; at most 6144 characters. |
organisation | string | no | Connect the agent to this organisation, by its id, instead of your own account. Any role but reader may. The agent then works in the organisation's library as you, with the diagram permissions your role has and nothing more, and its calls count toward your own daily allowance. |
Denial
| Field | Type | Required | Description |
|---|---|---|---|
redirectTo | string | yes | Where to send the browser: the MCP server callback with the request and error=access_denied attached. |
DenyConnectionBody
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | The signed authorization request, exactly as the MCP server put it in the address. at least 1 character; at most 6144 characters. |
McpRequestState
| Field | Type | Required | Description |
|---|---|---|---|
state | "open" | "used" | "expired" | "invalid" | yes | open: it can be approved or denied. used: it was approved or denied already, by any account; each sign-in link works once. expired: its ten minutes are over. invalid: the MCP server did not sign it. |
expiresIn | integer | null | yes | For open, the seconds until it stops being good. Null otherwise. |
ConnectableAccounts
| Field | Type | Required | Description |
|---|---|---|---|
personal | object | yes | |
personal.allowed | boolean | yes | False when an organisation you belong to asks that agents connect to it, and your address is on one of its verified domains. |
personal.requiredBy | object[] | yes | The organisations that ask it. Empty when allowed is true. |
personal.requiredBy[].id | string | yes | |
personal.requiredBy[].slug | string | yes | |
personal.requiredBy[].name | string | yes | |
organisations | object[] | yes | The organisations where your role may publish (every role but reader), so an agent can be connected to them. Ordered by name. |
organisations[].id | string | yes | |
organisations[].slug | string | yes | |
organisations[].name | string | yes | |
organisations[].role | "owner" | "admin" | "member" | "reader" | yes | |
organisations[].agentAllowed | boolean | yes | False when the organisation allows only approved agents ("Only approved agents can connect") and the agent named by request is not one of them, or an organisation that holds you to organisation connections has not approved it. True when no request was sent. |
ConnectionList
| Field | Type | Required | Description |
|---|---|---|---|
items | Connection[] | yes | |
items[].id | string | yes | |
items[].clientId | string | yes | The OAuth client id the agent registered with. |
items[].clientName | string | yes | The name the agent gave itself when it registered. It is a claim, not a fact. |
items[].connectedAt | integer | yes | Milliseconds since the epoch. |
items[].lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if the agent has not made a call. |
items[].organisation | ConnectionOrganisation | yes | The organisation the agent was connected to, or null when it acts for your own account. |
items[].organisation.id | string | yes | |
items[].organisation.slug | string | yes | |
items[].organisation.name | string | yes |
Connection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
clientId | string | yes | The OAuth client id the agent registered with. |
clientName | string | yes | The name the agent gave itself when it registered. It is a claim, not a fact. |
connectedAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if the agent has not made a call. |
organisation | ConnectionOrganisation | yes | The organisation the agent was connected to, or null when it acts for your own account. |
organisation.id | string | yes | |
organisation.slug | string | yes | |
organisation.name | string | yes |
ConnectionOrganisation
The organisation the agent was connected to, or null when it acts for your own account.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
slug | string | yes | |
name | string | yes |
AppRequestState
| Field | Type | Required | Description |
|---|---|---|---|
state | "open" | "used" | "expired" | "invalid" | yes | |
expiresIn | integer | null | yes | Seconds left for an open link. |
app | object | null | yes | |
app.id | string | yes | The app's id, which is its OAuth client_id. |
app.name | string | yes | A claim, not a fact. |
app.homepage | string | null | yes | |
app.organisation | object | null | yes | The organisation that registered the app, or null for a person or for Plotwork. |
app.organisation.id | string | yes | |
app.organisation.slug | string | yes | |
app.organisation.name | string | yes | |
app.membersOnly | boolean | yes | |
app.madeByPlotwork | boolean | yes | True for Plotwork's own app, registered by Plotwork rather than by a person or an organisation. Its name is then a fact, not a claim. |
scopes | array | null | yes | |
redirectUri | string | null | yes | Where the app receives its code. Show its host. |
AppScope
diagrams:use computes (validate, draw, render, import), diagrams:publish publishes, library:read lists and shows the diagrams the account can see, profile reads the account id and name, email its address.
| Field | Type | Required | Description |
|---|
AppAccounts
| Field | Type | Required | Description |
|---|---|---|---|
personal | object | yes | |
personal.allowed | boolean | yes | |
organisations | object[] | yes | |
organisations[].id | string | yes | |
organisations[].slug | string | yes | |
organisations[].name | string | yes | |
organisations[].role | "owner" | "admin" | "member" | "reader" | yes | |
organisations[].appAllowed | boolean | yes | False when the organisation cannot take the app the request names; reason says why. True when no request was sent, or it did not verify: the approval checks again. |
organisations[].reason | "members_only" | "not_allowed" | null | yes | Why the organisation cannot take the app: members_only (another organisation registered it for its own members), not_allowed (the organisation's "Only approved apps can connect" does not list it). Null when it can. |
AppAnswer
| Field | Type | Required | Description |
|---|---|---|---|
redirectTo | string | yes | The app's redirect address with code (or error), state and iss. Navigate there. |
ApproveAppBody
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | The signed authorization request, exactly as the API put it in the consent page address. at least 1 character; at most 6144 characters. |
organisation | string | no | Connect the app to this organisation, by its id, instead of your own account. Any role but reader may; the app then acts in the organisation's library as you, with your role's diagram permissions. |
DenyAppBody
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | The signed authorization request, exactly as the API put it in the consent page address. at least 1 character; at most 6144 characters. |
RegisteredAppList
| Field | Type | Required | Description |
|---|---|---|---|
items | RegisteredApp[] | yes | |
items[].id | string | yes | The app's id, which is its OAuth client_id. |
items[].name | string | yes | Shown to people as a claim on the consent page. |
items[].homepage | string | null | yes | |
items[].clientType | "confidential" | "public" | yes | confidential holds a client secret on its server; public (a page or a tool with no server) holds none. |
items[].redirectUris | string[] | yes | |
items[].membersOnly | boolean | yes | For an organisation's app: only its members may connect it, to the organisation. |
items[].hasSecret | boolean | yes | |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].updatedAt | integer | yes | Milliseconds since the epoch. |
RegisteredApp
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The app's id, which is its OAuth client_id. |
name | string | yes | Shown to people as a claim on the consent page. |
homepage | string | null | yes | |
clientType | "confidential" | "public" | yes | confidential holds a client secret on its server; public (a page or a tool with no server) holds none. |
redirectUris | string[] | yes | |
membersOnly | boolean | yes | For an organisation's app: only its members may connect it, to the organisation. |
hasSecret | boolean | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
updatedAt | integer | yes | Milliseconds since the epoch. |
AppWithSecret
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The app's id, which is its OAuth client_id. |
name | string | yes | Shown to people as a claim on the consent page. |
homepage | string | null | yes | |
clientType | "confidential" | "public" | yes | confidential holds a client secret on its server; public (a page or a tool with no server) holds none. |
redirectUris | string[] | yes | |
membersOnly | boolean | yes | For an organisation's app: only its members may connect it, to the organisation. |
hasSecret | boolean | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
updatedAt | integer | yes | Milliseconds since the epoch. |
clientSecret | string | null | yes | The client secret (pws_...), shown once, or null for a public app. Store it on your server. |
NewAppBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 3 characters; at most 60 characters. |
homepage | string | null | no | An https address, shown as a claim. at most 2048 characters. |
clientType | "confidential" | "public" | yes | |
redirectUris | string[] | yes | One to ten addresses a code may be sent to, matched exactly: https, or http on localhost, 127.0.0.1 or [::1] with any port. |
AppChangeBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 3 characters; at most 60 characters. |
homepage | string | null | no | at most 2048 characters. |
redirectUris | string[] | no | One to ten addresses a code may be sent to, matched exactly: https, or http on localhost, 127.0.0.1 or [::1] with any port. |
AppConnectionList
| Field | Type | Required | Description |
|---|---|---|---|
items | AppConnection[] | yes | |
items[].id | string | yes | |
items[].app | object | yes | |
items[].app.id | string | yes | The app's id, which is its OAuth client_id. |
items[].app.name | string | yes | |
items[].app.homepage | string | null | yes | |
items[].scopes | AppScope[] | yes | |
items[].connectedAt | integer | yes | |
items[].lastUsedAt | integer | null | yes | |
items[].organisation | object | null | yes | |
items[].organisation.id | string | yes | |
items[].organisation.slug | string | yes | |
items[].organisation.name | string | yes |
AppConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
app | object | yes | |
app.id | string | yes | The app's id, which is its OAuth client_id. |
app.name | string | yes | |
app.homepage | string | null | yes | |
scopes | AppScope[] | yes | |
connectedAt | integer | yes | |
lastUsedAt | integer | null | yes | |
organisation | object | null | yes | |
organisation.id | string | yes | |
organisation.slug | string | yes | |
organisation.name | string | yes |
Usage
| Field | Type | Required | Description |
|---|---|---|---|
plan | "free" | "pro" | yes | The plan the account is on, which decides the limit. |
limit | integer | yes | Metered calls the account may make per UTC day, across every key and connected agent. |
used | integer | yes | Metered calls made today. minimum 0. |
remaining | integer | yes | Calls left today. Zero when the limit is used up. minimum 0. |
resetsAt | integer | yes | When the count goes back to zero (00:00 UTC), in milliseconds since the epoch. |
today | object | yes | Today's calls, split by how they reached the service. |
today.api | integer | yes | minimum 0. |
today.mcp | integer | yes | minimum 0. |
days | UsageDay[] | yes | The last 30 days, oldest first, ending today. A day with no calls is present with zeros. |
days[].day | string | yes | The UTC date, as YYYY-MM-DD. |
days[].api | integer | yes | REST API calls that day. minimum 0. |
days[].mcp | integer | yes | MCP tool calls that day. minimum 0. |
UsageDay
| Field | Type | Required | Description |
|---|---|---|---|
day | string | yes | The UTC date, as YYYY-MM-DD. |
api | integer | yes | REST API calls that day. minimum 0. |
mcp | integer | yes | MCP tool calls that day. minimum 0. |
UpdateProfileBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | yes | The name to be shown by, at most 80 characters once trimmed, with no line breaks. Empty or null clears it. at most 320 characters. |
EmailChangeBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
EmailVerifyBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | at least 3 characters; at most 254 characters. |
code | string | yes | pattern ^\d{6}$. |
EndedSessions
| Field | Type | Required | Description |
|---|---|---|---|
ended | integer | yes |
DeleteAccountBody
| Field | Type | Required | Description |
|---|---|---|---|
confirm | string | yes | at most 254 characters. |
Security
| Field | Type | Required | Description |
|---|---|---|---|
twoFactor | TwoFactorState | yes | |
twoFactor.enabled | boolean | yes | |
twoFactor.enabledAt | integer | null | yes | |
twoFactor.recoveryCodesLeft | integer | yes | |
twoFactor.requiredBy | object[] | yes | The organisations the account is in that require two-step sign-in. |
twoFactor.requiredBy[].slug | string | yes | |
twoFactor.requiredBy[].name | string | yes |
TwoFactorState
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
enabledAt | integer | null | yes | |
recoveryCodesLeft | integer | yes | |
requiredBy | object[] | yes | The organisations the account is in that require two-step sign-in. |
requiredBy[].slug | string | yes | |
requiredBy[].name | string | yes |
TwoFactorSetup
| Field | Type | Required | Description |
|---|---|---|---|
secret | string | yes | The shared secret in base32, for typing into an app that cannot scan. |
uri | string | yes | The otpauth:// address an authenticator app scans as a QR code. |
RecoveryCodes
| Field | Type | Required | Description |
|---|---|---|---|
recoveryCodes | string[] | yes |
TotpCodeBody
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | The six digits the authenticator app shows now. pattern ^\d{6}$. |
SecondFactorBody
| Field | Type | Required | Description |
|---|---|---|---|
code | string | no | The six digits the authenticator app shows now. pattern ^\d{6}$. |
recoveryCode | string | no | One of the recovery codes made when two-step sign-in was turned on. Each works once. at least 10 characters; at most 32 characters. |
AgentList
| Field | Type | Required | Description |
|---|---|---|---|
items | Agent[] | yes | |
items[].id | string | yes | |
items[].credential | "oauth" | "key" | yes | How it signs in: a browser sign-in (OAuth) or an API key in its settings. |
items[].name | string | yes | The connection's registered agent name, or the key's name. |
items[].agent | object | null | yes | What the agent called itself (clientInfo) when it last opened an MCP session, or null when it never has. |
items[].agent.name | string | yes | |
items[].agent.version | string | null | yes | |
items[].orgId | string | null | yes | |
items[].createdAt | integer | yes | |
items[].lastUsedAt | integer | null | yes | Its last call, to within five minutes. |
items[].sessionAt | integer | null | yes | When it last opened an MCP session. |
items[].expiresAt | integer | null | yes | |
items[].status | "live" | "ready" | "idle" | "waiting" | "blocked" | yes | live: a call in the last 15 minutes. ready: in the last 30 days. idle: earlier. waiting: never used. blocked: its next call would be refused, and blocked says why. |
items[].blocked | "expired" | "network" | "two_factor" | "membership" | "policy" | null | yes |
Agent
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
credential | "oauth" | "key" | yes | How it signs in: a browser sign-in (OAuth) or an API key in its settings. |
name | string | yes | The connection's registered agent name, or the key's name. |
agent | object | null | yes | What the agent called itself (clientInfo) when it last opened an MCP session, or null when it never has. |
agent.name | string | yes | |
agent.version | string | null | yes | |
orgId | string | null | yes | |
createdAt | integer | yes | |
lastUsedAt | integer | null | yes | Its last call, to within five minutes. |
sessionAt | integer | null | yes | When it last opened an MCP session. |
expiresAt | integer | null | yes | |
status | "live" | "ready" | "idle" | "waiting" | "blocked" | yes | live: a call in the last 15 minutes. ready: in the last 30 days. idle: earlier. waiting: never used. blocked: its next call would be refused, and blocked says why. |
blocked | "expired" | "network" | "two_factor" | "membership" | "policy" | null | yes |
AgentCheck
| Field | Type | Required | Description |
|---|---|---|---|
agent | Agent | yes | |
agent.id | string | yes | |
agent.credential | "oauth" | "key" | yes | How it signs in: a browser sign-in (OAuth) or an API key in its settings. |
agent.name | string | yes | The connection's registered agent name, or the key's name. |
agent.agent | object | null | yes | What the agent called itself (clientInfo) when it last opened an MCP session, or null when it never has. |
agent.agent.name | string | yes | |
agent.agent.version | string | null | yes | |
agent.orgId | string | null | yes | |
agent.createdAt | integer | yes | |
agent.lastUsedAt | integer | null | yes | Its last call, to within five minutes. |
agent.sessionAt | integer | null | yes | When it last opened an MCP session. |
agent.expiresAt | integer | null | yes | |
agent.status | "live" | "ready" | "idle" | "waiting" | "blocked" | yes | live: a call in the last 15 minutes. ready: in the last 30 days. idle: earlier. waiting: never used. blocked: its next call would be refused, and blocked says why. |
agent.blocked | "expired" | "network" | "two_factor" | "membership" | "policy" | null | yes | |
checks | object[] | yes | Every rule its next call would meet, in the order it meets them. |
checks[].id | "credential" | "expiry" | "network" | "organisation" | "two_factor" | "policy" | "allowance" | yes | |
checks[].ok | boolean | yes | |
remaining | integer | yes | Calls left today on the allowance it spends. |
checkedAt | integer | yes |
BillingState
| Field | Type | Required | Description |
|---|---|---|---|
plan | "free" | "pro" | yes | The plan the account gets right now. It is the free plan whenever the subscription is not paying, whatever plan was bought. |
status | string | yes | Stripe's status for the subscription (active, trialing, past_due, canceled, unpaid, incomplete, and so on), or none when the account never started one. |
currentPeriodEnd | integer | null | yes | When the period paid for ends, in milliseconds since the epoch, or null when there is no subscription. |
cancelAtPeriodEnd | boolean | yes | True while the subscription is scheduled to end at the close of the period already paid for. |
hasCustomer | boolean | yes | True once the account has billing details at Stripe, which is when the billing portal can be opened. |
BillingUrl
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | An address on Stripe's own site. Send the browser there; it expires, so do not store it. |
CheckoutBody
| Field | Type | Required | Description |
|---|---|---|---|
plan | "pro" | yes | The plan to subscribe to. pro is the only paid plan. |
VerifyCheckoutBody
| Field | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | The Checkout Session id Stripe put in the return address. pattern ^cs_[A-Za-z0-9_]{8,200}$. |
CancelBody
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | no | Why the person is cancelling, in their own words. Optional. Sent to Stripe as the cancellation comment; Plotwork does not store it. at most 500 characters. |
BillingDocumentList
| Field | Type | Required | Description |
|---|---|---|---|
items | BillingDocument[] | yes | |
items[].id | string | yes | The id to ask for the document and its PDF with. |
items[].kind | "invoice" | "receipt" | yes | A receipt is an invoice that has been paid; anything else is an invoice. |
items[].number | string | yes | The number printed on the document, which an accounts department quotes back. |
items[].description | string | yes | What it was for, such as the plan. Empty when Stripe names nothing. |
items[].currency | string | yes | The three-letter currency, in capitals. at least 3 characters; at most 3 characters. |
items[].totalCents | integer | yes | The total in whole cents (the currency's minor unit). |
items[].status | string | yes | The invoice's own word: paid, open, void, or uncollectible. A draft is never listed. |
items[].issuedAt | integer | yes | When it was issued, in milliseconds since the epoch. |
items[].paidAt | integer | null | yes | When it was paid, in milliseconds since the epoch, or null while it is not. |
items[].downloadable | boolean | yes | False when there is no PDF to fetch, so the PDF route would answer 404. |
BillingDocument
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The id to ask for the document and its PDF with. |
kind | "invoice" | "receipt" | yes | A receipt is an invoice that has been paid; anything else is an invoice. |
number | string | yes | The number printed on the document, which an accounts department quotes back. |
description | string | yes | What it was for, such as the plan. Empty when Stripe names nothing. |
currency | string | yes | The three-letter currency, in capitals. at least 3 characters; at most 3 characters. |
totalCents | integer | yes | The total in whole cents (the currency's minor unit). |
status | string | yes | The invoice's own word: paid, open, void, or uncollectible. A draft is never listed. |
issuedAt | integer | yes | When it was issued, in milliseconds since the epoch. |
paidAt | integer | null | yes | When it was paid, in milliseconds since the epoch, or null while it is not. |
downloadable | boolean | yes | False when there is no PDF to fetch, so the PDF route would answer 404. |
BillingDocumentDetail
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The id to ask for the document and its PDF with. |
kind | "invoice" | "receipt" | yes | A receipt is an invoice that has been paid; anything else is an invoice. |
number | string | yes | The number printed on the document, which an accounts department quotes back. |
description | string | yes | What it was for, such as the plan. Empty when Stripe names nothing. |
currency | string | yes | The three-letter currency, in capitals. at least 3 characters; at most 3 characters. |
totalCents | integer | yes | The total in whole cents (the currency's minor unit). |
status | string | yes | The invoice's own word: paid, open, void, or uncollectible. A draft is never listed. |
issuedAt | integer | yes | When it was issued, in milliseconds since the epoch. |
paidAt | integer | null | yes | When it was paid, in milliseconds since the epoch, or null while it is not. |
downloadable | boolean | yes | False when there is no PDF to fetch, so the PDF route would answer 404. |
lines | DocumentLine[] | yes | |
lines[].description | string | yes | |
lines[].quantity | integer | yes | minimum 1. |
lines[].amountCents | integer | yes | |
lines[].periodStart | integer | null | yes | The start of the service period, in milliseconds since the epoch, or null. |
lines[].periodEnd | integer | null | yes | The end of the service period, in milliseconds since the epoch, or null. |
subtotalCents | integer | null | yes | |
taxCents | integer | null | yes | The tax, or null when Stripe names none. |
amountPaidCents | integer | null | yes | |
billedTo | object | yes | |
billedTo.name | string | null | yes | |
billedTo.email | string | null | yes | |
issuer | object | null | yes | The Stripe account's business name and its tax numbers, from the invoice. There is no address: Stripe does not put one on an invoice. |
issuer.name | string | yes | |
issuer.lines | string[] | yes | |
paidWith | object | null | yes | The card the payment was taken from: its brand and last four digits, and nothing more of it. Null when it was not paid by card. |
paidWith.brand | string | yes | |
paidWith.last4 | string | yes | pattern ^\d{4}$. |
DocumentLine
| Field | Type | Required | Description |
|---|---|---|---|
description | string | yes | |
quantity | integer | yes | minimum 1. |
amountCents | integer | yes | |
periodStart | integer | null | yes | The start of the service period, in milliseconds since the epoch, or null. |
periodEnd | integer | null | yes | The end of the service period, in milliseconds since the epoch, or null. |
WebhookAck
| Field | Type | Required | Description |
|---|---|---|---|
received | true | yes | |
outcome | "handled" | "duplicate" | "ignored" | yes | handled when the event changed or confirmed an account, duplicate when it had been handled before, ignored when it is not about a Plotwork subscription. |
AgentBoardList
| Field | Type | Required | Description |
|---|---|---|---|
organization | object | yes | |
organization.id | string | yes | |
organization.slug | string | yes | |
organization.name | string | yes | |
boards | AgentBoardItem[] | yes | |
boards[].id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
boards[].name | string | yes | |
boards[].classification | "public" | "internal" | "confidential" | yes | |
boards[].role | "view" | "edit" | "manage" | yes | What the caller may do: view, edit, or manage. An agent has its member's role; a key the role every member gets. |
boards[].tabs | integer | yes | minimum 0. |
boards[].updatedAt | integer | yes | |
boards[].live | boolean | yes | True when someone opened the board in the last two minutes. |
total | integer | yes | How many boards matched, which can be more than the ones listed. minimum 0. |
AgentBoardItem
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
classification | "public" | "internal" | "confidential" | yes | |
role | "view" | "edit" | "manage" | yes | What the caller may do: view, edit, or manage. An agent has its member's role; a key the role every member gets. |
tabs | integer | yes | minimum 0. |
updatedAt | integer | yes | |
live | boolean | yes | True when someone opened the board in the last two minutes. |
AgentBoard
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
classification | "public" | "internal" | "confidential" | yes | |
role | "view" | "edit" | "manage" | yes | What the caller may do: view, edit, or manage. An agent has its member's role; a key the role every member gets. |
version | integer | yes | The version of the tab list: it moves when a tab is added, renamed, moved or deleted. |
url | string | yes | The board's address in the portal, for the person. |
tabs | AgentBoardTab[] | yes | |
tabs[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tabs[].name | string | yes | |
tabs[].kind | string | yes | |
tabs[].position | number | yes | |
tabs[].version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
tabs[].updatedAt | integer | yes | |
tabs[].updatedBy | string | yes | |
present | object[] | yes | Who is on the board now: people with it open, and agents that acted in the last two minutes. |
present[].label | string | yes | |
present[].kind | "person" | "agent" | yes | |
messages | BoardAgentMessage[] | yes | Messages the caller's person sent it on the board that it had not read, each given once. Answer each with reply_board_message. |
messages[].id | string | yes | |
messages[].at | integer | yes | |
messages[].from | string | yes | |
messages[].text | string | yes | |
messages[].tab | string | null | yes | |
messages[].tabName | string | null | yes | |
messages[].revision | string | null | yes | |
messages[].problems | BoardAgentProblem[] | yes | |
messages[].problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
messages[].problems[].severity | "error" | "warning" | yes | |
messages[].problems[].line | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].column | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].message | string | yes | at least 1 character; at most 500 characters. |
messages[].problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
AgentBoardTab
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
kind | string | yes | |
position | number | yes | |
version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
updatedAt | integer | yes | |
updatedBy | string | yes |
BoardAgentMessage
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
at | integer | yes | |
from | string | yes | |
text | string | yes | |
tab | string | null | yes | |
tabName | string | null | yes | |
revision | string | null | yes | |
problems | BoardAgentProblem[] | yes | |
problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
problems[].severity | "error" | "warning" | yes | |
problems[].line | integer | yes | minimum 1; maximum 1000000. |
problems[].column | integer | yes | minimum 1; maximum 1000000. |
problems[].message | string | yes | at least 1 character; at most 500 characters. |
problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
BoardAgentProblem
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | pattern ^[A-Z]\d{3,4}$. |
severity | "error" | "warning" | yes | |
line | integer | yes | minimum 1; maximum 1000000. |
column | integer | yes | minimum 1; maximum 1000000. |
message | string | yes | at least 1 character; at most 500 characters. |
hint | string | null | yes | at least 1 character; at most 500 characters. |
AgentBoardTabRead
| Field | Type | Required | Description |
|---|---|---|---|
tab | AgentBoardTab | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | |
tab.position | number | yes | |
tab.version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | |
source | string | yes | |
changesSince | BoardHistoryEntry[] | yes | |
changesSince[].version | integer | yes | |
changesSince[].type | string | yes | |
changesSince[].actor | BoardActor | yes | |
changesSince[].actor.kind | "person" | "agent" | "key" | yes | |
changesSince[].actor.label | string | yes | |
changesSince[].counts | object | yes | |
changesSince[].counts.added | integer | yes | |
changesSince[].counts.removed | integer | yes | |
changesSince[].counts.renamed | integer | yes | |
changesSince[].counts.moved | integer | yes | |
changesSince[].counts.changed | integer | yes | |
changesSince[].at | integer | yes | |
changesSince[].restorable | boolean | yes | |
svg | string | no | The picture, when asked for and the Engine could draw it. |
messages | BoardAgentMessage[] | yes | Messages the caller's person sent it on the board that it had not read, each given once. Answer each with reply_board_message. |
messages[].id | string | yes | |
messages[].at | integer | yes | |
messages[].from | string | yes | |
messages[].text | string | yes | |
messages[].tab | string | null | yes | |
messages[].tabName | string | null | yes | |
messages[].revision | string | null | yes | |
messages[].problems | BoardAgentProblem[] | yes | |
messages[].problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
messages[].problems[].severity | "error" | "warning" | yes | |
messages[].problems[].line | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].column | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].message | string | yes | at least 1 character; at most 500 characters. |
messages[].problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
BoardHistoryEntry
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | yes | |
type | string | yes | |
actor | BoardActor | yes | |
actor.kind | "person" | "agent" | "key" | yes | |
actor.label | string | yes | |
counts | object | yes | |
counts.added | integer | yes | |
counts.removed | integer | yes | |
counts.renamed | integer | yes | |
counts.moved | integer | yes | |
counts.changed | integer | yes | |
at | integer | yes | |
restorable | boolean | yes |
BoardActor
| Field | Type | Required | Description |
|---|---|---|---|
kind | "person" | "agent" | "key" | yes | |
label | string | yes |
AgentBoardWriteResult
| Field | Type | Required | Description |
|---|---|---|---|
changed | boolean | yes | False when the write changed nothing; nothing was stored. |
version | integer | yes | The tab's version now: the baseVersion of the next edit. |
tab | any | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | |
tab.position | number | yes | |
tab.version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | |
results | object[] | yes | |
results[].op | string | yes | |
results[].applied | boolean | yes | |
results[].lines | integer[] | yes | |
results[].message | string | yes | |
results[].hint | string | null | yes | |
changes | object[] | yes | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
warnings | Diagnostic[] | yes | |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
secrets | object | yes | |
secrets.count | integer | yes | |
secrets.kinds | string[] | yes |
Diagnostic
A located, actionable problem found in diagram source.
| Field | Type | Required | Description |
|---|---|---|---|
code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
message | string | yes | What is wrong, in one sentence. |
line | integer | yes | 1-based line in the submitted source. minimum 1. |
column | integer | yes | 1-based column in that line. minimum 1. |
length | integer | yes | Number of characters the problem covers. minimum 1. |
hint | string | null | yes | A concrete suggestion for fixing it, or null. |
fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
fix.label | string | yes | What the fix does, in a few words, for a button. |
fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
fix.edits[].line | integer | yes | 1-based line the edit starts on. minimum 1. |
fix.edits[].column | integer | yes | 1-based column it starts at. minimum 1. |
fix.edits[].length | integer | yes | Characters to replace from there, a line break counting one. minimum 0. |
fix.edits[].text | string | yes | What replaces them; empty deletes. |
FixEdit
Replace length characters from line:column with text.
| Field | Type | Required | Description |
|---|---|---|---|
line | integer | yes | 1-based line the edit starts on. minimum 1. |
column | integer | yes | 1-based column it starts at. minimum 1. |
length | integer | yes | Characters to replace from there, a line break counting one. minimum 0. |
text | string | yes | What replaces them; empty deletes. |
AgentEditBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
revision | string | no | A revision of the tab to change instead of main; baseVersion is then the revision's. at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
baseVersion | integer | yes | |
operations | object[] | no | |
operations[].op | "rename" | "set" | "add_node" | "remove" | "add_edge" | "remove_edge" | "move" | "replace_text" | yes | |
operations[].target | string | no | Id, label, table.column, or "header". at most 2000 characters. |
operations[].to | string | no | rename: the new name. Edges: the end. at most 2000 characters. |
operations[].from | string | no | Edges: the start. at most 2000 characters. |
operations[].option | string | no | at most 40 characters; pattern ^[a-z][A-Za-z0-9_-]*$. |
operations[].value | string | null | no | set: null removes the option. at most 2000 characters. |
operations[].id | string | no | at most 2000 characters. |
operations[].label | string | no | add_edge on sankey: the amount. at most 2000 characters. |
operations[].type | string | no | add_node: node type, or statement word (c4 person, tree dir). at most 2000 characters. |
operations[].options | object | no | |
operations[].statement | string | no | add_node: the whole line, for a kind with no plain node statement. at most 2000 characters. |
operations[].into | string | null | no | A block; null is the top level. at most 2000 characters. |
operations[].after | string | no | at most 2000 characters. |
operations[].arrow | "<-->" | "-->" | "<->" | "..>" | "->" | "--" | no | |
operations[].find | string | no | at most 2000 characters. |
operations[].replace | string | no | at most 2000 characters. |
operations[].all | boolean | no | |
source | string | no | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
AgentImportToBoardResult
| Field | Type | Required | Description |
|---|---|---|---|
changed | boolean | yes | False when the write changed nothing; nothing was stored. |
version | integer | yes | The tab's version now: the baseVersion of the next edit. |
tab | any | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | |
tab.position | number | yes | |
tab.version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | |
results | object[] | yes | |
results[].op | string | yes | |
results[].applied | boolean | yes | |
results[].lines | integer[] | yes | |
results[].message | string | yes | |
results[].hint | string | null | yes | |
changes | object[] | yes | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
warnings | Diagnostic[] | yes | |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
secrets | object | yes | |
secrets.count | integer | yes | |
secrets.kinds | string[] | yes | |
diagnostics | object[] | yes | What the reader or converter left out or could not read, each with a hint. |
diagnostics[].code | string | yes | |
diagnostics[].message | string | yes | |
diagnostics[].hint | string | null | no |
AgentImportToBoardBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 1 character; at most 60 characters. |
after | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
from | object | object | object | object | object | object | object | object | yes | The file, picture or text is read in memory; only the diagram made from it is kept, in the new tab. |
AgentSaveBoardTabResult
| Field | Type | Required | Description |
|---|---|---|---|
diagram | object | yes | |
diagram.id | string | yes | |
diagram.name | string | null | yes | |
diagram.version | integer | yes | |
status | "saved" | "held" | "unchanged" | yes | |
approval | object | null | yes | |
approval.code | string | yes | |
approval.message | string | yes | |
tab | AgentBoardTab | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | |
tab.position | number | yes | |
tab.version | integer | yes | Send it as baseVersion with the next edit, and as sinceVersion to learn what changed after it. |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes |
AgentSaveBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
to | "new" | "linked" | yes | new: a new library diagram. linked: a new version of the library diagram the tab is linked to. |
name | string | no | at least 1 character; at most 200 characters. |
folder | string | null | no | Folder names from the outermost in, joined with a slash, such as "Payments/Checkout", with no slash at either end. Folder names may use letters A to Z, numbers, spaces, - and _. No space at either end of a name and never two together. Up to 5 levels and 40 characters a name. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
libraryVersion | integer | no | For linked: the library diagram's version the tab last saw. Left out, the tab's own link. minimum 0. |
AgentAddBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 60 characters. |
kind | string | no | With no source: start an empty diagram of this kind, such as sequence. Left out, an empty flow. pattern ^[a-z][a-z0-9]{0,23}$. |
source | string | no | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
after | string | null | no | Put it after this tab; null for first, left out for last. at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
AgentBoardRevisionList
| Field | Type | Required | Description |
|---|---|---|---|
mainVersion | integer | yes | |
protected | boolean | yes | True when a merge into main needs the approval of a person who manages the board. |
revisions | BoardRevision[] | yes | |
revisions[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revisions[].tab | string | yes | |
revisions[].name | string | yes | |
revisions[].author | RevisionPerson | yes | |
revisions[].author.kind | "person" | "agent" | "key" | yes | |
revisions[].author.label | string | yes | |
revisions[].authorId | string | null | yes | |
revisions[].visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revisions[].people | string[] | yes | The account ids it is shared with by name. |
revisions[].status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revisions[].baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revisions[].version | integer | yes | |
revisions[].behind | integer | yes | Main versions made since baseVersion. |
revisions[].createdAt | integer | yes | |
revisions[].updatedAt | integer | yes | |
revisions[].updatedBy | RevisionPerson | yes | |
revisions[].updatedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].updatedBy.label | string | yes | |
revisions[].readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revisions[].mine | boolean | yes | |
revisions[].request | object | null | yes | |
revisions[].request.by | RevisionPerson | yes | |
revisions[].request.at | integer | yes | |
revisions[].request.note | string | null | yes | |
revisions[].review | object | null | yes | |
revisions[].review.by | RevisionPerson | yes | |
revisions[].review.at | integer | yes | |
revisions[].review.comment | string | null | yes | |
revisions[].mergedVersion | integer | null | yes | |
revisions[].mergedBy | any | yes | |
revisions[].mergedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].mergedBy.label | string | yes | |
revisions[].closedAt | integer | null | yes | |
hidden | integer | yes | Open revisions the caller may not see. |
limit | integer | yes | Open revisions a tab may have. |
revisions | AgentBoardRevision[] | no | |
revisions[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revisions[].tab | string | yes | |
revisions[].name | string | yes | |
revisions[].author | RevisionPerson | yes | |
revisions[].author.kind | "person" | "agent" | "key" | yes | |
revisions[].author.label | string | yes | |
revisions[].visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revisions[].status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revisions[].baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revisions[].version | integer | yes | |
revisions[].behind | integer | yes | Main versions made since baseVersion. |
revisions[].createdAt | integer | yes | |
revisions[].updatedAt | integer | yes | |
revisions[].updatedBy | RevisionPerson | yes | |
revisions[].updatedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].updatedBy.label | string | yes | |
revisions[].readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revisions[].mine | boolean | yes | |
revisions[].request | object | null | yes | |
revisions[].request.by | RevisionPerson | yes | |
revisions[].request.at | integer | yes | |
revisions[].request.note | string | null | yes | |
revisions[].review | object | null | yes | |
revisions[].review.by | RevisionPerson | yes | |
revisions[].review.at | integer | yes | |
revisions[].review.comment | string | null | yes | |
revisions[].mergedVersion | integer | null | yes | |
revisions[].mergedBy | any | yes | |
revisions[].mergedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].mergedBy.label | string | yes | |
revisions[].closedAt | integer | null | yes | |
revisions[].shared | integer | yes | People it is shared with by name. |
AgentBoardRevision
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab | string | yes | |
name | string | yes | |
author | RevisionPerson | yes | |
author.kind | "person" | "agent" | "key" | yes | |
author.label | string | yes | |
visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
baseVersion | integer | yes | The main version it forked from, or was last updated from. |
version | integer | yes | |
behind | integer | yes | Main versions made since baseVersion. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
updatedBy | RevisionPerson | yes | |
updatedBy.kind | "person" | "agent" | "key" | yes | |
updatedBy.label | string | yes | |
readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
mine | boolean | yes | |
request | object | null | yes | |
request.by | RevisionPerson | yes | |
request.by.kind | "person" | "agent" | "key" | yes | |
request.by.label | string | yes | |
request.at | integer | yes | |
request.note | string | null | yes | |
review | object | null | yes | |
review.by | RevisionPerson | yes | |
review.by.kind | "person" | "agent" | "key" | yes | |
review.by.label | string | yes | |
review.at | integer | yes | |
review.comment | string | null | yes | |
mergedVersion | integer | null | yes | |
mergedBy | any | yes | |
mergedBy.kind | "person" | "agent" | "key" | yes | |
mergedBy.label | string | yes | |
closedAt | integer | null | yes | |
shared | integer | yes | People it is shared with by name. |
RevisionPerson
| Field | Type | Required | Description |
|---|---|---|---|
kind | "person" | "agent" | "key" | yes | |
label | string | yes |
BoardRevisionList
| Field | Type | Required | Description |
|---|---|---|---|
mainVersion | integer | yes | |
protected | boolean | yes | True when a merge into main needs the approval of a person who manages the board. |
revisions | BoardRevision[] | yes | |
revisions[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revisions[].tab | string | yes | |
revisions[].name | string | yes | |
revisions[].author | RevisionPerson | yes | |
revisions[].author.kind | "person" | "agent" | "key" | yes | |
revisions[].author.label | string | yes | |
revisions[].authorId | string | null | yes | |
revisions[].visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revisions[].people | string[] | yes | The account ids it is shared with by name. |
revisions[].status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revisions[].baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revisions[].version | integer | yes | |
revisions[].behind | integer | yes | Main versions made since baseVersion. |
revisions[].createdAt | integer | yes | |
revisions[].updatedAt | integer | yes | |
revisions[].updatedBy | RevisionPerson | yes | |
revisions[].updatedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].updatedBy.label | string | yes | |
revisions[].readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revisions[].mine | boolean | yes | |
revisions[].request | object | null | yes | |
revisions[].request.by | RevisionPerson | yes | |
revisions[].request.at | integer | yes | |
revisions[].request.note | string | null | yes | |
revisions[].review | object | null | yes | |
revisions[].review.by | RevisionPerson | yes | |
revisions[].review.at | integer | yes | |
revisions[].review.comment | string | null | yes | |
revisions[].mergedVersion | integer | null | yes | |
revisions[].mergedBy | any | yes | |
revisions[].mergedBy.kind | "person" | "agent" | "key" | yes | |
revisions[].mergedBy.label | string | yes | |
revisions[].closedAt | integer | null | yes | |
hidden | integer | yes | Open revisions the caller may not see. |
limit | integer | yes | Open revisions a tab may have. |
BoardRevision
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab | string | yes | |
name | string | yes | |
author | RevisionPerson | yes | |
author.kind | "person" | "agent" | "key" | yes | |
author.label | string | yes | |
authorId | string | null | yes | |
visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
people | string[] | yes | The account ids it is shared with by name. |
status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
baseVersion | integer | yes | The main version it forked from, or was last updated from. |
version | integer | yes | |
behind | integer | yes | Main versions made since baseVersion. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
updatedBy | RevisionPerson | yes | |
updatedBy.kind | "person" | "agent" | "key" | yes | |
updatedBy.label | string | yes | |
readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
mine | boolean | yes | |
request | object | null | yes | |
request.by | RevisionPerson | yes | |
request.by.kind | "person" | "agent" | "key" | yes | |
request.by.label | string | yes | |
request.at | integer | yes | |
request.note | string | null | yes | |
review | object | null | yes | |
review.by | RevisionPerson | yes | |
review.by.kind | "person" | "agent" | "key" | yes | |
review.by.label | string | yes | |
review.at | integer | yes | |
review.comment | string | null | yes | |
mergedVersion | integer | null | yes | |
mergedBy | any | yes | |
mergedBy.kind | "person" | "agent" | "key" | yes | |
mergedBy.label | string | yes | |
closedAt | integer | null | yes |
AgentBoardRevisionCreated
| Field | Type | Required | Description |
|---|---|---|---|
revision | AgentBoardRevision | yes | |
revision.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision.tab | string | yes | |
revision.name | string | yes | |
revision.author | RevisionPerson | yes | |
revision.author.kind | "person" | "agent" | "key" | yes | |
revision.author.label | string | yes | |
revision.visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revision.status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revision.baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revision.version | integer | yes | |
revision.behind | integer | yes | Main versions made since baseVersion. |
revision.createdAt | integer | yes | |
revision.updatedAt | integer | yes | |
revision.updatedBy | RevisionPerson | yes | |
revision.updatedBy.kind | "person" | "agent" | "key" | yes | |
revision.updatedBy.label | string | yes | |
revision.readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revision.mine | boolean | yes | |
revision.request | object | null | yes | |
revision.request.by | RevisionPerson | yes | |
revision.request.at | integer | yes | |
revision.request.note | string | null | yes | |
revision.review | object | null | yes | |
revision.review.by | RevisionPerson | yes | |
revision.review.at | integer | yes | |
revision.review.comment | string | null | yes | |
revision.mergedVersion | integer | null | yes | |
revision.mergedBy | any | yes | |
revision.mergedBy.kind | "person" | "agent" | "key" | yes | |
revision.mergedBy.label | string | yes | |
revision.closedAt | integer | null | yes | |
revision.shared | integer | yes | People it is shared with by name. |
source | string | yes | |
viewUrl | string | yes | The board open on this tab with the revision chosen, for the person who connected the agent to watch it live. |
AgentCreateBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | Defaults to " |
fromVersion | integer | no | |
share | "private" | "board" | no | default "private". |
AgentBoardRevisionCompare
| Field | Type | Required | Description |
|---|---|---|---|
mainVersion | integer | yes | |
version | integer | yes | |
behind | integer | yes | |
same | boolean | yes | |
counts | object | yes | |
counts.added | integer | yes | |
counts.removed | integer | yes | |
counts.renamed | integer | yes | |
counts.moved | integer | yes | |
counts.changed | integer | yes | |
changes | object[] | yes | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
truncated | boolean | yes | |
summary | string | yes | |
conflicts | BoardMergeConflict[] | yes | |
conflicts[].key | string | yes | The statement: its id, its label in quotes, or an edge by its ends. A resolution names it. |
conflicts[].subject | string | yes | |
conflicts[].base | string | null | yes | |
conflicts[].main | string | null | yes | |
conflicts[].revision | string | null | yes | |
mergeable | boolean | yes | |
revision | any | yes | |
revision.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision.tab | string | yes | |
revision.name | string | yes | |
revision.author | RevisionPerson | yes | |
revision.author.kind | "person" | "agent" | "key" | yes | |
revision.author.label | string | yes | |
revision.visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revision.status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revision.baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revision.version | integer | yes | |
revision.behind | integer | yes | Main versions made since baseVersion. |
revision.createdAt | integer | yes | |
revision.updatedAt | integer | yes | |
revision.updatedBy | RevisionPerson | yes | |
revision.updatedBy.kind | "person" | "agent" | "key" | yes | |
revision.updatedBy.label | string | yes | |
revision.readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revision.mine | boolean | yes | |
revision.request | object | null | yes | |
revision.request.by | RevisionPerson | yes | |
revision.request.at | integer | yes | |
revision.request.note | string | null | yes | |
revision.review | object | null | yes | |
revision.review.by | RevisionPerson | yes | |
revision.review.at | integer | yes | |
revision.review.comment | string | null | yes | |
revision.mergedVersion | integer | null | yes | |
revision.mergedBy | any | yes | |
revision.mergedBy.kind | "person" | "agent" | "key" | yes | |
revision.mergedBy.label | string | yes | |
revision.closedAt | integer | null | yes | |
revision.shared | integer | yes | People it is shared with by name. |
BoardMergeConflict
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | The statement: its id, its label in quotes, or an edge by its ends. A resolution names it. |
subject | string | yes | |
base | string | null | yes | |
main | string | null | yes | |
revision | string | null | yes |
AgentBoardMergeRequest
| Field | Type | Required | Description |
|---|---|---|---|
revision | any | yes | |
revision.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision.tab | string | yes | |
revision.name | string | yes | |
revision.author | RevisionPerson | yes | |
revision.author.kind | "person" | "agent" | "key" | yes | |
revision.author.label | string | yes | |
revision.visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revision.status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revision.baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revision.version | integer | yes | |
revision.behind | integer | yes | Main versions made since baseVersion. |
revision.createdAt | integer | yes | |
revision.updatedAt | integer | yes | |
revision.updatedBy | RevisionPerson | yes | |
revision.updatedBy.kind | "person" | "agent" | "key" | yes | |
revision.updatedBy.label | string | yes | |
revision.readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revision.mine | boolean | yes | |
revision.request | object | null | yes | |
revision.request.by | RevisionPerson | yes | |
revision.request.at | integer | yes | |
revision.request.note | string | null | yes | |
revision.review | object | null | yes | |
revision.review.by | RevisionPerson | yes | |
revision.review.at | integer | yes | |
revision.review.comment | string | null | yes | |
revision.mergedVersion | integer | null | yes | |
revision.mergedBy | any | yes | |
revision.mergedBy.kind | "person" | "agent" | "key" | yes | |
revision.mergedBy.label | string | yes | |
revision.closedAt | integer | null | yes | |
revision.shared | integer | yes | People it is shared with by name. |
status | "pending" | yes | |
mergeable | boolean | yes | |
conflicts | BoardMergeConflict[] | yes | |
conflicts[].key | string | yes | The statement: its id, its label in quotes, or an edge by its ends. A resolution names it. |
conflicts[].subject | string | yes | |
conflicts[].base | string | null | yes | |
conflicts[].main | string | null | yes | |
conflicts[].revision | string | null | yes |
BoardMergeRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
note | string | no | at least 1 character; at most 500 characters. |
BoardListenTicket
| Field | Type | Required | Description |
|---|---|---|---|
streamUrl | string | yes | The WebSocket address of the push stream for this board. |
ticket | string | yes | Sent as the second WebSocket subprotocol, after protocol. Reads only this connection's thread on this board. Keep it out of logs and files. |
protocol | string | yes | The first WebSocket subprotocol to ask for; the stream answers with it. |
expiresAt | integer | yes | When the ticket ends, in milliseconds since the epoch; the stream closes then. |
BoardWaitResult
| Field | Type | Required | Description |
|---|---|---|---|
messages | BoardAgentMessage[] | yes | |
messages[].id | string | yes | |
messages[].at | integer | yes | |
messages[].from | string | yes | |
messages[].text | string | yes | |
messages[].tab | string | null | yes | |
messages[].tabName | string | null | yes | |
messages[].revision | string | null | yes | |
messages[].problems | BoardAgentProblem[] | yes | |
messages[].problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
messages[].problems[].severity | "error" | "warning" | yes | |
messages[].problems[].line | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].column | integer | yes | minimum 1; maximum 1000000. |
messages[].problems[].message | string | yes | at least 1 character; at most 500 characters. |
messages[].problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
listening | true | yes | |
listenSecondsLeft | integer | null | yes |
BoardMessageSent
| Field | Type | Required | Description |
|---|---|---|---|
message | BoardMessage | yes | |
message.id | string | yes | |
message.connection | string | yes | |
message.owner | string | yes | |
message.at | integer | yes | |
message.from | "person" | "agent" | yes | |
message.label | string | yes | |
message.text | string | yes | |
message.tab | string | null | yes | |
message.revision | string | null | yes | |
message.problems | BoardAgentProblem[] | yes | |
message.problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
message.problems[].severity | "error" | "warning" | yes | |
message.problems[].line | integer | yes | minimum 1; maximum 1000000. |
message.problems[].column | integer | yes | minimum 1; maximum 1000000. |
message.problems[].message | string | yes | at least 1 character; at most 500 characters. |
message.problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
message.inReplyTo | string | null | yes | |
message.status | "sent" | "delivered" | "answered" | yes | sent: kept for the agent; delivered: the agent read it; answered: the agent replied. |
message.deliveredAt | integer | null | yes | |
message.answeredAt | integer | null | yes | |
message.usage | object | null | no | For a reply, what the agent reported it cost; null when it reported nothing. |
message.usage.inputTokens | integer | no | |
message.usage.outputTokens | integer | no | |
message.usage.cacheReadTokens | integer | no | |
message.usage.cacheWriteTokens | integer | no | |
message.usage.model | string | no | |
message.usage.costUsd | number | no | |
secrets | object | yes | |
secrets.count | integer | yes | |
secrets.kinds | string[] | yes |
BoardMessage
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
connection | string | yes | |
owner | string | yes | |
at | integer | yes | |
from | "person" | "agent" | yes | |
label | string | yes | |
text | string | yes | |
tab | string | null | yes | |
revision | string | null | yes | |
problems | BoardAgentProblem[] | yes | |
problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
problems[].severity | "error" | "warning" | yes | |
problems[].line | integer | yes | minimum 1; maximum 1000000. |
problems[].column | integer | yes | minimum 1; maximum 1000000. |
problems[].message | string | yes | at least 1 character; at most 500 characters. |
problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
inReplyTo | string | null | yes | |
status | "sent" | "delivered" | "answered" | yes | sent: kept for the agent; delivered: the agent read it; answered: the agent replied. |
deliveredAt | integer | null | yes | |
answeredAt | integer | null | yes | |
usage | object | null | no | For a reply, what the agent reported it cost; null when it reported nothing. |
usage.inputTokens | integer | no | |
usage.outputTokens | integer | no | |
usage.cacheReadTokens | integer | no | |
usage.cacheWriteTokens | integer | no | |
usage.model | string | no | |
usage.costUsd | number | no |
BoardReplyBody
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | at least 1 character; at most 2000 characters. |
tab | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
usage | BoardMessageUsage | no | What the reply cost, only when the agent knows: tokens, model and cost. Shown beside the reply. Leave it out rather than guess. |
usage.inputTokens | integer | no | Input tokens the reply took, not counting cache reads. minimum 0; maximum 1000000000. |
usage.outputTokens | integer | no | Output tokens the reply took. minimum 0; maximum 1000000000. |
usage.cacheReadTokens | integer | no | Input tokens read from a prompt cache. minimum 0; maximum 1000000000. |
usage.cacheWriteTokens | integer | no | Input tokens written to a prompt cache. minimum 0; maximum 1000000000. |
usage.model | string | no | The model's id as the agent names it, such as claude-opus-5-5. at least 1 character; at most 100 characters; pattern ^[A-Za-z0-9][A-Za-z0-9._:/@[\]-]*$. |
usage.costUsd | number | no | What the reply cost in US dollars, as the agent knows it. Never an estimate of its own. minimum 0; maximum 10000. |
BoardMessageUsage
What the reply cost, only when the agent knows: tokens, model and cost. Shown beside the reply. Leave it out rather than guess.
| Field | Type | Required | Description |
|---|---|---|---|
inputTokens | integer | no | Input tokens the reply took, not counting cache reads. minimum 0; maximum 1000000000. |
outputTokens | integer | no | Output tokens the reply took. minimum 0; maximum 1000000000. |
cacheReadTokens | integer | no | Input tokens read from a prompt cache. minimum 0; maximum 1000000000. |
cacheWriteTokens | integer | no | Input tokens written to a prompt cache. minimum 0; maximum 1000000000. |
model | string | no | The model's id as the agent names it, such as claude-opus-5-5. at least 1 character; at most 100 characters; pattern ^[A-Za-z0-9][A-Za-z0-9._:/@[\]-]*$. |
costUsd | number | no | What the reply cost in US dollars, as the agent knows it. Never an estimate of its own. minimum 0; maximum 10000. |
DrawDiagramResponse
The result of checking, describing, and drawing a diagram in one call.
| Field | Type | Required | Description |
|---|---|---|---|
valid | boolean | yes | True when the source has no errors. When false, nothing was drawn: fix the errors and call again. |
kind | string | null | yes | The diagram kind, or null when the header could not be read. |
errors | Diagnostic[] | yes | Every error found in one pass, each with line, column, and a hint. Empty when valid. |
errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
errors[].message | string | yes | What is wrong, in one sentence. |
errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
errors[].column | integer | yes | 1-based column in that line. minimum 1. |
errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
errors[].fix.label | string | yes | What the fix does, in a few words, for a button. |
errors[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
warnings | Diagnostic[] | yes | Quality warnings for a valid diagram: too dense, too wide, text cut, unconnected nodes, and suggestions for an icon or a group type. Empty when invalid. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
summary | string | null | yes | One-line description of the diagram, usable as alt text; null when invalid. |
outline | string[] | yes | The diagram as plain text in reading order, to check it says what you meant; empty when invalid. |
outlineTruncated | boolean | yes | True when the summary level cut the outline short. Call again with detail "full" to read all of it. |
size | object | null | yes | Natural size of the laid-out diagram; null when invalid. |
size.width | integer | yes | Width in px. minimum 1. |
size.height | integer | yes | Height in px. minimum 1. |
quality | object | no | How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid. |
quality.score | integer | yes | 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score. minimum 0; maximum 100. |
quality.grade | "clean" | "fair" | "cluttered" | yes | clean is 85 or more, fair 60 or more, cluttered below. |
quality.measures | object | yes | What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds. |
quality.hints | string[] | yes | Up to three changes, the one worth most first, each naming the statement or option to edit. |
quality.line | string | yes | The grade, the score, and the first hint in one line. |
notices | Note[] | no | Information notes, such as an icon alias drawn as the real icon; absent when there is none. |
notices[].code | string | yes | A stable code, such as I122 for an icon alias. |
notices[].severity | "info" | yes | A note never stops a drawing and is not a warning. |
notices[].message | string | yes | |
notices[].line | integer | yes | minimum 1. |
notices[].column | integer | yes | minimum 1. |
notices[].length | integer | yes | minimum 1. |
notices[].hint | string | null | yes | The text to write instead. |
renders | object[] | yes | One picture per requested color scheme, light first; empty when invalid, when svg is never, and when every picture was left out (see picturesOmitted). |
renders[].scheme | "light" | "dark" | yes | The color scheme this picture is drawn in. |
renders[].svg | string | yes | Self-contained SVG markup with an accessible title and description. |
renders[].size | Size | yes | Natural size of a rendered diagram in px. |
renders[].size.width | integer | yes | Width in px. minimum 1. |
renders[].size.height | integer | yes | Height in px. minimum 1. |
picturesOmitted | object | no | Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece. |
picturesOmitted.schemes | ("light" | "dark")[] | yes | The color schemes whose pictures were left out. |
picturesOmitted.characters | integer | yes | How many characters the pictures left out came to. |
picturesOmitted.limit | integer | yes | The most characters one answer may hold before the pictures are left out. |
picturesOmitted.why | string | yes | Why they were left out, and what to do. |
viewUrl | string | no | A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so. |
pngUrl | string | no | The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long. |
svgUrl | string | no | The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long. |
saveCommand | string | no | Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long. |
next | string | yes | The next step in one sentence. |
Note
An information note with its place in the source.
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | A stable code, such as I122 for an icon alias. |
severity | "info" | yes | A note never stops a drawing and is not a warning. |
message | string | yes | |
line | integer | yes | minimum 1. |
column | integer | yes | minimum 1. |
length | integer | yes | minimum 1. |
hint | string | null | yes | The text to write instead. |
Size
Natural size of a rendered diagram in px.
| Field | Type | Required | Description |
|---|---|---|---|
width | integer | yes | Width in px. minimum 1. |
height | integer | yes | Height in px. minimum 1. |
DrawDiagramInput
Diagram source and what to return: the color schemes to draw and how much detail.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source. The first line is the header: flow "Title", sequence "Title", schema "Title", git "Title", gantt "Title", class "Title", state "Title", timeline "Title", journey "Title", mindmap "Title", treemap "Title", pie "Title", quadrant "Title", layers "Title", c4 "Title", matrix "Title", sankey "Title", xychart "Title", tree "Title", swimlane "Title", requirement "Title", block "Title", packet "Title", kanban "Title", radar "Title", usecase "Title", venn "Title", fishbone "Title", or wardley "Title". at least 1 character; at most 120000 characters. |
schemes | "light" | "dark" | "both" | no | light, dark, or both (the default): the light picture and the dark one a dark page needs. default "both". |
theme | "plotwork" | "slate" | "ocean" | "forest" | "sunset" | "mono" | "contrast" | no | Colour theme for this drawing, over the header's theme=. |
detail | "summary" | "full" | no | summary (the default), or full: the whole outline, and the source embedded in each SVG. default "summary". |
svg | "auto" | "always" | "never" | no | auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always. default "auto". |
embedSource | boolean | no | Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source. default false. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
EditDiagramResponse
The edited source, a result for each operation, and the check of the result.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | The edited source. Lines no operation touched are byte for byte as they were, comments included. |
changed | boolean | yes | |
results | object[] | yes | One entry for each operation, in order. |
results[].op | "rename" | "set" | "add_node" | "remove" | "add_edge" | "remove_edge" | "move" | "replace_text" | yes | |
results[].applied | boolean | yes | |
results[].lines | integer[] | yes | Lines of the new source this operation wrote, or the lines it removed from. |
results[].message | string | yes | |
results[].hint | string | null | yes | |
valid | boolean | yes | |
kind | string | null | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
errors | Diagnostic[] | yes | |
errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
errors[].message | string | yes | What is wrong, in one sentence. |
errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
errors[].column | integer | yes | 1-based column in that line. minimum 1. |
errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
errors[].fix.label | string | yes | What the fix does, in a few words, for a button. |
errors[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
warnings | Diagnostic[] | yes | Quality warnings; only when the result is drawn. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
summary | string | null | yes | |
outline | string[] | yes | |
outlineTruncated | boolean | yes | |
size | any | yes | |
size.width | integer | yes | Width in px. minimum 1. |
size.height | integer | yes | Height in px. minimum 1. |
renders | object[] | yes | |
renders[].scheme | "light" | "dark" | yes | |
renders[].svg | string | yes | |
renders[].size | Size | yes | Natural size of a rendered diagram in px. |
renders[].size.width | integer | yes | Width in px. minimum 1. |
renders[].size.height | integer | yes | Height in px. minimum 1. |
picturesOmitted | object | no | Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece. |
picturesOmitted.schemes | ("light" | "dark")[] | yes | The color schemes whose pictures were left out. |
picturesOmitted.characters | integer | yes | How many characters the pictures left out came to. |
picturesOmitted.limit | integer | yes | The most characters one answer may hold before the pictures are left out. |
picturesOmitted.why | string | yes | Why they were left out, and what to do. |
viewUrl | string | no | A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so. |
svgUrl | string | no | The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long. |
saveCommand | string | no | Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long. |
next | string | yes |
EditDiagramInput
Diagram source and the edits to make to it.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
operations | object[] | yes | Applied in order. |
operations[].op | "rename" | "set" | "add_node" | "remove" | "add_edge" | "remove_edge" | "move" | "replace_text" | yes | |
operations[].target | string | no | Id, label, table.column, or "header". at most 2000 characters. |
operations[].to | string | no | rename: the new name. Edges: the end. at most 2000 characters. |
operations[].from | string | no | Edges: the start. at most 2000 characters. |
operations[].option | string | no | at most 40 characters; pattern ^[a-z][A-Za-z0-9_-]*$. |
operations[].value | string | null | no | set: null removes the option. at most 2000 characters. |
operations[].id | string | no | at most 2000 characters. |
operations[].label | string | no | add_edge on sankey: the amount. at most 2000 characters. |
operations[].type | string | no | add_node: node type, or statement word (c4 person, tree dir). at most 2000 characters. |
operations[].options | object | no | |
operations[].statement | string | no | add_node: the whole line, for a kind with no plain node statement. at most 2000 characters. |
operations[].into | string | null | no | A block; null is the top level. at most 2000 characters. |
operations[].after | string | no | at most 2000 characters. |
operations[].arrow | "<-->" | "-->" | "<->" | "..>" | "->" | "--" | no | |
operations[].find | string | no | at most 2000 characters. |
operations[].replace | string | no | at most 2000 characters. |
operations[].all | boolean | no | |
svg | "auto" | "always" | "never" | no | never (the default) draws nothing; auto or always draws like draw_diagram. default "never". |
schemes | "light" | "dark" | "both" | no | light, dark, or both (the default): the light picture and the dark one a dark page needs. default "both". |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
ConvertMermaidResponse
The result of converting one Mermaid diagram to Plotwork.
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | True when source is valid Plotwork source. False means nothing was converted and source is empty: read diagnostics. |
kind | string | null | yes | The Plotwork kind the diagram became, or null when it could not be converted. |
mermaidType | string | null | yes | The Mermaid diagram type read from the first line, such as flowchart or sequenceDiagram; null when none was found. |
source | string | yes | The Plotwork source, or an empty string when nothing could be converted. |
diagnostics | Diagnostic[] | yes | Everything dropped, changed, or wrong, with a hint that says what to do. Codes start with M. Lines and columns point into the Mermaid you sent. M1xx codes are errors that stop the conversion; M2xx codes are warnings and the conversion went on. |
diagnostics[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
diagnostics[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
diagnostics[].message | string | yes | What is wrong, in one sentence. |
diagnostics[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
diagnostics[].column | integer | yes | 1-based column in that line. minimum 1. |
diagnostics[].length | integer | yes | Number of characters the problem covers. minimum 1. |
diagnostics[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
diagnostics[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
diagnostics[].fix.label | string | yes | What the fix does, in a few words, for a button. |
diagnostics[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
stats | object | yes | |
stats.nodes | integer | yes | Flow nodes written. |
stats.edges | integer | yes | Flow edges written. |
stats.groups | integer | yes | Flow groups written. |
stats.actors | integer | yes | Sequence participants written. |
stats.messages | integer | yes | Sequence messages written. |
stats.tables | integer | yes | Schema tables written. |
stats.columns | integer | yes | Schema columns written. |
stats.relations | integer | yes | Schema relations written. |
stats.dropped | integer | yes | Warnings about constructs that were dropped: styling, links, activations, and so on. |
stats.renamed | integer | yes | Ids that were not valid Plotwork ids and were renamed. |
validation | object | null | yes | The Plotwork validator run on source; null when nothing was converted. |
validation.valid | boolean | yes | True when the converted source has no Plotwork errors. It always is when ok is true. |
validation.errors | Diagnostic[] | yes | Plotwork errors in the converted source. Lines and columns point into source, not into the Mermaid. |
validation.errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
validation.errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
validation.errors[].message | string | yes | What is wrong, in one sentence. |
validation.errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
validation.errors[].column | integer | yes | 1-based column in that line. minimum 1. |
validation.errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
validation.errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
validation.errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
validation.warnings | Diagnostic[] | yes | Plotwork quality warnings, including icon and group-type suggestions with the exact icon= to write. Lines and columns point into source, not into the Mermaid. |
validation.warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
validation.warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
validation.warnings[].message | string | yes | What is wrong, in one sentence. |
validation.warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
validation.warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
validation.warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
validation.warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
validation.warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
validation.summary | string | null | yes | One-line description of the converted diagram, usable as alt text. |
validation.size | object | null | yes | Natural size of the laid-out diagram. |
validation.size.width | integer | yes | Width in px. minimum 1. |
validation.size.height | integer | yes | Height in px. minimum 1. |
quality | object | no | How clean the converted diagram looks and up to three changes that would help (see draw_diagram); absent when it is not valid. |
quality.score | integer | yes | 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score. minimum 0; maximum 100. |
quality.grade | "clean" | "fair" | "cluttered" | yes | clean is 85 or more, fair 60 or more, cluttered below. |
quality.measures | object | yes | What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds. |
quality.hints | string[] | yes | Up to three changes, the one worth most first, each naming the statement or option to edit. |
quality.line | string | yes | The grade, the score, and the first hint in one line. |
outline | string[] | yes | The converted diagram as plain text, to check it says what the Mermaid said; empty when nothing was converted. |
outlineTruncated | boolean | yes | True when the summary level cut the outline short. Call again with detail "full" to read all of it. |
renders | object[] | yes | One picture per requested color scheme, light first; empty unless render was true and the conversion is valid, when svg is never, and when every picture was left out (see picturesOmitted). |
renders[].scheme | "light" | "dark" | yes | The color scheme this picture is drawn in. |
renders[].svg | string | yes | Self-contained SVG markup with an accessible title and description. |
renders[].size | Size | yes | Natural size of a rendered diagram in px. |
renders[].size.width | integer | yes | Width in px. minimum 1. |
renders[].size.height | integer | yes | Height in px. minimum 1. |
picturesOmitted | object | no | Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece. |
picturesOmitted.schemes | ("light" | "dark")[] | yes | The color schemes whose pictures were left out. |
picturesOmitted.characters | integer | yes | How many characters the pictures left out came to. |
picturesOmitted.limit | integer | yes | The most characters one answer may hold before the pictures are left out. |
picturesOmitted.why | string | yes | Why they were left out, and what to do. |
viewUrl | string | no | A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so. |
pngUrl | string | no | The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long. |
svgUrl | string | no | The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long. |
saveCommand | string | no | Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long. |
next | string | yes | The next step in one sentence. |
ConvertMermaidInput
Mermaid source and what to return with the converted Plotwork source.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | One Mermaid diagram: a flowchart or graph, sequenceDiagram, erDiagram, gitGraph, gantt, classDiagram, stateDiagram, timeline, journey, mindmap, treemap-beta or treemap, pie, quadrantChart, C4Context or C4Container or C4Component or C4Dynamic or C4Deployment, sankey-beta or sankey, xychart-beta or xychart, treeView-beta or treeView, requirementDiagram, block-beta or block, packet or packet-beta, kanban, radar-beta or radar, usecase-beta or usecase, venn-beta or venn, ishikawa-beta or ishikawa, wardley-beta, architecture-beta, or zenuml. Front matter and %%{init}%% directives are allowed and are dropped. Send the text inside a mermaid fence, without the fence. at least 1 character; at most 120000 characters. |
lenient | boolean | no | false (the default): a line that cannot be read stops the conversion, so nothing is converted with a line missing. true: such a line is skipped with a warning and the rest is converted. default false. |
render | boolean | no | Also draw the converted diagram, in the color schemes schemes names. default false. |
schemes | "light" | "dark" | "both" | no | light, dark, or both (the default): the light picture and the dark one a dark page needs. default "both". |
detail | "summary" | "full" | no | summary (the default), or full: the whole outline, and the source embedded in each SVG. default "summary". |
svg | "auto" | "always" | "never" | no | auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always. default "auto". |
embedSource | boolean | no | Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source. default false. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
ValidateResponse
Result of checking diagram source.
| Field | Type | Required | Description |
|---|---|---|---|
valid | boolean | yes | True when there are no errors; warnings do not make a diagram invalid. |
kind | string | null | yes | The diagram kind, or null when the header could not be read. |
errors | Diagnostic[] | yes | Every error found in one pass, so they can be fixed together. |
errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
errors[].message | string | yes | What is wrong, in one sentence. |
errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
errors[].column | integer | yes | 1-based column in that line. minimum 1. |
errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
errors[].fix.label | string | yes | What the fix does, in a few words, for a button. |
errors[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
warnings | Diagnostic[] | yes | Quality warnings for a valid diagram, such as too dense or too wide. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
summary | string | null | yes | One-line description of the diagram, or null when invalid. |
size | object | null | yes | Natural rendered size, or null when invalid. |
size.width | integer | yes | Width in px. minimum 1. |
size.height | integer | yes | Height in px. minimum 1. |
quality | object | no | How clean the laid-out diagram looks, with up to three changes; absent when invalid. |
quality.score | integer | yes | 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score. minimum 0; maximum 100. |
quality.grade | "clean" | "fair" | "cluttered" | yes | clean is 85 or more, fair 60 or more, cluttered below. |
quality.measures | object | yes | What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds. |
quality.hints | string[] | yes | Up to three changes, the one worth most first, each naming the statement or option to edit. |
quality.line | string | yes | The grade, the score, and the first hint in one line. |
notices | Note[] | no | Information notes, such as an icon alias resolved to a real icon; absent when there is none. |
notices[].code | string | yes | A stable code, such as I122 for an icon alias. |
notices[].severity | "info" | yes | A note never stops a drawing and is not a warning. |
notices[].message | string | yes | |
notices[].line | integer | yes | minimum 1. |
notices[].column | integer | yes | minimum 1. |
notices[].length | integer | yes | minimum 1. |
notices[].hint | string | null | yes | The text to write instead. |
DiagramSourceInput
Request body carrying diagram source.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
RenderResponse
A rendered diagram.
| Field | Type | Required | Description |
|---|---|---|---|
svg | string | yes | Self-contained SVG markup with an accessible title and description. |
scheme | "light" | "dark" | "auto" | yes | The color scheme used. |
size | Size | yes | Natural size of a rendered diagram in px. |
size.width | integer | yes | Width in px. minimum 1. |
size.height | integer | yes | Height in px. minimum 1. |
warnings | Diagnostic[] | yes | |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
RenderInput
Diagram source and rendering options.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
scheme | "light" | "dark" | "auto" | no | Color scheme to paint with: light, dark, or auto for one picture that follows the reader's light or dark setting. default "light". |
theme | "plotwork" | "slate" | "ocean" | "forest" | "sunset" | "mono" | "contrast" | no | Colour theme for this drawing, over the header's theme=. |
idPrefix | string | no | Prefix for element ids; set it when inlining several diagrams into one page. at most 32 characters; pattern ^[A-Za-z][A-Za-z0-9_-]*$. |
embedSource | boolean | no | Write the source into the SVG metadata so read_diagram can give it back. Set it true when you save the SVG into a repository; anyone with the file can then read the source. Default false. default false. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
OutlineResponse
A plain-text description of a diagram, usable as alt text.
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
summary | string | yes | One-line description. |
outline | string[] | yes | Lines in reading order: participants, steps, tables, and connections. |
ReadDiagramResponse
The source of a Plotwork SVG, or why there is none and what to do.
| Field | Type | Required | Description |
|---|---|---|---|
status | "read" | "no-source" | "damaged" | "not-a-picture" | "refused" | "unreachable" | yes | read: the source was found. no-source: the picture carries none. damaged: it carries one that cannot be read back. not-a-picture: the text is not an SVG. refused: the link is not one this tool fetches. unreachable: the link could not be fetched. |
hasSource | boolean | yes | True when source is set. |
source | string | null | yes | The exact source the picture was drawn from, ready to edit and send to draw_diagram; null when there is none. |
kind | string | null | yes | The diagram kind of the source, or null. |
id | string | null | yes | The id of the stored diagram when the picture was published (data-plotwork-id), or null. |
from | "text" | "url" | yes | Where the picture came from: the text that was sent, or the link that was fetched. |
validation | object | null | yes | The check of the source, or null when there is none. It parses the source; draw_diagram also lays it out and returns warnings. |
validation.valid | boolean | yes | True when the source has no errors. |
validation.errors | Diagnostic[] | yes | Every error, each with line, column, and a hint; empty when valid. |
validation.errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
validation.errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
validation.errors[].message | string | yes | What is wrong, in one sentence. |
validation.errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
validation.errors[].column | integer | yes | 1-based column in that line. minimum 1. |
validation.errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
validation.errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
validation.errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
validation.summary | string | null | yes | One-line description of the diagram, or null when invalid. |
picture | object | null | yes | What the picture says about itself, or null when the text is not an SVG. |
picture.title | string | null | yes | The diagram title, or null. |
picture.summary | string | null | yes | The one-line summary the picture carries, or null. |
picture.scheme | string | null | yes | The color scheme it was drawn in, or null. |
picture.size | object | null | yes | Its size in px, or null. |
picture.size.width | integer | yes | Width in px. minimum 1. |
picture.size.height | integer | yes | Height in px. minimum 1. |
picture.outline | string[] | yes | The plain-language outline the picture carries, one entry for each line. Empty when the source was read: the source says more. |
picture.labels | string[] | yes | The text painted on the picture, each distinct label once, in painted order. Empty when the source was read. |
message | string | yes | What happened, in one sentence. |
next | string | yes | The next step in one sentence. |
ReadDiagramInput
The text of a Plotwork SVG, or the link of a hosted one.
| Field | Type | Required | Description |
|---|---|---|---|
svg | string | no | The text of a Plotwork SVG: the content of an .svg file in the repository. Send this or url, not both. at least 1 character; at most 1000000 characters. |
url | string | no | The link of a hosted Plotwork picture, https://cdn.plotwork.dev/d/ (opens in a new tab)<22 characters>.svg. Only Plotwork's own picture hosts are fetched. Send this or svg, not both. at least 1 character; at most 200 characters. |
CompareDiagramsResponse
What changed between two versions of a diagram.
| Field | Type | Required | Description |
|---|---|---|---|
same | boolean | yes | |
before | object | yes | |
before.from | "source" | "svg" | "url" | yes | |
before.read | boolean | yes | False when no source could be read from it; message says why. |
before.kind | string | null | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
before.valid | boolean | yes | |
before.message | string | null | yes | |
after | object | yes | |
after.from | "source" | "svg" | "url" | yes | |
after.read | boolean | yes | False when no source could be read from it; message says why. |
after.kind | string | null | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
after.valid | boolean | yes | |
after.message | string | null | yes | |
counts | object | yes | |
counts.added | integer | yes | |
counts.removed | integer | yes | |
counts.renamed | integer | yes | |
counts.moved | integer | yes | |
counts.changed | integer | yes | |
changes | object[] | yes | |
changes[].change | "added" | "removed" | "renamed" | "moved" | "changed" | yes | |
changes[].subject | "header" | "node" | "group" | "edge" | "row" | "series" | "line" | yes | |
changes[].name | string | yes | The id, the label in quotes, or for an edge its ends. |
changes[].line | integer | null | yes | The line in after, or in before for a removal. |
changes[].detail | string | yes | |
truncated | boolean | yes | True when more changes were found than are listed; counts covers all of them. |
summary | string | yes | The changes in plain words, for a pull request review. |
markdown | string | null | yes | |
next | string | yes |
CompareDiagramsInput
Two versions of a diagram to compare.
| Field | Type | Required | Description |
|---|---|---|---|
before | string | yes | The old diagram: source, the text of a Plotwork SVG that carries its source, or a cdn.plotwork.dev link. at least 1 character; at most 1000000 characters. |
after | string | yes | The new diagram, in any of the same three forms. at least 1 character; at most 1000000 characters. |
markdown | boolean | no | Also return a Markdown block ready to paste as a pull request comment. default false. |
SuggestDiagramResponse
The diagram kinds that fit a request, best first, each with a starter source.
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | The request that was read. |
suggestions | object[] | yes | Up to 3, best first, one for each kind and style. |
suggestions[].kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
suggestions[].style | string | null | yes | The style the starter uses: compare, score, raci, or risk for a matrix, files or org for a tree; null for the kind's only style. |
suggestions[].why | string | yes | One sentence: why this kind fits. |
suggestions[].confidence | "high" | "medium" | "low" | yes | high: the text names this kind of picture or its shape fits it exactly. medium: it leans toward it. low: a fallback worth considering. |
suggestions[].starter | string | yes | A short Plotwork source of this kind that parses without errors: built from the names and numbers in the text where it could find them, otherwise a small example to edit. Replace every placeholder before you draw it. |
suggestions[].tailored | boolean | yes | True when the starter uses names or numbers from the text; false when it is the kind's small example. |
suggestions[].statements | string[] | yes | The few statements of this kind to write, as syntax. get_diagram_syntax with this kind has them all. |
importFormat | string | no | Present when the data is, or the request names, a file import_source reads (sql, openapi, compose, terraform, and so on): call import_source with this format and the file's text instead of editing a starter. |
next | string | yes | The next step in one sentence. |
SuggestDiagramInput
A request in plain words and optional data to draw from.
| Field | Type | Required | Description |
|---|---|---|---|
request | string | yes | What the picture is for, in plain words, such as "permission matrix for these endpoints and roles" or "how a refund moves between support and billing". at least 1 character; at most 1000 characters. |
data | string | no | Optional text to draw from: a pasted table, a list, numbers by period, or notes. Names and numbers in it are used in the starters. at most 20000 characters. |
EmbedDiagramResponse
A snippet that shows a Plotwork picture with the viewer.
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | False when the url is not a hosted picture or the svg is not an SVG; message and hint say why. |
snippet | string | null | yes | The code to paste into the page or component, or null when ok is false. |
install | string | yes | The command that installs the viewer. |
src | string | null | yes | The address the snippet loads the picture from. |
linkKind | "picture" | "stable" | "organisation" | null | yes | picture (/d/), stable (/l/), organisation (/o/), or null for a file the page serves. |
fingerprint | string | null | yes | sha256- |
live | boolean | yes | True when the snippet carries live. |
pinned | boolean | yes | True when the snippet carries fingerprint. |
notes | string[] | yes | Each choice left out and why, and what to know about the link. |
message | string | yes | What happened, in one sentence. |
hint | string | null | yes | What to send instead, when ok is false. |
EmbedDiagramInput
A Plotwork picture to show with the viewer, and how.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | no | A hosted picture (/d/), stable link (/l/) or organisation embed link (/o/) on cdn.plotwork.dev. Never fetched. at least 1 character; at most 200 characters. |
svg | string | no | The text of a Plotwork SVG; needed to pin. at least 1 character; at most 1000000 characters. |
path | string | no | Where the page serves svg from, when there is no url. at least 1 character; at most 500 characters. |
format | "html" | "react" | no | html for any page, react for React. default "html". |
live | boolean | no | Follow new versions: /l/ and /o/ links only. default false. |
pin | boolean | no | Show only exactly this picture: needs svg. default false. |
label | string | no | What the diagram shows, for a screen reader. at most 200 characters. |
EnquiryAck
| Field | Type | Required | Description |
|---|---|---|---|
received | true | yes | Always true. The enquiry was received. |
EnquiryBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name of the person asking. at least 1 character; at most 120 characters. |
email | string | yes | Their work email address. The reply goes here. |
company | string | yes | The company. at least 1 character; at most 120 characters. |
companySize | "1-49" | "50-249" | "250-999" | "1000-4999" | "5000+" | yes | How many people the company has. |
repos | "1-9" | "10-49" | "50-199" | "200-999" | "1000+" | yes | How many repositories the team would run diagrams in. |
useCase | string | yes | What the team wants to do, in their words. at least 10 characters; at most 2000 characters. |
interests | ("sso-scim" | "audit-siem" | "support-sla" | "limits" | "self-hosting" | "invoicing")[] | no | What the company needs, as the boxes ticked on the form. Left out, nothing was ticked; a box named twice counts once. |
context | EnquiryContext | no | Sent by the portal: where the form was opened. The site sends none. |
context.page | "contact" | "plan" | "sso" | "log-streaming" | "connectors" | "support" | "audit" | "self-hosting" | yes | The place in the portal the form was opened from, such as sso for the Single sign-on panel. |
context.org | string | no | The slug of the organisation the form was opened from. Kept only when the signed-in account is a member. pattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$. |
website | string | no | Leave empty. A field people do not see: an enquiry that fills it is taken for a script and dropped, with the same answer. at most 200 characters. |
elapsedMs | integer | yes | Milliseconds between the form being shown and being sent. An enquiry sent faster than a person can type is dropped, with the same answer. minimum 0. |
turnstileToken | string | no | The token the Cloudflare Turnstile widget on the site gave the visitor. Required from a visitor who is not signed in when the server has a Turnstile secret; never read from a signed-in account. at most 2048 characters. |
EnquiryContext
Sent by the portal: where the form was opened. The site sends none.
| Field | Type | Required | Description |
|---|---|---|---|
page | "contact" | "plan" | "sso" | "log-streaming" | "connectors" | "support" | "audit" | "self-hosting" | yes | The place in the portal the form was opened from, such as sso for the Single sign-on panel. |
org | string | no | The slug of the organisation the form was opened from. Kept only when the signed-in account is a member. pattern ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$. |
GithubOverview
| Field | Type | Required | Description |
|---|---|---|---|
configured | boolean | yes | Whether the GitHub App is set up on this server. |
active | boolean | yes | Whether the owner's plan includes the App (Pro and Enterprise). |
plan | "free" | "pro" | "enterprise" | yes | |
canManage | boolean | yes | Whether the caller may link, unlink, scan and enable: the owner and admins. |
app | object | null | yes | The App, when set up: where to install it, and the client ID the portal starts a GitHub sign-in with. |
app.slug | string | yes | |
app.clientId | string | yes | |
app.installUrl | string | yes | |
installations | GithubInstallation[] | yes | |
installations[].id | string | yes | GitHub's installation id. |
installations[].account | object | yes | |
installations[].account.login | string | yes | |
installations[].account.id | string | yes | |
installations[].account.type | "User" | "Organization" | yes | |
installations[].repositorySelection | "all" | "selected" | yes | Whether the App reaches every repository of the account or the ones chosen on GitHub. |
installations[].suspended | boolean | yes | |
installations[].linkedAt | integer | yes | Milliseconds since the epoch. |
installations[].linkedBy | object | null | yes | |
installations[].linkedBy.id | string | yes | |
installations[].linkedBy.email | string | yes | |
installations[].settingsUrl | string | yes | The installation's settings page on GitHub, where it is narrowed, suspended or uninstalled. |
repositories | GithubRepository[] | yes | |
repositories[].id | string | yes | GitHub's repository id. |
repositories[].installationId | string | yes | |
repositories[].fullName | string | yes | |
repositories[].private | boolean | yes | |
repositories[].defaultBranch | string | yes | |
repositories[].formats | array | null | yes | The import formats the last scan found, such as terraform; null before a scan and after a push to the default branch. |
repositories[].detectedAt | integer | null | yes | |
repositories[].status | "none" | "pr_open" | "fix_open" | "merged" | "closed" | "adopted" | "reporting" | "failing" | yes | none: not enabled. pr_open: the setup pull request is open. fix_open: a pull request that fixes the settings file is open; once it closes, the repository is scanned again. merged: merged, no drift run since. adopted: set up already, so Enable registered CI with no pull request, and no drift run since. reporting or failing: the latest drift run since it was enabled was clean, or drifted or failed. closed: the pull request was closed without merging. |
repositories[].pullRequest | object | null | yes | |
repositories[].pullRequest.number | integer | yes | |
repositories[].pullRequest.url | string | yes | |
repositories[].enabledAt | integer | null | yes | |
repositories[].lastRun | object | null | yes | The repository's latest drift run, whenever it was sent. |
repositories[].lastRun.checkedAt | integer | yes | |
repositories[].lastRun.drifted | integer | yes | |
repositories[].lastRun.failed | integer | yes | |
limits | object | yes | |
limits.maxRepositoriesPerInstallation | integer | yes |
GithubInstallation
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | GitHub's installation id. |
account | object | yes | |
account.login | string | yes | |
account.id | string | yes | |
account.type | "User" | "Organization" | yes | |
repositorySelection | "all" | "selected" | yes | Whether the App reaches every repository of the account or the ones chosen on GitHub. |
suspended | boolean | yes | |
linkedAt | integer | yes | Milliseconds since the epoch. |
linkedBy | object | null | yes | |
linkedBy.id | string | yes | |
linkedBy.email | string | yes | |
settingsUrl | string | yes | The installation's settings page on GitHub, where it is narrowed, suspended or uninstalled. |
GithubRepository
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | GitHub's repository id. |
installationId | string | yes | |
fullName | string | yes | |
private | boolean | yes | |
defaultBranch | string | yes | |
formats | array | null | yes | The import formats the last scan found, such as terraform; null before a scan and after a push to the default branch. |
detectedAt | integer | null | yes | |
status | "none" | "pr_open" | "fix_open" | "merged" | "closed" | "adopted" | "reporting" | "failing" | yes | none: not enabled. pr_open: the setup pull request is open. fix_open: a pull request that fixes the settings file is open; once it closes, the repository is scanned again. merged: merged, no drift run since. adopted: set up already, so Enable registered CI with no pull request, and no drift run since. reporting or failing: the latest drift run since it was enabled was clean, or drifted or failed. closed: the pull request was closed without merging. |
pullRequest | object | null | yes | |
pullRequest.number | integer | yes | |
pullRequest.url | string | yes | |
enabledAt | integer | null | yes | |
lastRun | object | null | yes | The repository's latest drift run, whenever it was sent. |
lastRun.checkedAt | integer | yes | |
lastRun.drifted | integer | yes | |
lastRun.failed | integer | yes |
GithubAuthorize
| Field | Type | Required | Description |
|---|---|---|---|
grant | string | yes | Proof, for ten minutes and for this account only, of the installations the GitHub user can reach. Holds no secret. |
installUrl | string | yes | Where to install the App, for a GitHub user who can reach no installation of it yet. |
expiresAt | integer | yes | |
githubUser | object | yes | |
githubUser.login | string | yes | |
githubUser.id | string | yes | |
installations | object[] | yes | |
installations[].id | string | yes | |
installations[].account | object | yes | |
installations[].account.login | string | yes | |
installations[].account.id | string | yes | |
installations[].account.type | "User" | "Organization" | yes | |
installations[].repositorySelection | "all" | "selected" | yes | |
installations[].suspended | boolean | yes | |
installations[].linkedTo | object | null | yes | The organisation it is linked to, when the caller is a member of it. |
installations[].linkedTo.slug | string | yes | |
installations[].linkedTo.name | string | yes | |
installations[].linkedElsewhere | boolean | yes | True when another organisation has it; that organisation is not named. |
GithubAuthorizeBody
| Field | Type | Required | Description |
|---|---|---|---|
code | string | yes | The code GitHub sent the browser back with. at least 1 character; at most 200 characters. |
codeVerifier | string | no | The PKCE verifier, when the portal started the sign-in with a challenge. at least 43 characters; at most 128 characters; pattern ^[A-Za-z0-9._~-]+$. |
GithubLink
| Field | Type | Required | Description |
|---|---|---|---|
installation | GithubInstallation | yes | |
installation.id | string | yes | GitHub's installation id. |
installation.account | object | yes | |
installation.account.login | string | yes | |
installation.account.id | string | yes | |
installation.account.type | "User" | "Organization" | yes | |
installation.repositorySelection | "all" | "selected" | yes | Whether the App reaches every repository of the account or the ones chosen on GitHub. |
installation.suspended | boolean | yes | |
installation.linkedAt | integer | yes | Milliseconds since the epoch. |
installation.linkedBy | object | null | yes | |
installation.linkedBy.id | string | yes | |
installation.linkedBy.email | string | yes | |
installation.settingsUrl | string | yes | The installation's settings page on GitHub, where it is narrowed, suspended or uninstalled. |
synced | integer | yes | |
nextPage | integer | null | yes | The next page of repositories to read with sync, or null when every one was read. |
GithubLinkBody
| Field | Type | Required | Description |
|---|---|---|---|
grant | string | yes | at least 1 character; at most 8192 characters. |
installationId | string | yes | at most 20 characters; pattern ^[1-9][0-9]{0,19}$. |
GithubSync
| Field | Type | Required | Description |
|---|---|---|---|
synced | integer | yes | |
nextPage | integer | null | yes |
GithubSyncBody
| Field | Type | Required | Description |
|---|---|---|---|
page | integer | no | minimum 1; maximum 10; default 1. |
GithubRepositorySearch
| Field | Type | Required | Description |
|---|---|---|---|
items | GithubPickerRepository[] | yes | By name, at most 50 a page. |
items[].id | string | yes | GitHub's repository id. |
items[].fullName | string | yes | |
items[].defaultBranch | string | yes | |
nextCursor | string | null | yes | Send as cursor for the next page; null on the last. |
GithubPickerRepository
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | GitHub's repository id. |
fullName | string | yes | |
defaultBranch | string | yes |
GithubWorkflows
| Field | Type | Required | Description |
|---|---|---|---|
repository | GithubPickerRepository | yes | |
repository.id | string | yes | GitHub's repository id. |
repository.fullName | string | yes | |
repository.defaultBranch | string | yes | |
workflows | object[] | yes | The workflow files on the default branch, by file name, at most 200. Empty for an empty repository. |
workflows[].path | string | yes | |
workflows[].file | string | yes | |
truncated | boolean | yes | True when the tree was too large to read whole, so only the top level was read and the list may miss files. |
environments | string[] | yes | The deployment environments by name, at most 100. Empty when there are none or GitHub does not let the App read them. |
GithubDetect
| Field | Type | Required | Description |
|---|---|---|---|
repository | GithubRepository | yes | |
repository.id | string | yes | GitHub's repository id. |
repository.installationId | string | yes | |
repository.fullName | string | yes | |
repository.private | boolean | yes | |
repository.defaultBranch | string | yes | |
repository.formats | array | null | yes | The import formats the last scan found, such as terraform; null before a scan and after a push to the default branch. |
repository.detectedAt | integer | null | yes | |
repository.status | "none" | "pr_open" | "fix_open" | "merged" | "closed" | "adopted" | "reporting" | "failing" | yes | none: not enabled. pr_open: the setup pull request is open. fix_open: a pull request that fixes the settings file is open; once it closes, the repository is scanned again. merged: merged, no drift run since. adopted: set up already, so Enable registered CI with no pull request, and no drift run since. reporting or failing: the latest drift run since it was enabled was clean, or drifted or failed. closed: the pull request was closed without merging. |
repository.pullRequest | object | null | yes | |
repository.pullRequest.number | integer | yes | |
repository.pullRequest.url | string | yes | |
repository.enabledAt | integer | null | yes | |
repository.lastRun | object | null | yes | The repository's latest drift run, whenever it was sent. |
repository.lastRun.checkedAt | integer | yes | |
repository.lastRun.drifted | integer | yes | |
repository.lastRun.failed | integer | yes | |
sources | object[] | yes | The sources a settings file would name, with their paths. Only the format names are stored. |
sources[].name | string | yes | |
sources[].format | string | yes | |
sources[].from | string[] | yes | |
sources[].out | string | yes | |
truncated | boolean | yes | True when the tree was too large to read whole, so only part of it was scanned. |
plan | GithubPlan | yes | |
plan.outcome | "setup" | "additions" | "complete" | "invalid" | "nothing" | yes | setup: no settings file yet, so a pull request adds one, the workflow and the diagrams. additions: the repository uses Plotwork, and a pull request adds only what it lacks. complete: it covers everything found, so only CI is registered. invalid: its settings file does not check and is left alone. nothing: nothing to draw. |
plan.summary | string | yes | What happens, in one sentence. |
plan.added | object[] | yes | |
plan.added[].name | string | yes | |
plan.added[].format | string | yes | |
plan.added[].from | string[] | yes | |
plan.added[].out | string | yes | |
plan.kept | string[] | yes | The sources the settings file has, every one left as it is. |
plan.workflow | object | null | yes | The workflow written, edited in place (report-drift and id-token: write added), or left as it is. |
plan.workflow.action | "add" | "edit" | "keep" | yes | |
plan.workflow.file | string | yes | |
plan.suggestions | string[] | yes | What the workflow still lacks and was not changed, such as an older pin of the Action. |
plan.problems | object[] | yes | For invalid: where the settings file does not check, each with a hint. |
plan.problems[].code | string | yes | |
plan.problems[].message | string | yes | |
plan.problems[].line | integer | yes | |
plan.problems[].column | integer | yes | |
plan.problems[].hint | string | null | yes | |
plan.repair | object | null | yes | For invalid: the repair Enable would make. |
plan.repair.fixable | boolean | yes | True when every problem has a plain fix, so Enable opens a pull request that fixes the file. |
plan.repair.fixes | object[] | yes | |
plan.repair.needsYou | string[] | yes | What the fix leaves as it is for the person: a source that reads no file, a key or value with no plain match. |
plan.followUp | string | null | yes | For a fixable invalid: what Enable does once the fix is merged. |
GithubPlan
| Field | Type | Required | Description |
|---|---|---|---|
outcome | "setup" | "additions" | "complete" | "invalid" | "nothing" | yes | setup: no settings file yet, so a pull request adds one, the workflow and the diagrams. additions: the repository uses Plotwork, and a pull request adds only what it lacks. complete: it covers everything found, so only CI is registered. invalid: its settings file does not check and is left alone. nothing: nothing to draw. |
summary | string | yes | What happens, in one sentence. |
added | object[] | yes | |
added[].name | string | yes | |
added[].format | string | yes | |
added[].from | string[] | yes | |
added[].out | string | yes | |
kept | string[] | yes | The sources the settings file has, every one left as it is. |
workflow | object | null | yes | The workflow written, edited in place (report-drift and id-token: write added), or left as it is. |
workflow.action | "add" | "edit" | "keep" | yes | |
workflow.file | string | yes | |
suggestions | string[] | yes | What the workflow still lacks and was not changed, such as an older pin of the Action. |
problems | object[] | yes | For invalid: where the settings file does not check, each with a hint. |
problems[].code | string | yes | |
problems[].message | string | yes | |
problems[].line | integer | yes | |
problems[].column | integer | yes | |
problems[].hint | string | null | yes | |
repair | object | null | yes | For invalid: the repair Enable would make. |
repair.fixable | boolean | yes | True when every problem has a plain fix, so Enable opens a pull request that fixes the file. |
repair.fixes | object[] | yes | |
repair.fixes[].line | integer | null | yes | |
repair.fixes[].path | string | yes | |
repair.fixes[].before | string | yes | |
repair.fixes[].after | string | yes | |
repair.fixes[].why | string | yes | |
repair.needsYou | string[] | yes | What the fix leaves as it is for the person: a source that reads no file, a key or value with no plain match. |
followUp | string | null | yes | For a fixable invalid: what Enable does once the fix is merged. |
GithubEnable
| Field | Type | Required | Description |
|---|---|---|---|
repository | GithubRepository | yes | |
repository.id | string | yes | GitHub's repository id. |
repository.installationId | string | yes | |
repository.fullName | string | yes | |
repository.private | boolean | yes | |
repository.defaultBranch | string | yes | |
repository.formats | array | null | yes | The import formats the last scan found, such as terraform; null before a scan and after a push to the default branch. |
repository.detectedAt | integer | null | yes | |
repository.status | "none" | "pr_open" | "fix_open" | "merged" | "closed" | "adopted" | "reporting" | "failing" | yes | none: not enabled. pr_open: the setup pull request is open. fix_open: a pull request that fixes the settings file is open; once it closes, the repository is scanned again. merged: merged, no drift run since. adopted: set up already, so Enable registered CI with no pull request, and no drift run since. reporting or failing: the latest drift run since it was enabled was clean, or drifted or failed. closed: the pull request was closed without merging. |
repository.pullRequest | object | null | yes | |
repository.pullRequest.number | integer | yes | |
repository.pullRequest.url | string | yes | |
repository.enabledAt | integer | null | yes | |
repository.lastRun | object | null | yes | The repository's latest drift run, whenever it was sent. |
repository.lastRun.checkedAt | integer | yes | |
repository.lastRun.drifted | integer | yes | |
repository.lastRun.failed | integer | yes | |
outcome | "opened" | "open" | "complete" | "fix_opened" | yes | opened: a pull request was opened now. open: one was open already. complete: the repository is set up already, so no pull request; only the trusted publisher was registered. fix_opened: its settings file did not check, so a pull request that fixes it was opened, or the open one brought up to date. |
pullRequest | object | null | yes | |
pullRequest.number | integer | yes | |
pullRequest.url | string | yes | |
created | boolean | yes | True when a pull request was opened now. |
trustedPublisher | object | null | yes | The trusted publisher for the workflow, or null when the organisation has twenty already. |
trustedPublisher.id | string | yes | |
trustedPublisher.name | string | yes | |
trustedPublisher.created | boolean | yes | |
keyless | boolean | yes | True when the workflow signs in with no key (id-token: write); false while the pinned Action needs PLOTWORK_API_KEY. |
sources | integer | yes | How many diagrams the pull request adds. |
plan | GithubPlan | yes | |
plan.outcome | "setup" | "additions" | "complete" | "invalid" | "nothing" | yes | setup: no settings file yet, so a pull request adds one, the workflow and the diagrams. additions: the repository uses Plotwork, and a pull request adds only what it lacks. complete: it covers everything found, so only CI is registered. invalid: its settings file does not check and is left alone. nothing: nothing to draw. |
plan.summary | string | yes | What happens, in one sentence. |
plan.added | object[] | yes | |
plan.added[].name | string | yes | |
plan.added[].format | string | yes | |
plan.added[].from | string[] | yes | |
plan.added[].out | string | yes | |
plan.kept | string[] | yes | The sources the settings file has, every one left as it is. |
plan.workflow | object | null | yes | The workflow written, edited in place (report-drift and id-token: write added), or left as it is. |
plan.workflow.action | "add" | "edit" | "keep" | yes | |
plan.workflow.file | string | yes | |
plan.suggestions | string[] | yes | What the workflow still lacks and was not changed, such as an older pin of the Action. |
plan.problems | object[] | yes | For invalid: where the settings file does not check, each with a hint. |
plan.problems[].code | string | yes | |
plan.problems[].message | string | yes | |
plan.problems[].line | integer | yes | |
plan.problems[].column | integer | yes | |
plan.problems[].hint | string | null | yes | |
plan.repair | object | null | yes | For invalid: the repair Enable would make. |
plan.repair.fixable | boolean | yes | True when every problem has a plain fix, so Enable opens a pull request that fixes the file. |
plan.repair.fixes | object[] | yes | |
plan.repair.needsYou | string[] | yes | What the fix leaves as it is for the person: a source that reads no file, a key or value with no plain match. |
plan.followUp | string | null | yes | For a fixable invalid: what Enable does once the fix is merged. |
GithubTrust
| Field | Type | Required | Description |
|---|---|---|---|
trustedPublisher | object | null | yes | The trusted publisher, or null when the organisation has twenty already. |
trustedPublisher.id | string | yes | |
trustedPublisher.name | string | yes | |
trustedPublisher.created | boolean | yes | |
workflow | string | yes | The workflow file it trusts: the repository's own Plotwork workflow, else diagrams.yml. |
GithubWebhookAck
| Field | Type | Required | Description |
|---|---|---|---|
outcome | "applied" | "duplicate" | "ignored" | yes | applied: rows changed. duplicate: this delivery was applied before. ignored: nothing this App acts on. |
PublishAnswer
| Field | Type | Required | Description |
|---|
PublishedDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already hosted and its link was kept. |
stableLink | StableLink | no | Present only when the publish named an alias: the stable link, now pointing at this diagram. |
stableLink.id | string | yes | The handle for managing the stable link (delete). It is not in its address. |
stableLink.alias | string | yes | The name you gave it. Only you see it. |
stableLink.url | string | yes | The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture. |
stableLink.diagramId | string | null | yes | The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again. |
stableLink.createdAt | integer | yes | When it was made, in milliseconds since the epoch. |
stableLink.updatedAt | integer | yes | When it was last pointed at a diagram, in milliseconds since the epoch. |
DiagramSeries
Its place in a series (the parts of one split import), or null when it is in none.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The series id the parts were published with. |
index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
total | integer | null | yes | How many parts the publisher said the series has, or null. |
StableLink
Present only when the publish named an alias: the stable link, now pointing at this diagram.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for managing the stable link (delete). It is not in its address. |
alias | string | yes | The name you gave it. Only you see it. |
url | string | yes | The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture. |
diagramId | string | null | yes | The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again. |
createdAt | integer | yes | When it was made, in milliseconds since the epoch. |
updatedAt | integer | yes | When it was last pointed at a diagram, in milliseconds since the epoch. |
HostedDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
RoutedPublish
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for the diagram in the routes below. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already in the library and was kept. |
sourceEmbedded | boolean | yes | True when the stored picture carries the diagram source: the call sent embedSource true, or left it out while the organisation's keepEditable is on. |
approval | ApprovalHold | no | Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves. |
approval.state | "pending" | yes | |
approval.requestId | string | yes | The request, as the Approvals queue lists it. |
approval.kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
approval.expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
approval.message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
approval.code | string | yes | The warning code a tool answer carries for it: W601. |
private | true | yes | The diagram is in an organisation's private library and has no public link. |
organization | PublishOrganization | yes | The organisation whose private library holds the diagram. |
organization.id | string | yes | |
organization.slug | string | yes | |
organization.name | string | yes | |
routedBy | "organisation-default" | "organisation-required" | no | Present when the organisation's Publishing setting chose its library for a publish that named no organisation: organisation-default (its members publish there unless they ask for a personal link) or organisation-required (they always do). |
OrganisationDiagramShare
Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
Classification
A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is.
| Field | Type | Required | Description |
|---|
ApprovalHold
Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves.
| Field | Type | Required | Description |
|---|---|---|---|
state | "pending" | yes | |
requestId | string | yes | The request, as the Approvals queue lists it. |
kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
code | string | yes | The warning code a tool answer carries for it: W601. |
PublishOrganization
The organisation whose private library holds the diagram.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
slug | string | yes | |
name | string | yes |
PublishedOrganisationDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for the diagram in the routes below. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already in the library and was kept. |
sourceEmbedded | boolean | yes | True when the stored picture carries the diagram source: the call sent embedSource true, or left it out while the organisation's keepEditable is on. |
approval | ApprovalHold | no | Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves. |
approval.state | "pending" | yes | |
approval.requestId | string | yes | The request, as the Approvals queue lists it. |
approval.kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
approval.expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
approval.message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
approval.code | string | yes | The warning code a tool answer carries for it: W601. |
OrganisationDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for the diagram in the routes below. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
PublishDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
scheme | "light" | "dark" | "auto" | no | The color scheme to draw it in: light, dark, or auto (one picture that follows the viewer's light or dark setting). Light when left out. |
theme | "light" | "dark" | "auto" | no | The old name of scheme, still taken from callers that send it: light, dark, or auto. Send scheme instead; refused when both are sent and differ. |
embedSource | boolean | no | Whether the stored SVG carries the diagram source in its metadata, so the picture can be edited later: read_diagram gives the source back from the link. The source is part of the picture, which anyone who has the link can read (for a diagram in an organisation, every member who can open it). Left out, a personal diagram carries the source, and a diagram that lands in an organisation follows its keepEditable setting (on unless the owner turned it off). Send false to leave the source out, such as for a public link whose labels name internal systems. The same diagram published with and without it is two pictures with two links. |
name | string | no | A label for the diagram in your list and in the Markdown snippet. Optional. at least 1 character; at most 80 characters; pattern ^[^\p{Cc}]+$/u. |
folder | string | null | no | The folder to file the diagram in. Left out, a new diagram goes to the top level and a diagram that is already hosted stays where it is. A path files a new diagram there, or moves the one that is already hosted and keeps its link. null puts it at the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
alias | string | no | Point a stable link with this name at the diagram, so one address always shows the latest version. The first publish with a name makes the stable link (the answer's stableLink.url) and every later publish with the same name moves it to the new diagram; the address never changes. How many stable links an account keeps depends on its plan. An alias asks for a personal link, so an organisation that requires its library refuses it (orgs.publish_required). Optional. at least 1 character; at most 60 characters; pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$. |
organization | string | no | An organisation's slug or id: the diagram goes to that organisation's private library, and the answer has private true and a viewUrl in place of a public link. The account must be a member who may publish there. Left out, the diagram goes to your own library, unless an organisation you belong to publishes its members' diagrams to its library. at least 1 character; at most 64 characters. |
personal | boolean | no | True asks for a public link in your own library even though an organisation you belong to publishes its members' diagrams to its library by default. An organisation that requires its library refuses it (403 orgs.publish_required). Not with organization. |
classification | any | no | |
series | SeriesInput | no | Publish the diagram as one part of a series: the parts of one big import, such as an overview and one diagram per group, each published with the same id and its place, the overview first. The portal shows a series as tabs of one diagram and can open it on one board. A part published at a place another diagram of the series holds takes the place. Left out, a diagram's series is left as it is. Optional. |
series.id | string | yes | The series id, the same for every part: letters, digits, - and _, up to 64 characters. It names nothing outside your library or the organisation's. at least 1 character; at most 64 characters; pattern ^[A-Za-z0-9_-]+$. |
series.index | integer | yes | The part's place in the series, from 1 (the overview); 0 is the whole import combined into one diagram, at most one a series. minimum 0; maximum 1000. |
series.total | integer | no | How many parts the series has. Optional. minimum 1; maximum 1000. |
SeriesInput
Publish the diagram as one part of a series: the parts of one big import, such as an overview and one diagram per group, each published with the same id and its place, the overview first. The portal shows a series as tabs of one diagram and can open it on one board. A part published at a place another diagram of the series holds takes the place. Left out, a diagram's series is left as it is. Optional.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The series id, the same for every part: letters, digits, - and _, up to 64 characters. It names nothing outside your library or the organisation's. at least 1 character; at most 64 characters; pattern ^[A-Za-z0-9_-]+$. |
index | integer | yes | The part's place in the series, from 1 (the overview); 0 is the whole import combined into one diagram, at most one a series. minimum 0; maximum 1000. |
total | integer | no | How many parts the series has. Optional. minimum 1; maximum 1000. |
HostedDiagramList
| Field | Type | Required | Description |
|---|---|---|---|
items | HostedDiagram[] | yes | At most 200, newest published first. |
items[].id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
items[].url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
items[].name | string | null | yes | The label given at publish, or null. |
items[].folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
items[].scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. |
items[].createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
items[].publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
items[].expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
items[].locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
items[].lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
items[].series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
items[].series.id | string | yes | The series id the parts were published with. |
items[].series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
items[].series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
stableLinks | StableLink[] | yes | Every stable link the account keeps, by alias, including any whose diagram is gone. |
stableLinks[].id | string | yes | The handle for managing the stable link (delete). It is not in its address. |
stableLinks[].alias | string | yes | The name you gave it. Only you see it. |
stableLinks[].url | string | yes | The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture. |
stableLinks[].diagramId | string | null | yes | The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again. |
stableLinks[].createdAt | integer | yes | When it was made, in milliseconds since the epoch. |
stableLinks[].updatedAt | integer | yes | When it was last pointed at a diagram, in milliseconds since the epoch. |
usage | HostingUsage | yes | |
usage.plan | "free" | "pro" | yes | The plan the account is on, which decides the limits. |
usage.count | integer | yes | Hosted diagrams the account holds. This is the total, even when the list is shorter. minimum 0. |
usage.bytes | integer | yes | Total size of the hosted diagrams in bytes. minimum 0. |
usage.stableLinks | integer | yes | Stable links the account keeps. minimum 0. |
usage.limits | HostingPlanLimits | yes | |
usage.limits.dailyCalls | integer | yes | |
usage.limits.hostedDiagrams | integer | yes | |
usage.limits.hostedBytes | integer | yes | |
usage.limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until you delete it. |
usage.limits.maxDiagramBytes | integer | yes | |
usage.limits.stableLinks | integer | yes | Stable links the account may keep at once. |
HostingUsage
| Field | Type | Required | Description |
|---|---|---|---|
plan | "free" | "pro" | yes | The plan the account is on, which decides the limits. |
count | integer | yes | Hosted diagrams the account holds. This is the total, even when the list is shorter. minimum 0. |
bytes | integer | yes | Total size of the hosted diagrams in bytes. minimum 0. |
stableLinks | integer | yes | Stable links the account keeps. minimum 0. |
limits | HostingPlanLimits | yes | |
limits.dailyCalls | integer | yes | |
limits.hostedDiagrams | integer | yes | |
limits.hostedBytes | integer | yes | |
limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until you delete it. |
limits.maxDiagramBytes | integer | yes | |
limits.stableLinks | integer | yes | Stable links the account may keep at once. |
HostingPlanLimits
| Field | Type | Required | Description |
|---|---|---|---|
dailyCalls | integer | yes | |
hostedDiagrams | integer | yes | |
hostedBytes | integer | yes | |
retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until you delete it. |
maxDiagramBytes | integer | yes | |
stableLinks | integer | yes | Stable links the account may keep at once. |
HostedDiagramSeries
| Field | Type | Required | Description |
|---|---|---|---|
items | HostedDiagram[] | yes | By place in the series, then newest first should two share a place. |
items[].id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
items[].url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
items[].name | string | null | yes | The label given at publish, or null. |
items[].folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
items[].scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. |
items[].createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
items[].publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
items[].expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
items[].locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
items[].lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
items[].series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
items[].series.id | string | yes | The series id the parts were published with. |
items[].series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
items[].series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
CombinedHostedSeries
| Field | Type | Required | Description |
|---|---|---|---|
diagram | PublishedDiagram | yes | |
diagram.id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
diagram.url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
diagram.name | string | null | yes | The label given at publish, or null. |
diagram.folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
diagram.scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
diagram.bytes | integer | yes | Size of the stored SVG in bytes. |
diagram.createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
diagram.publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
diagram.expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
diagram.locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
diagram.lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
diagram.series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
diagram.series.id | string | yes | The series id the parts were published with. |
diagram.series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
diagram.series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
diagram.created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already hosted and its link was kept. |
diagram.stableLink | StableLink | no | Present only when the publish named an alias: the stable link, now pointing at this diagram. |
diagram.stableLink.id | string | yes | The handle for managing the stable link (delete). It is not in its address. |
diagram.stableLink.alias | string | yes | The name you gave it. Only you see it. |
diagram.stableLink.url | string | yes | The public address, on the CDN host. It shows the diagram the stable link points at now (cached for up to 60 seconds) and never changes. Anyone with it can see the picture. |
diagram.stableLink.diagramId | string | null | yes | The diagram it shows now, or null when that diagram was deleted or expired; the address then answers 404 until you point the link at a diagram again. |
diagram.stableLink.createdAt | integer | yes | When it was made, in milliseconds since the epoch. |
diagram.stableLink.updatedAt | integer | yes | When it was last pointed at a diagram, in milliseconds since the epoch. |
merged | integer[] | yes | The places of the parts merged, in order. |
skipped | object[] | yes | The parts left out on purpose. |
skipped[].index | integer | yes | |
skipped[].name | string | yes | |
skipped[].reason | "overview" | "combined" | yes | overview: a split's overview, whose boxes stand for parts. combined: an earlier combined whole, which this one takes the place of. |
links | object | yes | The arrows between parts. |
links.restored | integer | yes | Arrows a part drew to a dashed box of another part, now ending on the box itself. |
links.kept | integer | yes | Arrows that still end on a dashed box naming another part, because that part is not in the series. |
note | string | yes | One sentence for the person: what was merged and how the arrows between parts were drawn. |
MoveDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | null | yes | The folder to file the diagram in, or null for the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
CreatedDiagram
| Field | Type | Required | Description |
|---|
CreateDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
scheme | "light" | "dark" | "auto" | no | The color scheme to draw it in: light, dark, or auto. Light when left out. |
name | string | no | A label for the diagram in your list and in the Markdown snippet. Optional. at least 1 character; at most 80 characters; pattern ^[^\p{Cc}]+$/u. |
folder | string | null | no | The folder to file the diagram in. Left out, a new diagram goes to the top level and a diagram that is already hosted stays where it is. A path files a new diagram there, or moves the one that is already hosted and keeps its link. null puts it at the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
EditedDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for managing the diagram (delete). It is not in the link. |
url | string | yes | The public address of the SVG. Anyone with the link can see it; the token in it cannot be guessed. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the plan keeps diagrams until you delete them. |
locked | boolean | yes | True while the diagram is locked: it cannot be deleted, renamed or moved until you unlock it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When it was locked, in milliseconds since the epoch, or null when it is not locked. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
warnings | Diagnostic[] | yes | Quality warnings from drawing the source, as draw_diagram gives them. Empty for a restore. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
changed | boolean | yes | False when the source draws the picture the diagram already has: nothing was stored and no version was kept. |
SaveDiagramSourceBody
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
scheme | "light" | "dark" | "auto" | no | The color scheme to draw it in: light, dark, or auto. Left out, the scheme the diagram has. |
baseVersion | integer | yes | The diagram's publishedAt (milliseconds since the epoch) when the editor loaded it. If the diagram was saved since, the answer is 409 diagram.version_conflict with details.currentVersion. minimum 0. |
DiagramVersionList
| Field | Type | Required | Description |
|---|---|---|---|
items | DiagramVersion[] | yes | Newest first. A diagram keeps at most ten. |
items[].id | string | yes | The handle for restoring it. |
items[].savedAt | integer | yes | When it stopped being the current picture, in milliseconds since the epoch. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. Versions do not count toward the plan. |
items[].scheme | "light" | "dark" | "auto" | yes |
DiagramVersion
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for restoring it. |
savedAt | integer | yes | When it stopped being the current picture, in milliseconds since the epoch. |
bytes | integer | yes | Size of the stored SVG in bytes. Versions do not count toward the plan. |
scheme | "light" | "dark" | "auto" | yes |
RestoreDiagramVersionBody
| Field | Type | Required | Description |
|---|---|---|---|
baseVersion | integer | yes | The diagram's publishedAt (milliseconds since the epoch) when the editor loaded it. If the diagram was saved since, the answer is 409 diagram.version_conflict with details.currentVersion. minimum 0. |
SetStableLinkBody
| Field | Type | Required | Description |
|---|---|---|---|
alias | string | yes | The name of a stable link: lower-case letters and digits in words joined by single hyphens, up to 60 characters. Only you see it; the public address carries a random token instead. at least 1 character; at most 60 characters; pattern ^[a-z0-9]+(?:-[a-z0-9]+)*$. |
diagramId | string | yes | One of your hosted diagrams, by its id. |
OEmbedPhoto
| Field | Type | Required | Description |
|---|---|---|---|
version | "1.0" | yes | |
type | "photo" | yes | |
provider_name | string | yes | |
provider_url | string | yes | |
title | string | yes | Always "Diagram": the diagram's own name is shown only to its owner. |
url | string | yes | The picture. For a stable link, the stable link itself, so the embed keeps showing the latest version. |
width | integer | yes | |
height | integer | yes | |
cache_age | integer | yes | Seconds the answer may be kept: 60 for a stable link, 3600 for a picture. |
Me
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | null | yes | |
email | string | no | The account's address: for a key always, for an app only with the email scope. |
organisation | object | null | yes | The organisation the key or the grant is for, or null. |
organisation.id | string | yes | |
organisation.slug | string | yes | |
organisation.name | string | yes |
LibraryPage
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | yes | |
items[].id | string | yes | |
items[].name | string | null | yes | |
items[].folder | string | null | yes | |
items[].scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
items[].bytes | integer | yes | |
items[].updatedAt | integer | yes | When it was last published, in milliseconds since the epoch. |
items[].classification | "public" | "internal" | "confidential" | null | yes | Its label in an organisation's library, or null for a person's own diagram. |
nextCursor | string | null | yes |
MapIconsResponse
An icon, or candidates, for each name sent, and the names that found no icon.
| Field | Type | Required | Description |
|---|---|---|---|
provider | "aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel" | null | yes | The provider hint that was used, or null. |
results | object[] | yes | One entry per name that matched something, in the order sent. |
results[].name | string | yes | The name exactly as it was sent. |
results[].resolved | boolean | yes | True when icon holds the one icon to use. False when the name could mean more than one: choose from candidates, or ask the user. |
results[].icon | string | null | yes | The icon to write as icon=, such as aws:lambda; null when resolved is false. |
results[].confidence | "exact" | "strong" | "ambiguous" | yes | exact: the name is the icon or product name. strong: the name clearly points at this icon and no other provider competes. ambiguous: several icons fit, or the match is by idea only. |
results[].alternatives | string[] | yes | Up to 3 other icons that also fit a resolved name, best first. Empty when none. |
results[].candidates | string[] | yes | When resolved is false, the icons that fit, best first (up to 4). Empty when resolved. |
gaps | object[] | yes | Names that matched nothing, in the order sent. |
gaps[].name | string | yes | The name that matched no icon. |
gaps[].fallback | string | yes | A neutral icon to use instead, or leave icon= out so the node type draws its own. |
gaps[].reason | string | yes | Why there is no match, and what to try. |
resolvedCount | integer | yes | How many names have one icon to use. |
ambiguousCount | integer | yes | How many names need a choice from candidates. |
gapCount | integer | yes | How many names matched nothing. |
MapIconsInput
Names to find icons for, and an optional provider to look in first.
| Field | Type | Required | Description |
|---|---|---|---|
names | string[] | yes | Services, products, or ideas to find icons for, written as the user wrote them ("S3", "Postgres", "load balancer"). Up to 40 names of up to 80 characters. |
provider | "aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel" | no | The cloud the architecture runs on. A name is looked up there first, so "queue" finds aws:sqs for aws. Omit it when the names are not tied to one provider. |
IconSearchResponse
Matching bundled icon names.
| Field | Type | Required | Description |
|---|---|---|---|
query | string | yes | The query that was searched. |
items | string[] | yes | Matching icon references as set:name, best match first. |
ImportSourceResponse
The result of turning a file of another format into Plotwork source.
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | True when source is valid Plotwork source. False means nothing was imported and source is empty: read diagnostics. |
kind | string | null | yes | The kind of diagram the file became, or null when nothing was imported. |
format | string | yes | The format the text was read as. |
source | string | yes | The Plotwork source, or an empty string when nothing could be imported. |
diagnostics | Diagnostic[] | yes | Everything left out, changed, or wrong, with a hint. Codes start with I and point into the text you sent: I1xx errors stopped the import, I2xx warnings did not. |
diagnostics[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
diagnostics[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
diagnostics[].message | string | yes | What is wrong, in one sentence. |
diagnostics[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
diagnostics[].column | integer | yes | 1-based column in that line. minimum 1. |
diagnostics[].length | integer | yes | Number of characters the problem covers. minimum 1. |
diagnostics[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
diagnostics[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
diagnostics[].fix.label | string | yes | What the fix does, in a few words, for a button. |
diagnostics[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
stats | object | yes | |
stats.items | integer | yes | Boxes, tables, rows, slices, places, entries, or commits written. |
stats.links | integer | yes | Arrows, relations, messages, flows, or merges written. |
stats.groups | integer | yes | Frames, sections, or folders written. |
stats.dropped | integer | yes | Things in the file left out by a cap or because the picture has no place for them; each is in diagnostics. |
coverage | object | null | yes | How much of the file the picture shows; null when nothing was imported. When complete is false, the picture is not the whole file: say so. |
coverage.noun | string | yes | What was counted, such as resources, services, tables, or endpoints. |
coverage.total | integer | yes | Everything of that kind in the file. |
coverage.drawn | integer | yes | Drawn as a box, frame, table, row, or entry of its own. |
coverage.summarised | integer | yes | Not drawn on their own but counted on the box they belong to, such as "3 role assignments". |
coverage.omitted | integer | yes | Not in the picture at all; the diagnostics say which and why. |
coverage.complete | boolean | yes | True when nothing was omitted. |
coverage.line | string | yes | The coverage in one sentence, such as "Drawn 12 of 85 resources; 60 are counted on the boxes they belong to and 13 are left out.". |
validation | object | null | yes | The Plotwork validator run on source; null when nothing was imported. |
validation.valid | boolean | yes | True when the source has no Plotwork errors. It always is when ok is true. |
validation.errors | Diagnostic[] | yes | Plotwork errors. Lines and columns point into source. |
validation.errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
validation.errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
validation.errors[].message | string | yes | What is wrong, in one sentence. |
validation.errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
validation.errors[].column | integer | yes | 1-based column in that line. minimum 1. |
validation.errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
validation.errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
validation.errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
validation.warnings | Diagnostic[] | yes | Plotwork quality warnings, with the exact fix in each hint. Lines and columns point into source. |
validation.warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
validation.warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
validation.warnings[].message | string | yes | What is wrong, in one sentence. |
validation.warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
validation.warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
validation.warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
validation.warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
validation.warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
validation.summary | string | null | yes | One-line description of the diagram, usable as alt text. |
validation.size | object | null | yes | Natural size of the laid-out diagram. |
validation.size.width | integer | yes | Width in px. minimum 1. |
validation.size.height | integer | yes | Height in px. minimum 1. |
parts | object[] | yes | When the file is too big for one readable picture, the diagrams it was split into, in order, at most 24 a page; source is the first diagram of all. Show or draw each of them. Empty when the import is one diagram. |
parts[].index | integer | yes | Its place among all the parts, from 1. minimum 1. |
parts[].title | string | yes | What this diagram shows, such as one resource group or one tag of an API. |
parts[].kind | string | yes | The kind of diagram. |
parts[].source | string | yes | The Plotwork source of this diagram; draw it with draw_diagram. |
parts[].items | integer | yes | The boxes, rows, or entries it draws. |
parts[].valid | boolean | yes | True when the source has no Plotwork errors. |
parts[].warnings | Diagnostic[] | yes | Plotwork quality warnings of this diagram. Lines and columns point into its source. |
parts[].warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
parts[].warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
parts[].warnings[].message | string | yes | What is wrong, in one sentence. |
parts[].warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
parts[].warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
parts[].warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
parts[].warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
parts[].warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
partsTotal | integer | yes | How many diagrams the import was split into in all; 0 when it is one diagram. |
partsPage | integer | yes | The page of parts this answer holds, from 1. |
partsPages | integer | yes | How many pages of parts there are; call again with partsPage for the next one. |
series | object | null | yes | For a split import, publish_diagram's series for every part, with the part's index. Null for one diagram. |
series.id | string | yes | |
series.total | integer | yes | |
combined | object | null | yes | A split import as one diagram, every arrow kept; publish at series index 0. |
combined.title | string | yes | |
combined.source | string | yes | |
outline | string[] | yes | The diagram as plain text, to check it says what the file says; empty when nothing was imported. |
outlineTruncated | boolean | yes | True when the outline was cut short at its summary length. |
viewUrl | string | no | A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so. |
pngUrl | string | no | The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long. |
svgUrl | string | no | The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long. |
saveCommand | string | no | Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long. |
next | string | yes | The next step in one sentence. |
ImportSourceInput
A file of another format to turn into Plotwork source.
| Field | Type | Required | Description |
|---|---|---|---|
format | "sql" | "prisma" | "drizzle" | "openapi" | "graphql" | "protobuf" | "terraform" | "terraform-plan" | "bicep" | "arm" | "pulumi" | "cloudformation" | "cdk" | "serverless" | "compose" | "dockerfile" | "kubernetes" | "helm" | "kustomize" | "nginx" | "backstage" | "structurizr" | "asyncapi" | "github-actions" | "gitlab-ci" | "azure-pipelines" | "dbt" | "workspaces" | "drawio" | "csv" | "json" | "tree" | "git-log" | yes | What the text is; get_diagram_syntax with topic import-formats describes each. |
text | string | no | The file content, as text. Send text or files, not both. |
files | object[] | no | The files of a folder, for a format that spans files; the others read the first. |
files[].path | string | yes | The file path, such as infra/network.tf; diagnostics name it. at least 1 character; at most 300 characters. |
files[].text | string | yes | The file content, as text. |
title | string | no | The diagram title; taken from the file when left out. at most 200 characters. |
partsPage | integer | no | Page of parts, 24 a page. minimum 1; maximum 100000. |
large | "parts" | "whole" | "both" | no | Too big for one picture: parts, whole, or both. |
options | object | no | default {}. |
options.view | "endpoints" | "map" | "sequence" | "git" | "timeline" | "context" | "container" | "component" | no | The picture of a format drawn several ways. |
options.operationId | string | no | openapi sequence: the operation. at most 200 characters. |
options.chart | "auto" | "xychart" | "pie" | "sankey" | "treemap" | "matrix" | no | csv, json: the chart; auto picks. |
options.tables | string[] | no | Tables to draw, by name or prefix*. |
options.paths | string[] | no | openapi: path prefixes to read. |
options.tags | string[] | no | openapi: tags to read. |
options.varFiles | string[] | no | Variables files to apply. |
options.groupBy | "module" | "network" | "file" | "owner" | no | How things are framed; module is the default. |
options.root | string | no | The root, stack, template, or draw.io page of several to draw. at most 300 characters. |
options.icons | "auto" | "off" | no | off: no icons, as settings with icons off. |
RunTaskAck
| Field | Type | Required | Description |
|---|---|---|---|
outcome | "verified" | "accepted" | yes | verified: the address check HCP Terraform makes when the run task is created. accepted: a run, which is drawn and reported back after this answer. |
SyncMarkdownResponse
The result of turning a document's diagram fences into pictures.
| Field | Type | Required | Description |
|---|---|---|---|
mode | "sync" | "check" | yes | The mode that ran. |
markdown | string | yes | The document to write back: every diagram fence wrapped in its collapsed source section, with the picture block and text description under it, and everything else unchanged. In check mode this is the document that was sent. |
changed | boolean | yes | True when the document or a file differs from what was sent. In check mode this says the pictures are stale or a fence would convert. |
files | object[] | yes | The SVG files to write for each picture that was refreshed (one, or light and dark with schemes light-and-dark), with paths relative to the repository root. Empty in check mode. A picture that was already current has no files. |
files[].path | string | yes | Where to write the file, relative to the repository root. |
files[].content | string | no | The file contents; absent when files is none. |
files[].encoding | "utf8" | yes | How content is encoded. Always utf8: the files are SVG text. |
files[].bytes | integer | no | Only when files is none: the size of the file in bytes. |
files[].sha256 | string | no | Only when files is none: the SHA-256 of the content, in hex, to check a file fetched later. |
files[].viewUrl | string | no | Only when files is none: a link that shows this diagram in a browser. |
report | object[] | yes | One entry per fence handled, in document order. |
report[].id | string | null | yes | The picture id, which names the SVG files; null for a fence that has none (a mermaid fence that was not converted). |
report[].source | "diagram" | "mermaid" | yes | diagram for a fence that was already Plotwork, mermaid for one that came from Mermaid. |
report[].kind | string | null | yes | The diagram kind, or null when it could not be read. |
report[].line | integer | yes | The 1-based line of the opening fence in the document that was sent. minimum 1. |
report[].status | "synced" | "converted" | "unchanged" | "skipped" | "failed" | yes | synced: the picture was written or refreshed. converted: a mermaid fence became a diagram fence and was drawn. unchanged: the picture was already current. skipped: a cap stopped it, see message. failed: it has errors, the fence is left as it was. |
report[].diagnostics | Diagnostic[] | yes | Errors and warnings, with line numbers counted in the document that was sent. For a converted fence they point at the Mermaid lines. |
report[].diagnostics[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
report[].diagnostics[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
report[].diagnostics[].message | string | yes | What is wrong, in one sentence. |
report[].diagnostics[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
report[].diagnostics[].column | integer | yes | 1-based column in that line. minimum 1. |
report[].diagnostics[].length | integer | yes | Number of characters the problem covers. minimum 1. |
report[].diagnostics[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
report[].diagnostics[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
report[].message | string | null | yes | A plain sentence when something needs saying, such as why a fence was skipped; otherwise null. |
summary | object | yes | |
summary.diagrams | integer | yes | Fences handled: synced, converted, unchanged, skipped, and failed together. |
summary.synced | integer | yes | |
summary.converted | integer | yes | |
summary.unchanged | integer | yes | |
summary.skipped | integer | yes | |
summary.failed | integer | yes | |
summary.mermaidIgnored | integer | yes | Mermaid fences left alone because convertMermaid was false. |
summary.files | integer | yes | Files to write. |
summary.outputBytes | integer | yes | Bytes in the returned document and files together. |
caps | object | yes | |
caps.hit | boolean | yes | True when a cap stopped some of the work. Nothing is cut silently: see messages. |
caps.messages | string[] | yes | One plain sentence per cap that was hit, saying what was skipped and what to do. |
caps.maxDiagrams | integer | yes | Most fences handled in one call. |
caps.maxOutputBytes | integer | yes | Most bytes in the returned document and files together. |
pages | object | no | Present when page or pageSize was sent: which pictures files holds, and the next page. |
pages.page | integer | yes | |
pages.pageSize | integer | yes | |
pages.pages | integer | yes | Pages in all. |
pages.pictures | integer | yes | Pictures in all, each one file or a light and a dark one. |
pages.nextPage | integer | null | yes | The page to ask for next, or null on the last one. |
next | string | yes | The next step in one sentence. |
SyncMarkdownInput
A Markdown document and how to turn its diagram fences into pictures.
| Field | Type | Required | Description |
|---|---|---|---|
markdown | string | yes | The whole Markdown document, exactly as it is on disk, with its line endings. Up to 10000000 characters. at least 1 character; at most 10000000 characters. |
documentPath | string | yes | Where the document lives, relative to the repository root, with forward slashes, for example docs/guide.md. Picture links and file paths are worked out from it. at least 1 character; at most 300 characters. |
assetsDir | string | no | The directory for the SVG files, relative to the repository root. The default is assets/diagrams next to the document. at least 1 character; at most 300 characters. |
prefix | string | no | Text put in front of every picture file name, for documents that share one assets directory. By default a titled diagram is named from its title and an untitled one from the document name. at least 1 character; at most 32 characters. |
convertMermaid | boolean | no | When true, every mermaid fence that can be converted is replaced by a diagram fence first, then drawn. Fences that cannot be converted are left exactly as they were and reported. default false. |
mode | "sync" | "check" | no | sync (the default) returns the rewritten document and the files to write. check changes nothing: it only reports whether a picture is stale or a fence would convert. default "sync". |
files | "inline" | "none" | no | inline (the default) returns each SVG file with its content. none returns each with path, bytes, sha256, and viewUrl instead, so the answer stays small. default "inline". |
page | integer | no | Which page of files to return, from 1; pictures are paged in document order, a light and a dark file together. minimum 1. |
pageSize | integer | no | Pictures per page, at most 30. Setting page or pageSize turns paging on. minimum 1; maximum 30. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
PlanDocumentResponse
The sections of a document a picture would help, each with a kind, a reason, and a starter.
| Field | Type | Required | Description |
|---|---|---|---|
summary | string | yes | One sentence: how many sections were read and how many would gain a picture. |
format | "markdown" | "html" | "text" | yes | How the document was read: Markdown headings, HTML h1 to h6, or plain text with heading-like lines. |
sectionsRead | integer | yes | Sections read, up to the cap. |
suggestions | object[] | yes | In document order. Sections that read well as text, or already have a diagram, are not listed. |
suggestions[].heading | string | yes | The heading of the section, as written. |
suggestions[].line | integer | yes | The 1-based line of the heading in the document that was sent. minimum 1. |
suggestions[].kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
suggestions[].style | string | null | yes | The style the starter uses: compare, score, raci, or risk for a matrix, files or org for a tree; null for the kind's only style. |
suggestions[].why | string | yes | One sentence: what in the section points to this kind. |
suggestions[].confidence | "high" | "medium" | "low" | yes | high: the text names this kind of picture or its shape fits it exactly. medium: it leans toward it. low: a fallback worth considering. |
suggestions[].starter | string | yes | A short Plotwork source of this kind that parses without errors: built from the names and numbers in the text where it could find them, otherwise a small example to edit. Replace every placeholder before you draw it. |
suggestions[].tailored | boolean | yes | True when the starter uses names or numbers from the text; false when it is the kind's small example. |
caps | object | yes | |
caps.hit | boolean | yes | True when a cap left something out; messages says what. |
caps.messages | string[] | yes | |
caps.maxSections | integer | yes | |
caps.maxSuggestions | integer | yes | |
next | string | yes | The next step in one sentence. |
PlanDocumentInput
A document to read for the sections a picture would help.
| Field | Type | Required | Description |
|---|---|---|---|
document | string | yes | The whole document: Markdown, plain text pasted from Confluence, Notion, or Google Docs, or HTML. Up to 10000000 characters. at least 1 character; at most 10000000 characters. |
maxSuggestions | integer | no | Most sections to suggest a picture for, up to 12. The strongest are kept, in document order. The default is 8. minimum 1; maximum 12; default 8. |
AuthorizationServerMetadata
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | |
authorization_endpoint | string | yes | |
token_endpoint | string | yes | |
revocation_endpoint | string | yes | |
response_types_supported | string[] | yes | |
grant_types_supported | string[] | yes | |
code_challenge_methods_supported | string[] | yes | |
token_endpoint_auth_methods_supported | string[] | yes | |
revocation_endpoint_auth_methods_supported | string[] | yes | |
scopes_supported | string[] | yes | |
authorization_response_iss_parameter_supported | boolean | yes | |
service_documentation | string | yes |
TokenAnswer
| Field | Type | Required | Description |
|---|---|---|---|
access_token | string | yes | pwa_... Send it as Authorization: Bearer. Works for an hour. |
token_type | "Bearer" | yes | |
expires_in | integer | yes | |
refresh_token | string | yes | pwr_... Works once, for 30 days; a refresh answers a new one. |
scope | string | yes |
OAuthError
| Field | Type | Required | Description |
|---|---|---|---|
error | "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "invalid_scope" | yes | |
error_description | string | yes |
TokenForm
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | string | yes | authorization_code or refresh_token. |
code | string | no | |
redirect_uri | string | no | |
code_verifier | string | no | |
refresh_token | string | no | |
scope | string | no | |
client_id | string | no | Required unless sent with HTTP Basic. |
client_secret | string | no | A confidential app sends its secret here or with HTTP Basic. |
RevokeForm
| Field | Type | Required | Description |
|---|---|---|---|
token | string | no | The access or refresh token to revoke. Required. |
token_type_hint | string | no | access_token or refresh_token. Optional; the token is found either way. |
client_id | string | no | |
client_secret | string | no |
OrganisationList
| Field | Type | Required | Description |
|---|---|---|---|
items | Organisation[] | yes | By name, at most 100. |
items[].id | string | yes | |
items[].slug | string | yes | |
items[].name | string | yes | |
items[].role | "owner" | "admin" | "member" | "reader" | yes | What the caller is in this organisation. |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].memberCount | integer | yes | People who have joined, the owner included. The same number as usage.members. minimum 0. |
items[].plan | "free" | "pro" | "enterprise" | yes | The organisation's plan: enterprise under a contract, otherwise its owner's. |
items[].contractEndsOn | string | null | yes | The last day of the Enterprise contract, YYYY-MM-DD, or null when there is none or it has no end date written. The terms of a contract are not shown to members. |
items[].usage | OrganisationUsage | yes | |
items[].usage.diagrams | integer | yes | minimum 0. |
items[].usage.bytes | integer | yes | minimum 0. |
items[].usage.members | integer | yes | People who have joined, the owner included. minimum 0. |
items[].usage.invites | integer | yes | Invitations that can still be accepted. They count toward the member limit. minimum 0. |
items[].limits | OrganisationLimits | yes | |
items[].limits.dailyCalls | integer | yes | |
items[].limits.hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
items[].limits.hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
items[].limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
items[].limits.maxDiagramBytes | integer | yes | |
items[].limits.stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
items[].limits.organisations | integer | yes | Organisations an account on this plan may own. |
items[].limits.orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
items[].limits.orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
items[].limits.driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
items[].limits.auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
items[].limits.boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
items[].limits.boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
items[].limits.boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
items[].limits.boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
items[].limits.boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
items[].limits.boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
items[].limits.boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
items[].limits.boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
items[].avatar | OrgAvatar | yes | The organisation's uploaded avatar, or null when it has none and a mark made from its id stands in. |
items[].avatar.version | string | yes | Changes with every upload. Put it in the address (?v=) so a new picture is a new address. |
items[].avatar.contentType | "image/svg+xml" | "image/png" | "image/gif" | "image/webp" | yes | |
items[].avatar.animated | boolean | yes | True when it moves, so a page can hold it still for a person who asked for less motion. |
items[].keepEditable | boolean | yes | The owner's setting "Keep diagrams editable": true when a publish to the organisation that does not send embedSource writes the diagram source into the picture, so members can edit it in the portal later. Every member can open such a picture and read its source. |
items[].publishing | OrganisationPublishing | yes | |
items[].publishing.policy | "personal" | "organisation-default" | "organisation-required" | yes | What the owner or an admin chose: personal (members publish where they choose), organisation-default (a member's publish that names no organisation goes to this library), or organisation-required (nothing a member publishes reaches a public link). |
items[].publishing.effective | "personal" | "organisation-default" | "organisation-required" | yes | What is enforced now: the choice, except organisation-required on a plan that no longer includes it, which acts as organisation-default. |
items[].publishing.hideViewLinks | boolean | yes | Whether hosted answers leave view links out for members and the organisation's keys. Honoured only while effective is organisation-required. |
items[].publishing.requiredAvailable | boolean | yes | Whether the organisation's plan includes organisation-required (Pro and Enterprise). |
items[].sharing | OrganisationSharing | yes | |
items[].sharing.publicSharing | boolean | yes | "Allow public sharing of individual diagrams": while true, the owner and admins may share any diagram, and a member a diagram they published, at a public link. Off by default. Turning it off ends every link. |
items[].sharing.sharedCount | integer | yes | How many of the organisation's diagrams have a public link now. Counted against the plan's stableLinks. minimum 0. |
items[].sharing.autoPublish | boolean | yes | "Agents publish every diagram they draw": while true, every valid drawing made through one of the organisation's agent connections or keys is stored in its private library with its source. Off by default. |
items[].sharing.embedLinks | boolean | yes | "Allow diagrams on chosen websites" (Enterprise): while true, a diagram may have embed links that show it only on the websites they name. Off by default. Turning it off ends every embed link. |
items[].sharing.embedLinkCount | integer | yes | How many embed links the organisation has now. minimum 0. |
items[].governance | OrganisationGovernance | yes | |
items[].governance.available | boolean | yes | Whether the organisation's plan includes the policies (Enterprise). A choice saved before is kept, and is not applied without it. |
items[].governance.retention | OrganisationRetention | yes | |
items[].governance.legalHold | object | null | yes | The legal hold, or null when it is off. While it is on nothing of the organisation is deleted: no sweep, no member, and not the organisation itself. |
items[].governance.patternsOnly | boolean | yes | "Agents start from approved patterns": find_pattern, called through the organisation's connections and keys, answers with its own patterns only. |
items[].governance.styleRulesStrict | boolean | yes | "Style rules are errors": a publish to the library that breaks a saved style rule is refused with the findings. |
items[].classification | OrganisationClassificationSummary | yes | |
items[].classification.default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
items[].classification.sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
items[].approval | OrganisationApprovalSummary | yes | |
items[].approval.publish | "off" | "folders" | "all" | yes | "Publishing needs approval": off, folders (the chosen folders and every folder inside them) or all. |
items[].approval.share | boolean | yes | "Public sharing needs approval". |
items[].approval.approver | boolean | yes | True when the caller decides requests: the owner, an admin, or a member chosen as an approver. |
items[].approval.pending | integer | null | yes | How many requests wait for a decision, for an approver; null for anyone else. minimum 0. |
items[].agents | OrganisationAgents | yes | |
items[].agents.approvedOnly | boolean | yes | "Only approved agents can connect": while true, an agent connects to the organisation only when it is on the approved list. |
items[].agents.approved | string[] | yes | The approved agents by label, such as "Claude Code". Empty while approvedOnly is false. What identifies each is on GET /orgs/{org}/policies/agents, for the owner and admins. |
items[].agents.orgOnly | boolean | yes | "Agents connect to this organisation", as applied: a member on a verified domain connects agents to the organisation, not to their own account. False on a plan without single sign-on. |
items[].logAccess | boolean | yes | Whether the caller may read the audit log and the call history: the owner and admins, or a role or person the owner let in (PUT /orgs/{org}/log-access). |
items[].boardsEnabled | boolean | yes | Whether live whiteboards are on for the organisation: its plan has them and Plotwork turned them on. The Boards section shows only then. |
Organisation
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
slug | string | yes | |
name | string | yes | |
role | "owner" | "admin" | "member" | "reader" | yes | What the caller is in this organisation. |
createdAt | integer | yes | Milliseconds since the epoch. |
memberCount | integer | yes | People who have joined, the owner included. The same number as usage.members. minimum 0. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan: enterprise under a contract, otherwise its owner's. |
contractEndsOn | string | null | yes | The last day of the Enterprise contract, YYYY-MM-DD, or null when there is none or it has no end date written. The terms of a contract are not shown to members. |
usage | OrganisationUsage | yes | |
usage.diagrams | integer | yes | minimum 0. |
usage.bytes | integer | yes | minimum 0. |
usage.members | integer | yes | People who have joined, the owner included. minimum 0. |
usage.invites | integer | yes | Invitations that can still be accepted. They count toward the member limit. minimum 0. |
limits | OrganisationLimits | yes | |
limits.dailyCalls | integer | yes | |
limits.hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
limits.hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
limits.maxDiagramBytes | integer | yes | |
limits.stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
limits.organisations | integer | yes | Organisations an account on this plan may own. |
limits.orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
limits.orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
limits.driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
limits.auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
limits.boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
limits.boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
limits.boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
limits.boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
limits.boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
limits.boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
limits.boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
limits.boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
avatar | OrgAvatar | yes | The organisation's uploaded avatar, or null when it has none and a mark made from its id stands in. |
avatar.version | string | yes | Changes with every upload. Put it in the address (?v=) so a new picture is a new address. |
avatar.contentType | "image/svg+xml" | "image/png" | "image/gif" | "image/webp" | yes | |
avatar.animated | boolean | yes | True when it moves, so a page can hold it still for a person who asked for less motion. |
keepEditable | boolean | yes | The owner's setting "Keep diagrams editable": true when a publish to the organisation that does not send embedSource writes the diagram source into the picture, so members can edit it in the portal later. Every member can open such a picture and read its source. |
publishing | OrganisationPublishing | yes | |
publishing.policy | "personal" | "organisation-default" | "organisation-required" | yes | What the owner or an admin chose: personal (members publish where they choose), organisation-default (a member's publish that names no organisation goes to this library), or organisation-required (nothing a member publishes reaches a public link). |
publishing.effective | "personal" | "organisation-default" | "organisation-required" | yes | What is enforced now: the choice, except organisation-required on a plan that no longer includes it, which acts as organisation-default. |
publishing.hideViewLinks | boolean | yes | Whether hosted answers leave view links out for members and the organisation's keys. Honoured only while effective is organisation-required. |
publishing.requiredAvailable | boolean | yes | Whether the organisation's plan includes organisation-required (Pro and Enterprise). |
sharing | OrganisationSharing | yes | |
sharing.publicSharing | boolean | yes | "Allow public sharing of individual diagrams": while true, the owner and admins may share any diagram, and a member a diagram they published, at a public link. Off by default. Turning it off ends every link. |
sharing.sharedCount | integer | yes | How many of the organisation's diagrams have a public link now. Counted against the plan's stableLinks. minimum 0. |
sharing.autoPublish | boolean | yes | "Agents publish every diagram they draw": while true, every valid drawing made through one of the organisation's agent connections or keys is stored in its private library with its source. Off by default. |
sharing.embedLinks | boolean | yes | "Allow diagrams on chosen websites" (Enterprise): while true, a diagram may have embed links that show it only on the websites they name. Off by default. Turning it off ends every embed link. |
sharing.embedLinkCount | integer | yes | How many embed links the organisation has now. minimum 0. |
governance | OrganisationGovernance | yes | |
governance.available | boolean | yes | Whether the organisation's plan includes the policies (Enterprise). A choice saved before is kept, and is not applied without it. |
governance.retention | OrganisationRetention | yes | |
governance.retention.libraryDays | 90 | yes | "Delete library diagrams not updated for": 90, 180, 365 or 730 days, or null for never (the default). |
governance.retention.auditDays | 365 | yes | "Keep the audit log for": 365, 730 or 2555 days (one, two or seven years), or null for the plan's days (the default). It only lengthens. |
governance.retention.planLibraryDays | integer | null | yes | How long the plan keeps a diagram after its last publish, or null for until it is deleted. The plan's limit wins when it is shorter. |
governance.retention.planAuditDays | integer | yes | How many days the plan keeps an audit event. |
governance.retention.effectiveLibraryDays | integer | null | yes | What is applied: the shorter of planLibraryDays and libraryDays. Null when diagrams are kept until they are deleted. |
governance.retention.effectiveAuditDays | integer | yes | What is applied: the longer of planAuditDays and auditDays, auditDays counted up to auditMaxDays. |
governance.retention.auditMaxDays | integer | yes | The longest auditDays this server takes: 730 unless its database is on D1's paid tier, then 2555. Every organisation shares one database. |
governance.legalHold | object | null | yes | The legal hold, or null when it is off. While it is on nothing of the organisation is deleted: no sweep, no member, and not the organisation itself. |
governance.legalHold.since | integer | yes | When the owner turned it on, in milliseconds since the epoch. |
governance.legalHold.reason | string | null | yes | The reason the owner typed. Shown to the owner and admins; null for anyone else. |
governance.patternsOnly | boolean | yes | "Agents start from approved patterns": find_pattern, called through the organisation's connections and keys, answers with its own patterns only. |
governance.styleRulesStrict | boolean | yes | "Style rules are errors": a publish to the library that breaks a saved style rule is refused with the findings. |
classification | OrganisationClassificationSummary | yes | |
classification.default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
classification.sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
approval | OrganisationApprovalSummary | yes | |
approval.publish | "off" | "folders" | "all" | yes | "Publishing needs approval": off, folders (the chosen folders and every folder inside them) or all. |
approval.share | boolean | yes | "Public sharing needs approval". |
approval.approver | boolean | yes | True when the caller decides requests: the owner, an admin, or a member chosen as an approver. |
approval.pending | integer | null | yes | How many requests wait for a decision, for an approver; null for anyone else. minimum 0. |
agents | OrganisationAgents | yes | |
agents.approvedOnly | boolean | yes | "Only approved agents can connect": while true, an agent connects to the organisation only when it is on the approved list. |
agents.approved | string[] | yes | The approved agents by label, such as "Claude Code". Empty while approvedOnly is false. What identifies each is on GET /orgs/{org}/policies/agents, for the owner and admins. |
agents.orgOnly | boolean | yes | "Agents connect to this organisation", as applied: a member on a verified domain connects agents to the organisation, not to their own account. False on a plan without single sign-on. |
logAccess | boolean | yes | Whether the caller may read the audit log and the call history: the owner and admins, or a role or person the owner let in (PUT /orgs/{org}/log-access). |
boardsEnabled | boolean | yes | Whether live whiteboards are on for the organisation: its plan has them and Plotwork turned them on. The Boards section shows only then. |
OrganisationUsage
| Field | Type | Required | Description |
|---|---|---|---|
diagrams | integer | yes | minimum 0. |
bytes | integer | yes | minimum 0. |
members | integer | yes | People who have joined, the owner included. minimum 0. |
invites | integer | yes | Invitations that can still be accepted. They count toward the member limit. minimum 0. |
OrganisationLimits
| Field | Type | Required | Description |
|---|---|---|---|
dailyCalls | integer | yes | |
hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
maxDiagramBytes | integer | yes | |
stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
organisations | integer | yes | Organisations an account on this plan may own. |
orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
OrgAvatar
The organisation's uploaded avatar, or null when it has none and a mark made from its id stands in.
| Field | Type | Required | Description |
|---|---|---|---|
version | string | yes | Changes with every upload. Put it in the address (?v=) so a new picture is a new address. |
contentType | "image/svg+xml" | "image/png" | "image/gif" | "image/webp" | yes | |
animated | boolean | yes | True when it moves, so a page can hold it still for a person who asked for less motion. |
OrganisationPublishing
| Field | Type | Required | Description |
|---|---|---|---|
policy | "personal" | "organisation-default" | "organisation-required" | yes | What the owner or an admin chose: personal (members publish where they choose), organisation-default (a member's publish that names no organisation goes to this library), or organisation-required (nothing a member publishes reaches a public link). |
effective | "personal" | "organisation-default" | "organisation-required" | yes | What is enforced now: the choice, except organisation-required on a plan that no longer includes it, which acts as organisation-default. |
hideViewLinks | boolean | yes | Whether hosted answers leave view links out for members and the organisation's keys. Honoured only while effective is organisation-required. |
requiredAvailable | boolean | yes | Whether the organisation's plan includes organisation-required (Pro and Enterprise). |
OrganisationSharing
| Field | Type | Required | Description |
|---|---|---|---|
publicSharing | boolean | yes | "Allow public sharing of individual diagrams": while true, the owner and admins may share any diagram, and a member a diagram they published, at a public link. Off by default. Turning it off ends every link. |
sharedCount | integer | yes | How many of the organisation's diagrams have a public link now. Counted against the plan's stableLinks. minimum 0. |
autoPublish | boolean | yes | "Agents publish every diagram they draw": while true, every valid drawing made through one of the organisation's agent connections or keys is stored in its private library with its source. Off by default. |
embedLinks | boolean | yes | "Allow diagrams on chosen websites" (Enterprise): while true, a diagram may have embed links that show it only on the websites they name. Off by default. Turning it off ends every embed link. |
embedLinkCount | integer | yes | How many embed links the organisation has now. minimum 0. |
OrganisationGovernance
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | Whether the organisation's plan includes the policies (Enterprise). A choice saved before is kept, and is not applied without it. |
retention | OrganisationRetention | yes | |
retention.libraryDays | 90 | yes | "Delete library diagrams not updated for": 90, 180, 365 or 730 days, or null for never (the default). |
retention.auditDays | 365 | yes | "Keep the audit log for": 365, 730 or 2555 days (one, two or seven years), or null for the plan's days (the default). It only lengthens. |
retention.planLibraryDays | integer | null | yes | How long the plan keeps a diagram after its last publish, or null for until it is deleted. The plan's limit wins when it is shorter. |
retention.planAuditDays | integer | yes | How many days the plan keeps an audit event. |
retention.effectiveLibraryDays | integer | null | yes | What is applied: the shorter of planLibraryDays and libraryDays. Null when diagrams are kept until they are deleted. |
retention.effectiveAuditDays | integer | yes | What is applied: the longer of planAuditDays and auditDays, auditDays counted up to auditMaxDays. |
retention.auditMaxDays | integer | yes | The longest auditDays this server takes: 730 unless its database is on D1's paid tier, then 2555. Every organisation shares one database. |
legalHold | object | null | yes | The legal hold, or null when it is off. While it is on nothing of the organisation is deleted: no sweep, no member, and not the organisation itself. |
legalHold.since | integer | yes | When the owner turned it on, in milliseconds since the epoch. |
legalHold.reason | string | null | yes | The reason the owner typed. Shown to the owner and admins; null for anyone else. |
patternsOnly | boolean | yes | "Agents start from approved patterns": find_pattern, called through the organisation's connections and keys, answers with its own patterns only. |
styleRulesStrict | boolean | yes | "Style rules are errors": a publish to the library that breaks a saved style rule is refused with the findings. |
OrganisationRetention
| Field | Type | Required | Description |
|---|---|---|---|
libraryDays | 90 | yes | "Delete library diagrams not updated for": 90, 180, 365 or 730 days, or null for never (the default). |
auditDays | 365 | yes | "Keep the audit log for": 365, 730 or 2555 days (one, two or seven years), or null for the plan's days (the default). It only lengthens. |
planLibraryDays | integer | null | yes | How long the plan keeps a diagram after its last publish, or null for until it is deleted. The plan's limit wins when it is shorter. |
planAuditDays | integer | yes | How many days the plan keeps an audit event. |
effectiveLibraryDays | integer | null | yes | What is applied: the shorter of planLibraryDays and libraryDays. Null when diagrams are kept until they are deleted. |
effectiveAuditDays | integer | yes | What is applied: the longer of planAuditDays and auditDays, auditDays counted up to auditMaxDays. |
auditMaxDays | integer | yes | The longest auditDays this server takes: 730 unless its database is on D1's paid tier, then 2555. Every organisation shares one database. |
OrganisationClassificationSummary
| Field | Type | Required | Description |
|---|---|---|---|
default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
OrganisationApprovalSummary
| Field | Type | Required | Description |
|---|---|---|---|
publish | "off" | "folders" | "all" | yes | "Publishing needs approval": off, folders (the chosen folders and every folder inside them) or all. |
share | boolean | yes | "Public sharing needs approval". |
approver | boolean | yes | True when the caller decides requests: the owner, an admin, or a member chosen as an approver. |
pending | integer | null | yes | How many requests wait for a decision, for an approver; null for anyone else. minimum 0. |
OrganisationAgents
| Field | Type | Required | Description |
|---|---|---|---|
approvedOnly | boolean | yes | "Only approved agents can connect": while true, an agent connects to the organisation only when it is on the approved list. |
approved | string[] | yes | The approved agents by label, such as "Claude Code". Empty while approvedOnly is false. What identifies each is on GET /orgs/{org}/policies/agents, for the owner and admins. |
orgOnly | boolean | yes | "Agents connect to this organisation", as applied: a member on a verified domain connects agents to the organisation, not to their own account. False on a plan without single sign-on. |
CreateOrganisationBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | What people read. 1 to 60 characters. It can be changed; the slug cannot. at least 1 character; pattern ^[^\p{Cc}]+$/u. |
slug | string | no | The handle. Left out, it is made from the name, with a short suffix when that is taken. at least 3 characters; at most 40 characters; pattern ^[a-z0-9][a-z0-9-]*[a-z0-9]$. |
RenameOrganisationBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | What people read. 1 to 60 characters. It can be changed; the slug cannot. at least 1 character; pattern ^[^\p{Cc}]+$/u. |
OrganisationMemberList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrganisationMember[] | yes | |
items[].userId | string | yes | |
items[].email | string | yes | Shown to every member: a team knows who is in it. |
items[].name | string | null | yes | The name the person chose to be shown by, or null for none. |
items[].role | "owner" | "admin" | "member" | "reader" | yes | |
items[].joinedAt | integer | yes | Milliseconds since the epoch. |
OrganisationMember
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | yes | |
email | string | yes | Shown to every member: a team knows who is in it. |
name | string | null | yes | The name the person chose to be shown by, or null for none. |
role | "owner" | "admin" | "member" | "reader" | yes | |
joinedAt | integer | yes | Milliseconds since the epoch. |
ChangeMemberRoleBody
| Field | Type | Required | Description |
|---|---|---|---|
role | "admin" | "member" | "reader" | yes | admin, member or reader. An admin can invite and remove members and readers, rename the organisation and manage its keys; a member can publish and change their own diagrams; a reader can view and download and change nothing. Only the owner offers admin or changes a role. |
OrganisationInviteList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrganisationInvite[] | yes | |
items[].id | string | yes | |
items[].email | string | yes | |
items[].role | "admin" | "member" | "reader" | yes | |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].expiresAt | integer | yes | Milliseconds since the epoch. Seven days after it was made. |
OrganisationInvite
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
email | string | yes | |
role | "admin" | "member" | "reader" | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
expiresAt | integer | yes | Milliseconds since the epoch. Seven days after it was made. |
CreateInviteBody
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | The address to invite. The person must sign in with this address to accept. at least 3 characters; at most 254 characters. |
role | "admin" | "member" | "reader" | yes | admin, member or reader. An admin can invite and remove members and readers, rename the organisation and manage its keys; a member can publish and change their own diagrams; a reader can view and download and change nothing. Only the owner offers admin or changes a role. |
AcceptInviteBody
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | The token in the invitation link. at least 1 character; at most 200 characters. |
OrganisationDiagramSeries
| Field | Type | Required | Description |
|---|---|---|---|
items | OrganisationDiagram[] | yes | By place in the series, then newest first should two share a place. |
items[].id | string | yes | The handle for the diagram in the routes below. |
items[].name | string | null | yes | The label given at publish, or null. |
items[].folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
items[].scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. |
items[].createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
items[].publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
items[].publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
items[].publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
items[].publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
items[].publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
items[].createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
items[].publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
items[].expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
items[].viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
items[].locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
items[].lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
items[].restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
items[].keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
items[].share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
items[].share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
items[].share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
items[].kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
items[].deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
items[].classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
items[].pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
items[].changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
items[].series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
items[].series.id | string | yes | The series id the parts were published with. |
items[].series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
items[].series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
OrganisationDiagramList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrganisationDiagram[] | yes | At most 200, newest published first. |
items[].id | string | yes | The handle for the diagram in the routes below. |
items[].name | string | null | yes | The label given at publish, or null. |
items[].folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
items[].scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
items[].bytes | integer | yes | Size of the stored SVG in bytes. |
items[].createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
items[].publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
items[].publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
items[].publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
items[].publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
items[].publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
items[].createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
items[].publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
items[].expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
items[].viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
items[].locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
items[].lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
items[].restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
items[].keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
items[].share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
items[].share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
items[].share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
items[].kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
items[].deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
items[].classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
items[].pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
items[].changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
items[].series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
items[].series.id | string | yes | The series id the parts were published with. |
items[].series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
items[].series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
usage | OrganisationHostingUsage | yes | |
usage.plan | "free" | "pro" | "enterprise" | yes | |
usage.count | integer | yes | Diagrams the organisation holds. This is the total, even when the list is shorter. minimum 0. |
usage.bytes | integer | yes | minimum 0. |
usage.limits | OrganisationLimits | yes | |
usage.limits.dailyCalls | integer | yes | |
usage.limits.hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
usage.limits.hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
usage.limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
usage.limits.maxDiagramBytes | integer | yes | |
usage.limits.stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
usage.limits.organisations | integer | yes | Organisations an account on this plan may own. |
usage.limits.orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
usage.limits.orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
usage.limits.driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
usage.limits.auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
usage.limits.boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
usage.limits.boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
usage.limits.boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
usage.limits.boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
usage.limits.boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
usage.limits.boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
usage.limits.boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
usage.limits.boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
OrganisationHostingUsage
| Field | Type | Required | Description |
|---|---|---|---|
plan | "free" | "pro" | "enterprise" | yes | |
count | integer | yes | Diagrams the organisation holds. This is the total, even when the list is shorter. minimum 0. |
bytes | integer | yes | minimum 0. |
limits | OrganisationLimits | yes | |
limits.dailyCalls | integer | yes | |
limits.hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
limits.hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
limits.maxDiagramBytes | integer | yes | |
limits.stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
limits.organisations | integer | yes | Organisations an account on this plan may own. |
limits.orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
limits.orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
limits.driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
limits.auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
limits.boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
limits.boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
limits.boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
limits.boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
limits.boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
limits.boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
limits.boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
limits.boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
PublishOrganisationDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
scheme | "light" | "dark" | "auto" | no | The color scheme to draw it in: light, dark, or auto (one picture that follows the viewer's light or dark setting). Light when left out. |
theme | "light" | "dark" | "auto" | no | The old name of scheme, still taken from callers that send it: light, dark, or auto. Send scheme instead; refused when both are sent and differ. |
embedSource | boolean | no | Write the diagram source into the stored SVG, in its metadata, so the diagram can be edited later; every member who can open it can then read the source. The same diagram published with and without it is two pictures. Left out, the organisation's keepEditable setting decides (on unless the owner turned it off); false always leaves the source out. |
name | string | no | A label for the diagram in your list and in the Markdown snippet. Optional. at least 1 character; at most 80 characters; pattern ^[^\p{Cc}]+$/u. |
folder | string | null | no | The folder to file the diagram in. Left out, a new diagram goes to the top level and a diagram that is already hosted stays where it is. A path files a new diagram there, or moves the one that is already hosted and keeps its link. null puts it at the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
classification | any | no | |
series | SeriesInput | no | Publish the diagram as one part of a series: the parts of one big import, such as an overview and one diagram per group, each published with the same id and its place, the overview first. The portal shows a series as tabs of one diagram and can open it on one board. A part published at a place another diagram of the series holds takes the place. Left out, a diagram's series is left as it is. Optional. |
series.id | string | yes | The series id, the same for every part: letters, digits, - and _, up to 64 characters. It names nothing outside your library or the organisation's. at least 1 character; at most 64 characters; pattern ^[A-Za-z0-9_-]+$. |
series.index | integer | yes | The part's place in the series, from 1 (the overview); 0 is the whole import combined into one diagram, at most one a series. minimum 0; maximum 1000. |
series.total | integer | no | How many parts the series has. Optional. minimum 1; maximum 1000. |
UpdateOrganisationDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | null | no | The folder to file the diagram in, or null for the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
name | string | null | no | A new label, or null to clear it. at least 1 character; at most 80 characters; pattern ^[^\p{Cc}]+$/u. |
CopyOrganisationDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | null | yes | The folder to file the copy in, or null for the top level. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
CombinedOrganisationSeries
| Field | Type | Required | Description |
|---|---|---|---|
diagram | PublishedOrganisationDiagram | yes | |
diagram.id | string | yes | The handle for the diagram in the routes below. |
diagram.name | string | null | yes | The label given at publish, or null. |
diagram.folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
diagram.scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
diagram.bytes | integer | yes | Size of the stored SVG in bytes. |
diagram.createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
diagram.publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
diagram.publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
diagram.publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
diagram.publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
diagram.publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
diagram.createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
diagram.publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
diagram.expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
diagram.viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
diagram.locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
diagram.lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
diagram.restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
diagram.keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
diagram.share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
diagram.share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
diagram.share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
diagram.kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
diagram.deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
diagram.pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
diagram.changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
diagram.series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
diagram.series.id | string | yes | The series id the parts were published with. |
diagram.series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
diagram.series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
diagram.created | boolean | yes | True when this call stored a new diagram; false when the same diagram was already in the library and was kept. |
diagram.sourceEmbedded | boolean | yes | True when the stored picture carries the diagram source: the call sent embedSource true, or left it out while the organisation's keepEditable is on. |
diagram.approval | ApprovalHold | no | Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves. |
diagram.approval.state | "pending" | yes | |
diagram.approval.requestId | string | yes | The request, as the Approvals queue lists it. |
diagram.approval.kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
diagram.approval.expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
diagram.approval.message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
diagram.approval.code | string | yes | The warning code a tool answer carries for it: W601. |
merged | integer[] | yes | The places of the parts merged, in order. |
skipped | object[] | yes | The parts left out on purpose. |
skipped[].index | integer | yes | |
skipped[].name | string | yes | |
skipped[].reason | "overview" | "combined" | yes | overview: a split's overview, whose boxes stand for parts. combined: an earlier combined whole, which this one takes the place of. |
links | object | yes | The arrows between parts. |
links.restored | integer | yes | Arrows a part drew to a dashed box of another part, now ending on the box itself. |
links.kept | integer | yes | Arrows that still end on a dashed box naming another part, because that part is not in the series. |
note | string | yes | One sentence for the person: what was merged and how the arrows between parts were drawn. |
EditedOrganisationDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The handle for the diagram in the routes below. |
name | string | null | yes | The label given at publish, or null. |
folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
bytes | integer | yes | Size of the stored SVG in bytes. |
createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
series.id | string | yes | The series id the parts were published with. |
series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
warnings | Diagnostic[] | yes | Quality warnings from drawing the source, as draw_diagram gives them. Empty for a restore. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
changed | boolean | yes | False when the source draws the picture the diagram already has: nothing was stored and no version was kept. |
KeepEditable
| Field | Type | Required | Description |
|---|---|---|---|
keepEditable | boolean | yes | True to write the diagram source into every picture published to the organisation that does not say otherwise, so members can edit it in the portal later. A publish that sends embedSource false still leaves it out. |
SecretScanning
| Field | Type | Required | Description |
|---|---|---|---|
mode | "warn" | "block" | yes | warn: a publish to the library goes ahead and every draw warns (W700 to W710). block: a publish, an auto-publish, an editor save or a public share with any finding is refused with 422 orgs.publish_blocked. |
privateIps | boolean | yes | Also count private IPv4 addresses (10/8, 172.16/12, 192.168/16) as findings (W709). Off by default; counts only while mode is block. |
hostPatterns | string[] | yes | Internal hostname patterns that count as findings (W710), such as *.corp.example: DNS names in lower case, with * only as the first label. Empty by default; count only while mode is block. |
CallCaps
| Field | Type | Required | Description |
|---|---|---|---|
member | integer | null | yes | The most calls a day one member makes through every agent they connected to the organisation, or null for off. minimum 1; maximum 100000000. |
connection | integer | null | yes | The most calls a day one agent connection makes, or null for off. minimum 1; maximum 100000000. |
key | integer | null | yes | The most calls a day one organisation key from Keys and CI makes, or null for off. minimum 1; maximum 100000000. |
overrides | CallCapOverride[] | yes | Up to 200, one a member or key. |
overrides[].kind | "member" | "key" | yes | member: a member, every agent they connected to the organisation together. key: one organisation key or one agent connection. |
overrides[].id | string | yes | The member's account id, or the key's id. at least 1 character; at most 64 characters. |
overrides[].dailyCalls | integer | yes | The calls a day, at most the organisation allowance. minimum 1; maximum 100000000. |
available | boolean | yes | False on a plan without the limits (anything but Enterprise): they are not applied, and only turning them off is allowed. |
plan | string | yes | |
allowance | integer | yes | The most calls a day an account in the organisation may make. Every limit is held to it. |
choices | CallCapChoice[] | yes | The members who can connect agents and the live keys, for an override. |
choices[].kind | "member" | "key" | yes | |
choices[].id | string | yes | |
choices[].label | string | yes | The member's address, the key's name, or the name the agent gave itself. |
choices[].via | "connection" | "key" | no | For a key: an agent connection, or a key from Keys and CI. |
choices[].member | string | null | no | For an agent connection: the address of the member who connected it. |
CallCapOverride
| Field | Type | Required | Description |
|---|---|---|---|
kind | "member" | "key" | yes | member: a member, every agent they connected to the organisation together. key: one organisation key or one agent connection. |
id | string | yes | The member's account id, or the key's id. at least 1 character; at most 64 characters. |
dailyCalls | integer | yes | The calls a day, at most the organisation allowance. minimum 1; maximum 100000000. |
CallCapChoice
| Field | Type | Required | Description |
|---|---|---|---|
kind | "member" | "key" | yes | |
id | string | yes | |
label | string | yes | The member's address, the key's name, or the name the agent gave itself. |
via | "connection" | "key" | no | For a key: an agent connection, or a key from Keys and CI. |
member | string | null | no | For an agent connection: the address of the member who connected it. |
CallCapsInput
| Field | Type | Required | Description |
|---|---|---|---|
member | integer | null | yes | The most calls a day one member makes through every agent they connected to the organisation, or null for off. minimum 1; maximum 100000000. |
connection | integer | null | yes | The most calls a day one agent connection makes, or null for off. minimum 1; maximum 100000000. |
key | integer | null | yes | The most calls a day one organisation key from Keys and CI makes, or null for off. minimum 1; maximum 100000000. |
overrides | CallCapOverride[] | yes | Up to 200, one a member or key. |
overrides[].kind | "member" | "key" | yes | member: a member, every agent they connected to the organisation together. key: one organisation key or one agent connection. |
overrides[].id | string | yes | The member's account id, or the key's id. at least 1 character; at most 64 characters. |
overrides[].dailyCalls | integer | yes | The calls a day, at most the organisation allowance. minimum 1; maximum 100000000. |
CapsToday
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | |
day | string | yes | The UTC day, YYYY-MM-DD. The counts start again at 00:00 UTC. |
scope | "organisation" | "own" | yes | organisation for a caller who may read the call history; own for anyone else, who sees their own. |
items | CapUse[] | yes | |
items[].scope | "member" | "connection" | "key" | yes | |
items[].id | string | yes | The member's account id, or the key's id. |
items[].label | string | yes | |
items[].member | string | null | yes | For a connection: the address of the member who connected it. |
items[].used | integer | yes | Calls today, UTC. |
items[].limit | integer | null | yes | The limit, or null when none holds it. |
alerts | CapUse[] | yes | The ones at or past 80 percent of their limit, the fullest first. |
alerts[].scope | "member" | "connection" | "key" | yes | |
alerts[].id | string | yes | The member's account id, or the key's id. |
alerts[].label | string | yes | |
alerts[].member | string | null | yes | For a connection: the address of the member who connected it. |
alerts[].used | integer | yes | Calls today, UTC. |
alerts[].limit | integer | null | yes | The limit, or null when none holds it. |
CapUse
| Field | Type | Required | Description |
|---|---|---|---|
scope | "member" | "connection" | "key" | yes | |
id | string | yes | The member's account id, or the key's id. |
label | string | yes | |
member | string | null | yes | For a connection: the address of the member who connected it. |
used | integer | yes | Calls today, UTC. |
limit | integer | null | yes | The limit, or null when none holds it. |
SetOrganisationPublishingBody
| Field | Type | Required | Description |
|---|---|---|---|
policy | "personal" | "organisation-default" | "organisation-required" | yes | |
hideViewLinks | boolean | no | Leave view links out of hosted answers for members and keys. Only with organisation-required. default false. |
MemberPublicDiagramList
| Field | Type | Required | Description |
|---|---|---|---|
items | MemberPublicDiagram[] | yes | At most 200, newest published first. |
items[].id | string | yes | The personal diagram's id. |
items[].name | string | null | yes | |
items[].url | string | yes | Its public link, which anyone who has it can open. |
items[].createdAt | integer | yes | |
items[].publishedAt | integer | yes | |
items[].bytes | integer | yes | |
items[].locked | boolean | yes | Whether the member locked it. Moving and unpublishing override the member's lock. |
items[].stableLinks | integer | yes | How many of the member's stable links show it now. minimum 0. |
items[].member | object | yes | |
items[].member.userId | string | yes | |
items[].member.email | string | yes | |
total | integer | yes | How many there are, which may be more than the list holds. minimum 0. |
MemberPublicDiagram
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The personal diagram's id. |
name | string | null | yes | |
url | string | yes | Its public link, which anyone who has it can open. |
createdAt | integer | yes | |
publishedAt | integer | yes | |
bytes | integer | yes | |
locked | boolean | yes | Whether the member locked it. Moving and unpublishing override the member's lock. |
stableLinks | integer | yes | How many of the member's stable links show it now. minimum 0. |
member | object | yes | |
member.userId | string | yes | |
member.email | string | yes |
MovedMemberDiagram
| Field | Type | Required | Description |
|---|---|---|---|
diagram | OrganisationDiagram | yes | |
diagram.id | string | yes | The handle for the diagram in the routes below. |
diagram.name | string | null | yes | The label given at publish, or null. |
diagram.folder | string | null | yes | The folder it is filed in, such as Payments/Checkout, or null for the top level. |
diagram.scheme | "light" | "dark" | "auto" | yes | The color scheme it was drawn in: light, dark, or auto. |
diagram.bytes | integer | yes | Size of the stored SVG in bytes. |
diagram.createdBy | string | null | yes | The person it belongs to: the member who published it, or the person who connected the agent that did. Null when that account has left or an organisation key published it. |
diagram.publishedVia | "person" | "connection" | "key" | null | yes | How it was published: person (signed in, or with a key the person made), connection (an agent connected to the organisation, whose person is createdBy), or key (an organisation key from Keys and CI). Null for a diagram published before this was recorded. |
diagram.publishedKey | object | null | yes | The key behind a connection or an organisation key. Null for a person, and once the key no longer exists. |
diagram.publishedKey.id | string | yes | The key's id, as Keys and CI lists it. Never the key itself. |
diagram.publishedKey.name | string | null | yes | The key's name, or null once the key is revoked. |
diagram.publishedClient | string | null | yes | The client name the agent gave when it connected, such as Claude Code, for a connection only. at most 100 characters. |
diagram.createdAt | integer | yes | When it was first published, in milliseconds since the epoch. |
diagram.publishedAt | integer | yes | When it was last published, in milliseconds since the epoch. Publishing the same diagram again moves it. |
diagram.expiresAt | integer | null | yes | When it will be deleted, in milliseconds since the epoch, or null when the owner's plan keeps diagrams until they are deleted. |
diagram.viewUrl | string | yes | A page in the portal that shows the diagram to a signed-in member. It is not a link anyone can open: an organisation's diagrams have no public address. |
diagram.locked | boolean | yes | True while the owner has the diagram locked: nobody can delete, rename or move it, its publisher and the owner included, until the owner unlocks it. A lock does not stop it expiring on a plan that expires diagrams. |
diagram.lockedAt | integer | null | yes | When the owner locked it, in milliseconds since the epoch, or null when it is not locked. |
diagram.restricted | true | no | Present, and true, when the owner has restricted this diagram's folder and the caller is allowed in it, so the portal can show it as locked. Absent otherwise. A diagram in a folder the caller may not use is not listed at all. |
diagram.keepInside | true | no | Present, and true, when the folder rule over this diagram keeps its diagrams inside: the svg route refuses ?download=1 and the copy route refuses a copy (403 orgs.folder_restricted). Absent otherwise. |
diagram.share | OrganisationDiagramShare | yes | Its public link while the organisation shares it, or null. Only a diagram someone chose to share has one. |
diagram.share.url | string | yes | The public address, {CDN_URL}/l/<token>.svg. Anyone with it can see the picture, without its source. It keeps showing the latest version when the diagram is edited, and never changes. |
diagram.share.sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
diagram.kept | boolean | yes | "Keep": true when an owner or admin keeps it from the library retention. The plan's own retention still applies. |
diagram.deletesAt | integer | null | yes | When the retention deletes it, in milliseconds since the epoch: the nearer of the plan's expiry and "Delete library diagrams not updated for". Null when nothing will, and always null under a legal hold. |
diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
diagram.pending | boolean | yes | True while it is held for approval ("Publishing needs approval"): only its publisher and the approvers see it. |
diagram.changePending | boolean | yes | True while a new version of it waits for approval. The library shows this version until then. |
diagram.series | DiagramSeries | yes | Its place in a series (the parts of one split import), or null when it is in none. |
diagram.series.id | string | yes | The series id the parts were published with. |
diagram.series.index | integer | yes | Its place in the series, from 1; 0 is the whole import combined into one diagram. |
diagram.series.total | integer | null | yes | How many parts the publisher said the series has, or null. |
merged | boolean | yes | True when the library already held exactly this picture, so only the public copy went. |
UserPublishing
| Field | Type | Required | Description |
|---|---|---|---|
defaultOrganization | any | yes | |
defaultOrganization.id | string | yes | |
defaultOrganization.slug | string | yes | |
defaultOrganization.name | string | yes | |
organizations | PublishingClaim[] | yes | The organisations whose Publishing setting claims the person's publishes, by name. |
organizations[].id | string | yes | |
organizations[].slug | string | yes | |
organizations[].name | string | yes | |
organizations[].policy | "organisation-default" | "organisation-required" | yes | What it enforces: its library by default, or its library always. |
organizations[].via | "member" | "domain" | yes | member when the person belongs to it; domain when it verified the domain of their address and they have not joined. |
organizations[].canPublish | boolean | yes | Whether the person may publish to its library: a member who is not a reader. |
target | PublishTarget | yes | personal, the organisation it goes to and why, choose (several claim it and none is the default), or refused. |
PublishingClaim
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
slug | string | yes | |
name | string | yes | |
policy | "organisation-default" | "organisation-required" | yes | What it enforces: its library by default, or its library always. |
via | "member" | "domain" | yes | member when the person belongs to it; domain when it verified the domain of their address and they have not joined. |
canPublish | boolean | yes | Whether the person may publish to its library: a member who is not a reader. |
PublishTarget
personal, the organisation it goes to and why, choose (several claim it and none is the default), or refused.
| Field | Type | Required | Description |
|---|
SetUserPublishingBody
| Field | Type | Required | Description |
|---|---|---|---|
defaultOrganization | string | null | yes | An organisation's slug or id, or null for none. The person must be a member who may publish there. at least 1 character; at most 64 characters. |
OrganisationLegend
| Field | Type | Required | Description |
|---|---|---|---|
legend | "members" | "on" | "off" | "required" | yes | The legend of flow diagrams drawn for the organisation on the hosted service: members (each member's own choice, the default), on or off (a repository's plotwork.config.json and a diagram's header still win), or required (drawn whatever a repository or a header says). |
SetOrganisationLegendBody
| Field | Type | Required | Description |
|---|---|---|---|
legend | "members" | "on" | "off" | "required" | yes |
UserLegend
| Field | Type | Required | Description |
|---|---|---|---|
legend | "on" | "off" | yes | The legend of flow diagrams you draw on the hosted service, on (the default) or off, when no organisation decides it. A repository's plotwork.config.json and a diagram's header still win. |
SetUserLegendBody
| Field | Type | Required | Description |
|---|---|---|---|
legend | "on" | "off" | yes |
OrganisationStyle
The style of flow diagrams drawn for the organisation on the hosted service. Each part it chooses is written over a repository's plotwork.config.json; a diagram's header wins over its values, but never over what it allows.
| Field | Type | Required | Description |
|---|---|---|---|
spacing | "members" | "compact" | "normal" | "roomy" | yes | How far apart the boxes sit: compact, normal, or roomy, or members (each member's own choice, the default). |
edges | "members" | "orthogonal" | "spline" | "straight" | yes | How the lines are drawn: orthogonal (straight runs, rounded corners), spline (curves), or straight (slanted), or members (each member's own choice, the default). |
tabs | "plate" | "heading" | yes | How a group's name is drawn in its corner: plate, a raised tab outlined in the frame's colour (the default), or heading, flat on the frame. The organisation's choice; members have none. |
allowed | object | yes | The values each part may take, every value by default. A diagram that asks for another (by its header, a repository's plotwork.config.json, a member's own choice or an agent) is drawn with an allowed one, with warning S205; a list of one requires it. |
allowed.spacing | ("compact" | "normal" | "roomy")[] | yes | |
allowed.edges | ("orthogonal" | "spline" | "straight")[] | yes |
SetOrganisationStyleBody
| Field | Type | Required | Description |
|---|---|---|---|
spacing | "members" | "compact" | "normal" | "roomy" | no | |
edges | "members" | "orthogonal" | "spline" | "straight" | no | |
tabs | "plate" | "heading" | no | |
allowed | object | no | |
allowed.spacing | ("compact" | "normal" | "roomy")[] | no | |
allowed.edges | ("orthogonal" | "spline" | "straight")[] | no |
UserStyle
The style of flow diagrams you draw on the hosted service when no organisation decides it. A repository's plotwork.config.json and a diagram's header still win.
| Field | Type | Required | Description |
|---|---|---|---|
spacing | "compact" | "normal" | "roomy" | yes | How far apart the boxes sit: compact, normal, or roomy. normal by default. |
edges | "orthogonal" | "spline" | "straight" | yes | How the lines are drawn: orthogonal (straight runs, rounded corners), spline (curves), or straight (slanted). orthogonal by default. |
SetUserStyleBody
| Field | Type | Required | Description |
|---|---|---|---|
spacing | "compact" | "normal" | "roomy" | no | |
edges | "orthogonal" | "spline" | "straight" | no |
OrganisationImportLarge
| Field | Type | Required | Description |
|---|---|---|---|
large | "parts" | "whole" | "both" | yes | What an import too big for one readable picture draws for the organisation's members, keys and agents when the call does not say: parts (an overview and one diagram per group), whole (one diagram with every arrow), or both (the default). A member's own choice wins. |
SetOrganisationImportLargeBody
| Field | Type | Required | Description |
|---|---|---|---|
large | "parts" | "whole" | "both" | yes |
UserImportLarge
| Field | Type | Required | Description |
|---|---|---|---|
large | "org" | "parts" | "whole" | "both" | yes | What your imports too big for one readable picture draw on the hosted service when the call does not say: org (the organisation's choice, the default; both for a person in none), parts, whole, or both. |
SetUserImportLargeBody
| Field | Type | Required | Description |
|---|---|---|---|
large | "org" | "parts" | "whole" | "both" | yes |
SharedOrganisationDiagram
| Field | Type | Required | Description |
|---|---|---|---|
diagramId | string | yes | |
url | string | yes | The public address. Paste it as an image, or give it to GET /oembed. |
sharedAt | integer | yes | When the diagram was first shared, in milliseconds since the epoch. |
updatedAt | integer | yes | When the public copy was last written, in milliseconds since the epoch. |
sharedBy | string | null | yes | The account that first shared it, or null once that account is deleted. |
created | boolean | yes | True when this call made the link; false when the diagram was already shared and kept its address. |
HeldOrganisationShare
| Field | Type | Required | Description |
|---|---|---|---|
diagramId | string | yes | |
approval | ApprovalHold | yes | Present when the organisation's "Publishing needs approval" or "Public sharing needs approval" held this. It is data, not an error: the diagram is stored, and only its publisher and the approvers can see it until an approver approves. |
approval.state | "pending" | yes | |
approval.requestId | string | yes | The request, as the Approvals queue lists it. |
approval.kind | "publish" | "change" | "share" | yes | publish (a new diagram), change (a new version of one the library shows) or share (a public link). |
approval.expiresAt | integer | yes | When the daily sweep ends the request if nobody decides it, in milliseconds since the epoch: thirty days after it was made. |
approval.message | string | yes | One sentence to tell the person: held for approval by the organisation, and what happens next. |
approval.code | string | yes | The warning code a tool answer carries for it: W601. |
OrganisationPublicSharingChanged
| Field | Type | Required | Description |
|---|---|---|---|
publicSharing | boolean | yes | "Allow public sharing of individual diagrams": while true, the owner and admins may share any diagram, and a member a diagram they published, at a public link. Off by default. Turning it off ends every link. |
sharedCount | integer | yes | How many of the organisation's diagrams have a public link now. Counted against the plan's stableLinks. minimum 0. |
autoPublish | boolean | yes | "Agents publish every diagram they draw": while true, every valid drawing made through one of the organisation's agent connections or keys is stored in its private library with its source. Off by default. |
embedLinks | boolean | yes | "Allow diagrams on chosen websites" (Enterprise): while true, a diagram may have embed links that show it only on the websites they name. Off by default. Turning it off ends every embed link. |
embedLinkCount | integer | yes | How many embed links the organisation has now. minimum 0. |
linksEnded | integer | yes | How many public links this call ended: every one when sharing was turned off, none otherwise. minimum 0. |
SetOrganisationPublicSharingBody
| Field | Type | Required | Description |
|---|---|---|---|
publicSharing | boolean | yes | True to allow public links to single diagrams; false to end every one. |
SetOrganisationAutoPublishBody
| Field | Type | Required | Description |
|---|---|---|---|
autoPublish | boolean | yes | True to keep every valid drawing the organisation's agents make in its private library. |
EmbedLinkViews
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | False when views are not set up on this server or could not be read now. |
days | integer | yes | |
links | object[] | yes | |
links[].linkId | string | yes | |
links[].diagramId | string | yes | |
links[].label | string | null | yes | |
links[].shown | integer | yes | |
links[].refused | integer | yes | |
links[].sites | object[] | yes | |
links[].sites[].site | string | yes | The host of the page that asked, or empty for requests that named no page. |
links[].sites[].shown | integer | yes | |
links[].sites[].refused | integer | yes | Placeholders: a site not on the list, no site named, or an ended link. |
links[].sites[].lastDay | string | yes | The last UTC day it asked, YYYY-MM-DD. |
links[].days | object[] | yes | |
links[].days[].day | string | yes | |
links[].days[].shown | integer | yes | |
links[].days[].refused | integer | yes |
EmbedLinksOfDiagram
| Field | Type | Required | Description |
|---|---|---|---|
included | boolean | yes | The organisation's plan includes allowed sites (Enterprise). |
enabled | boolean | yes | The owner turned on "Allow diagrams on chosen websites". |
eligible | boolean | yes | The diagram may have a link: it is not labelled Confidential and not waiting for approval. |
mayManage | boolean | yes | The caller may make, change and end its links. False means links is empty. |
links | EmbedLink[] | yes | |
links[].id | string | yes | |
links[].diagramId | string | yes | |
links[].url | string | null | yes | The address, {EMBED_URL}/o/<token>.svg. A page on one of sites that shows it as an image gets the picture, without its source; anything else gets a placeholder. Null when the server cannot show it again: rotate the link for a new one. |
links[].label | string | null | yes | An optional name for the page it is for. |
links[].sites | string[] | yes | The websites a page must be on, lower case. |
links[].proxiedSites | string[] | yes | Sites in sites whose images reach Plotwork through a proxy that names no page (GitHub), so the link shows them the placeholder. |
links[].expiresAt | integer | null | yes | When it stops, in milliseconds since the epoch, or null for never. |
links[].expired | boolean | yes | |
links[].createdBy | string | null | yes | |
links[].createdAt | integer | yes | |
links[].updatedAt | integer | yes | |
links[].rotatedAt | integer | null | yes | |
max | integer | yes | The most links one diagram may have. |
EmbedLink
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
diagramId | string | yes | |
url | string | null | yes | The address, {EMBED_URL}/o/<token>.svg. A page on one of sites that shows it as an image gets the picture, without its source; anything else gets a placeholder. Null when the server cannot show it again: rotate the link for a new one. |
label | string | null | yes | An optional name for the page it is for. |
sites | string[] | yes | The websites a page must be on, lower case. |
proxiedSites | string[] | yes | Sites in sites whose images reach Plotwork through a proxy that names no page (GitHub), so the link shows them the placeholder. |
expiresAt | integer | null | yes | When it stops, in milliseconds since the epoch, or null for never. |
expired | boolean | yes | |
createdBy | string | null | yes | |
createdAt | integer | yes | |
updatedAt | integer | yes | |
rotatedAt | integer | null | yes |
CreateEmbedLinkBody
| Field | Type | Required | Description |
|---|---|---|---|
sites | string[] | yes | |
expiresAt | integer | null | no | When it stops, in milliseconds since the epoch, within three years. Left out or null: never. |
label | string | null | no | An optional name for the page it is for. at most 80 characters. |
UpdateEmbedLinkBody
| Field | Type | Required | Description |
|---|---|---|---|
sites | string[] | no | |
expiresAt | integer | null | no | |
label | string | null | no | at most 80 characters. |
OrganisationEmbedLinksChanged
| Field | Type | Required | Description |
|---|---|---|---|
embedLinks | boolean | yes | |
linksEnded | integer | yes | How many embed links this call ended: every one when the setting was turned off, none otherwise. minimum 0. |
SetOrganisationEmbedLinksBody
| Field | Type | Required | Description |
|---|---|---|---|
embedLinks | boolean | yes | True to allow diagrams on chosen websites; false to end every embed link. |
OrganisationClassification
| Field | Type | Required | Description |
|---|---|---|---|
default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
folders | object[] | yes | The folders with a default label of their own. A new diagram filed in one, or in a folder inside it, gets it; the deepest wins. |
folders[].folder | string | yes | at least 1 character; at most 300 characters. |
folders[].classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
OrganisationClassificationChanged
| Field | Type | Required | Description |
|---|---|---|---|
default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
folders | object[] | yes | The folders with a default label of their own. A new diagram filed in one, or in a folder inside it, gets it; the deepest wins. |
folders[].folder | string | yes | at least 1 character; at most 300 characters. |
folders[].classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
linksEnded | integer | yes | How many public links ended because "Share only diagrams labelled Public" was turned on and their diagram is not labelled public. minimum 0. |
SetOrganisationClassificationBody
| Field | Type | Required | Description |
|---|---|---|---|
default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
sharePublicOnly | boolean | no | Only the owner may change it; left out, it stays as it is. |
folders | object[] | yes | At most 50 folders, each a folder path. |
folders[].folder | string | yes | Folder names from the outermost in, joined with a slash, such as "Payments/Checkout", with no slash at either end. Folder names may use letters A to Z, numbers, spaces, - and _. No space at either end of a name and never two together. Up to 5 levels and 40 characters a name. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
folders[].classification | string | yes | at least 1 character; at most 20 characters. |
ClassifiedOrganisationDiagram
| Field | Type | Required | Description |
|---|---|---|---|
diagramId | string | yes | |
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
previous | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
shareEnded | boolean | yes | True when the new label ended the diagram's public link: Confidential, or anything but public under "Share only diagrams labelled Public". |
ClassifyOrganisationDiagramBody
| Field | Type | Required | Description |
|---|---|---|---|
classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
OrganisationApproval
| Field | Type | Required | Description |
|---|---|---|---|
publish | "off" | "folders" | "all" | yes | |
folders | string[] | yes | The folders "Publishing needs approval" covers when it is folders. |
share | boolean | yes | |
holdKeys | boolean | yes | "Hold organisation keys for approval too": while false, a publish or a new version made with an organisation key from Keys and CI goes in directly. An agent connection is held as its person is. The owner's setting. |
approvers | array | null | yes | The members chosen to approve besides the owner and the admins. Null for a caller who may not manage them. |
SetOrganisationApprovalBody
| Field | Type | Required | Description |
|---|---|---|---|
publish | "off" | "folders" | "all" | yes | |
folders | string[] | yes | |
share | boolean | yes | |
holdKeys | boolean | no | Only the owner may change it; left out, it stays as it is. |
approvers | string[] | yes | Account ids of members with the member role, at most 50. |
ApprovalRequestList
| Field | Type | Required | Description |
|---|---|---|---|
items | ApprovalRequest[] | yes | |
items[].id | string | yes | |
items[].kind | "publish" | "change" | "share" | yes | |
items[].status | "pending" | "approved" | "rejected" | "expired" | yes | |
items[].diagram | object | null | yes | The diagram as the library has it now, or null once it is gone (a rejected new diagram). |
items[].diagram.id | string | yes | |
items[].diagram.name | string | null | yes | |
items[].diagram.folder | string | null | yes | |
items[].diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
items[].diagram.scheme | "light" | "dark" | "auto" | yes | |
items[].requestedBy | object | null | yes | Who asked, or null for an organisation key and once the account is gone. |
items[].requestedBy.userId | string | yes | |
items[].requestedBy.email | string | yes | |
items[].requestedAt | integer | yes | |
items[].expiresAt | integer | yes | |
items[].secretFindings | integer | yes | How many things that look like a secret the scan found when the request was made, under the organisation's scanning options. minimum 0. |
items[].reviewedBy | object | null | yes | |
items[].reviewedBy.userId | string | yes | |
items[].reviewedBy.email | string | yes | |
items[].reviewedAt | integer | null | yes | |
items[].comment | string | null | yes | The approver's comment, when they gave one. |
total | integer | yes | How many requests wait, even when the list is shorter. minimum 0. |
ApprovalRequest
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
kind | "publish" | "change" | "share" | yes | |
status | "pending" | "approved" | "rejected" | "expired" | yes | |
diagram | object | null | yes | The diagram as the library has it now, or null once it is gone (a rejected new diagram). |
diagram.id | string | yes | |
diagram.name | string | null | yes | |
diagram.folder | string | null | yes | |
diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
diagram.scheme | "light" | "dark" | "auto" | yes | |
requestedBy | object | null | yes | Who asked, or null for an organisation key and once the account is gone. |
requestedBy.userId | string | yes | |
requestedBy.email | string | yes | |
requestedAt | integer | yes | |
expiresAt | integer | yes | |
secretFindings | integer | yes | How many things that look like a secret the scan found when the request was made, under the organisation's scanning options. minimum 0. |
reviewedBy | object | null | yes | |
reviewedBy.userId | string | yes | |
reviewedBy.email | string | yes | |
reviewedAt | integer | null | yes | |
comment | string | null | yes | The approver's comment, when they gave one. |
ApprovalRequestDetail
| Field | Type | Required | Description |
|---|---|---|---|
item | ApprovalRequest | yes | |
item.id | string | yes | |
item.kind | "publish" | "change" | "share" | yes | |
item.status | "pending" | "approved" | "rejected" | "expired" | yes | |
item.diagram | object | null | yes | The diagram as the library has it now, or null once it is gone (a rejected new diagram). |
item.diagram.id | string | yes | |
item.diagram.name | string | null | yes | |
item.diagram.folder | string | null | yes | |
item.diagram.classification | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
item.diagram.scheme | "light" | "dark" | "auto" | yes | |
item.requestedBy | object | null | yes | Who asked, or null for an organisation key and once the account is gone. |
item.requestedBy.userId | string | yes | |
item.requestedBy.email | string | yes | |
item.requestedAt | integer | yes | |
item.expiresAt | integer | yes | |
item.secretFindings | integer | yes | How many things that look like a secret the scan found when the request was made, under the organisation's scanning options. minimum 0. |
item.reviewedBy | object | null | yes | |
item.reviewedBy.userId | string | yes | |
item.reviewedBy.email | string | yes | |
item.reviewedAt | integer | null | yes | |
item.comment | string | null | yes | The approver's comment, when they gave one. |
diff | object | null | yes | For a new version: what changed against the one the library shows, by meaning (compare_diagrams). Null for a publish and a share. |
diff.same | boolean | yes | |
diff.compared | boolean | yes | False when a side carries no source, so nothing could be compared. |
diff.counts | object | yes | |
diff.counts.added | integer | yes | |
diff.counts.removed | integer | yes | |
diff.counts.renamed | integer | yes | |
diff.counts.moved | integer | yes | |
diff.counts.changed | integer | yes | |
diff.changes | object[] | yes | |
diff.changes[].change | string | yes | |
diff.changes[].subject | string | yes | |
diff.changes[].name | string | yes | |
diff.changes[].line | integer | null | yes | |
diff.changes[].detail | string | yes | |
diff.truncated | boolean | yes | |
diff.summary | string | yes |
DecideApprovalBody
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | null | no | An optional comment for the publisher, at most 500 characters. It is emailed to them and kept in the organisation's audit log. at least 1 character; at most 500 characters. |
SetOrganisationRetentionBody
| Field | Type | Required | Description |
|---|---|---|---|
libraryDays | 90 | yes | "Delete library diagrams not updated for": 90, 180, 365 or 730 days, or null for never (the default). |
auditDays | 365 | yes | "Keep the audit log for": 365, 730 or 2555 days (one, two or seven years), or null for the plan's days (the default). It only lengthens. |
SetLegalHoldBody
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes | True puts the organisation on legal hold; false takes it off. |
reason | string | yes | Why, in the owner's words: a matter, a request, a ticket. Written to the audit log, both to turn it on and to turn it off. at least 3 characters; at most 500 characters. |
SetGovernanceSwitchBody
| Field | Type | Required | Description |
|---|---|---|---|
on | boolean | yes |
DiagramKept
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
kept | boolean | yes |
SetDiagramKeptBody
| Field | Type | Required | Description |
|---|---|---|---|
kept | boolean | yes | True keeps the diagram from the library retention; false lets it go when it is due. |
OrganisationPatternList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrganisationPatternSummary[] | yes | By title. |
items[].id | string | yes | What the tools take: org:<name>. |
items[].name | string | yes | The name after org:. |
items[].title | string | yes | |
items[].summary | string | yes | |
items[].whenToUse | string | yes | |
items[].kind | string | yes | The kind of diagram, such as flow. |
items[].tags | string[] | yes | |
items[].flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | |
items[].slotCount | integer | yes | minimum 0. |
items[].createdAt | integer | yes | |
items[].updatedAt | integer | yes | |
items[].updatedBy | string | null | yes | The account that last saved it, or null once that account is gone. |
items[].pictures | object | null | yes | Its pictures, drawn when it was saved: its first flavour with every slot at its default, in the organisation's brand and icons. Null for a pattern saved before pictures were kept, or whose drawing failed; the next save draws them. |
items[].pictures.light | string | yes | The path of its light picture on this API, with the save time in it. |
items[].pictures.dark | string | yes | The path of its dark picture on this API. |
limit | integer | yes | The most patterns the organisation keeps. |
available | boolean | yes | Whether the organisation's plan includes its own patterns (Enterprise). Without it they are kept and not offered to agents. |
canEdit | boolean | yes | Whether the caller may save, change and remove them: the owner and admins, signed in. |
OrganisationPatternSummary
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | What the tools take: org:<name>. |
name | string | yes | The name after org:. |
title | string | yes | |
summary | string | yes | |
whenToUse | string | yes | |
kind | string | yes | The kind of diagram, such as flow. |
tags | string[] | yes | |
flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | |
slotCount | integer | yes | minimum 0. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
updatedBy | string | null | yes | The account that last saved it, or null once that account is gone. |
pictures | object | null | yes | Its pictures, drawn when it was saved: its first flavour with every slot at its default, in the organisation's brand and icons. Null for a pattern saved before pictures were kept, or whose drawing failed; the next save draws them. |
pictures.light | string | yes | The path of its light picture on this API, with the save time in it. |
pictures.dark | string | yes | The path of its dark picture on this API. |
OrganisationPattern
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | What the tools take: org:<name>. |
name | string | yes | The name after org:. |
title | string | yes | |
summary | string | yes | |
whenToUse | string | yes | |
kind | string | yes | The kind of diagram, such as flow. |
tags | string[] | yes | |
flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | |
slotCount | integer | yes | minimum 0. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
updatedBy | string | null | yes | The account that last saved it, or null once that account is gone. |
pictures | object | null | yes | Its pictures, drawn when it was saved: its first flavour with every slot at its default, in the organisation's brand and icons. Null for a pattern saved before pictures were kept, or whose drawing failed; the next save draws them. |
pictures.light | string | yes | The path of its light picture on this API, with the save time in it. |
pictures.dark | string | yes | The path of its dark picture on this API. |
templates | object | yes | The Plotwork source of each flavour (neutral, aws, azure, gcp), at least one, with {{slot}} markers inside quoted labels. |
templates.neutral | string | no | at most 10000 characters. |
templates.aws | string | no | at most 10000 characters. |
templates.azure | string | no | at most 10000 characters. |
templates.gcp | string | no | at most 10000 characters. |
slots | object[] | yes | |
slots[].id | string | yes | Lowercase words joined with hyphens; written {{id}} inside a quoted label of the source. at least 1 character; at most 40 characters. |
slots[].default | string | yes | The text the slot has when nothing replaces it. No quotes or line breaks. Up to 60 characters, or 600 for the description slot, which is the alt text. at most 600 characters. |
slots[].meaning | string | yes | One line on what belongs in the slot, so an agent fills it with the right thing. at most 200 characters. |
notes | object | yes | |
notes.keep | string | yes | What to leave exactly as it is. |
notes.rename | string | yes | What to rename or replace, and how. |
notes.split | string | yes | When the diagram has grown too big, and where to cut it. |
CreateOrganisationPatternBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The name after org:: lowercase letters, digits and single hyphens, such as payments-service. Never changes. at least 1 character; at most 50 characters. |
$schema | string | no | The schema line of a pattern file (https://docs.plotwork.dev/schemas/plotwork.pattern.json (opens in a new tab)). Ignored, so a pattern file is a valid body as it is. at most 200 characters. |
title | string | yes | at most 80 characters. |
summary | string | yes | One sentence: what the diagram shows. at most 300 characters. |
whenToUse | string | no | Two or three sentences: when to start from it, and when not to. at most 600 characters. |
tags | string[] | no | Words a search should match, such as payments. |
templates | object | yes | The Plotwork source of each flavour (neutral, aws, azure, gcp), at least one, with {{slot}} markers inside quoted labels. |
templates.neutral | string | no | at most 10000 characters. |
templates.aws | string | no | at most 10000 characters. |
templates.azure | string | no | at most 10000 characters. |
templates.gcp | string | no | at most 10000 characters. |
slots | object[] | no | |
slots[].id | string | yes | Lowercase words joined with hyphens; written {{id}} inside a quoted label of the source. at least 1 character; at most 40 characters. |
slots[].default | string | yes | The text the slot has when nothing replaces it. No quotes or line breaks. Up to 60 characters, or 600 for the description slot, which is the alt text. at most 600 characters. |
slots[].meaning | string | yes | One line on what belongs in the slot, so an agent fills it with the right thing. at most 200 characters. |
notes | object | no | What to keep, what to rename, and when to split. Left out, each has a plain default. |
notes.keep | string | no | at most 400 characters. |
notes.rename | string | no | at most 400 characters. |
notes.split | string | no | at most 400 characters. |
UpdateOrganisationPatternBody
| Field | Type | Required | Description |
|---|---|---|---|
$schema | string | no | The schema line of a pattern file (https://docs.plotwork.dev/schemas/plotwork.pattern.json (opens in a new tab)). Ignored, so a pattern file is a valid body as it is. at most 200 characters. |
title | string | yes | at most 80 characters. |
summary | string | yes | One sentence: what the diagram shows. at most 300 characters. |
whenToUse | string | no | Two or three sentences: when to start from it, and when not to. at most 600 characters. |
tags | string[] | no | Words a search should match, such as payments. |
templates | object | yes | The Plotwork source of each flavour (neutral, aws, azure, gcp), at least one, with {{slot}} markers inside quoted labels. |
templates.neutral | string | no | at most 10000 characters. |
templates.aws | string | no | at most 10000 characters. |
templates.azure | string | no | at most 10000 characters. |
templates.gcp | string | no | at most 10000 characters. |
slots | object[] | no | |
slots[].id | string | yes | Lowercase words joined with hyphens; written {{id}} inside a quoted label of the source. at least 1 character; at most 40 characters. |
slots[].default | string | yes | The text the slot has when nothing replaces it. No quotes or line breaks. Up to 60 characters, or 600 for the description slot, which is the alt text. at most 600 characters. |
slots[].meaning | string | yes | One line on what belongs in the slot, so an agent fills it with the right thing. at most 200 characters. |
notes | object | no | What to keep, what to rename, and when to split. Left out, each has a plain default. |
notes.keep | string | no | at most 400 characters. |
notes.rename | string | no | at most 400 characters. |
notes.split | string | no | at most 400 characters. |
FolderRuleList
| Field | Type | Required | Description |
|---|---|---|---|
items | FolderRule[] | yes | By folder, at most 50. |
items[].folder | string | yes | The restricted folder, in the form diagrams carry in their folder. |
items[].roles | ("admin" | "member" | "reader" | "key")[] | yes | The roles let in, apart from the owner, who is always allowed: admin, member, reader, and key for the organisation's own API keys. |
items[].users | FolderRuleUser[] | yes | The people let in by name, whatever their role. |
items[].users[].userId | string | yes | The member's account id. |
items[].users[].email | string | yes | The member's address, as the member list shows it. |
items[].keepInside | boolean | yes | Whether the rule keeps its diagrams inside: no file download (?download=1, a folder ZIP) and no copy, for anyone, the owner included. The pictures still show to the people let in. |
items[].createdAt | integer | yes | Milliseconds since the epoch. When the rule as it now stands was set; replacing a rule sets it again. |
FolderRule
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | yes | The restricted folder, in the form diagrams carry in their folder. |
roles | ("admin" | "member" | "reader" | "key")[] | yes | The roles let in, apart from the owner, who is always allowed: admin, member, reader, and key for the organisation's own API keys. |
users | FolderRuleUser[] | yes | The people let in by name, whatever their role. |
users[].userId | string | yes | The member's account id. |
users[].email | string | yes | The member's address, as the member list shows it. |
keepInside | boolean | yes | Whether the rule keeps its diagrams inside: no file download (?download=1, a folder ZIP) and no copy, for anyone, the owner included. The pictures still show to the people let in. |
createdAt | integer | yes | Milliseconds since the epoch. When the rule as it now stands was set; replacing a rule sets it again. |
FolderRuleUser
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | yes | The member's account id. |
email | string | yes | The member's address, as the member list shows it. |
SetFolderRuleBody
| Field | Type | Required | Description |
|---|---|---|---|
folder | string | yes | The folder the rule restricts, with every folder inside it: names from the outermost in, joined with a slash, with no slash at either end, each of the letters A to Z, numbers, single spaces, - and _. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
roles | string[] | yes | Any of admin, member, reader, key. owner is not a choice. An empty list, with no people, lets in the owner alone. |
users | string[] | yes | Account ids of current members, at most 100. A person who leaves is taken out of every rule. |
keepInside | boolean | no | Keep the diagrams inside: refuse file downloads and copies of every diagram under the rule. Left out, off. |
FolderRecordList
| Field | Type | Required | Description |
|---|---|---|---|
items | FolderRecord[] | yes | By path, at most 500. The folders diagrams are filed in are read from the diagrams and are not listed here unless someone made them. |
items[].path | string | yes | The folder, in the form diagrams carry in their folder. |
items[].createdAt | integer | yes | Milliseconds since the epoch, when it was made. |
FolderRecord
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | The folder, in the form diagrams carry in their folder. |
createdAt | integer | yes | Milliseconds since the epoch, when it was made. |
CreateFolderBody
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Folder names from the outermost in, joined with a slash, such as "Payments/Checkout", with no slash at either end. Folder names may use letters A to Z, numbers, spaces, - and _. No space at either end of a name and never two together. Up to 5 levels and 40 characters a name. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
MoveFolderBody
| Field | Type | Required | Description |
|---|---|---|---|
from | string | yes | The folder that moves, with every folder inside it. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
to | string | yes | Where it goes: its new path, which may rename it, move it, or both. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
OrgApiKeyList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrgApiKeySummary[] | yes | |
items[].id | string | yes | |
items[].name | string | yes | |
items[].prefix | string | yes | |
items[].last4 | string | yes | |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
items[].revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
items[].scopes | ("diagrams" | "audit:read" | "drift:write" | "boards" | "design:write")[] | yes | diagrams: read the library, publish, change its diagrams, report drift runs and read the style rules, which every key made before scopes holds. audit:read: read and export the audit log, and nothing else unless diagrams is also given. drift:write: report drift runs and read the style rules, and nothing else, for CI that publishes nothing. boards: read and change the live whiteboards open to the whole organisation, through /v1/boards, and on the hosted MCP server beside diagrams; off unless given. |
items[].expiresAt | integer | null | yes | When the key stops working under the organisation's key policy ("Keys expire after"), in milliseconds since the epoch, or null for never. |
OrgApiKeySummary
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
prefix | string | yes | |
last4 | string | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
scopes | ("diagrams" | "audit:read" | "drift:write" | "boards" | "design:write")[] | yes | diagrams: read the library, publish, change its diagrams, report drift runs and read the style rules, which every key made before scopes holds. audit:read: read and export the audit log, and nothing else unless diagrams is also given. drift:write: report drift runs and read the style rules, and nothing else, for CI that publishes nothing. boards: read and change the live whiteboards open to the whole organisation, through /v1/boards, and on the hosted MCP server beside diagrams; off unless given. |
expiresAt | integer | null | yes | When the key stops working under the organisation's key policy ("Keys expire after"), in milliseconds since the epoch, or null for never. |
CreatedOrgApiKey
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
prefix | string | yes | |
last4 | string | yes | |
createdAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if never used. |
revealable | boolean | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
key | string | yes | The full key. When revealable is false this is the only time it is shown, so store it now. |
scopes | ("diagrams" | "audit:read" | "drift:write" | "boards" | "design:write")[] | yes | diagrams: read the library, publish, change its diagrams, report drift runs and read the style rules, which every key made before scopes holds. audit:read: read and export the audit log, and nothing else unless diagrams is also given. drift:write: report drift runs and read the style rules, and nothing else, for CI that publishes nothing. boards: read and change the live whiteboards open to the whole organisation, through /v1/boards, and on the hosted MCP server beside diagrams; off unless given. |
expiresAt | integer | null | yes | When the key stops working under the organisation's key policy ("Keys expire after"), in milliseconds since the epoch, or null for never. |
CreateOrgApiKeyBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 60 characters; pattern \S. |
scopes | ("diagrams" | "audit:read" | "drift:write" | "boards" | "design:write")[] | no | What the key may do. Left out, ["diagrams"]. A key for a SIEM takes ["audit:read"] alone. |
TrustedPublisherList
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | Whether the owner's plan includes trusted publishers. Entries saved before stay, and sign nothing in, while it does not. |
plan | "free" | "pro" | "enterprise" | yes | |
audience | string | null | yes | The audience a GitHub workflow asks GitHub for: this API's origin. Null on a server that cannot exchange GitHub's tokens. |
issuer | string | yes | The issuer of GitHub's tokens. |
azureDevops | object | yes | What an Azure Pipelines token is: its issuer, which ends in the Azure DevOps organisation's id, and the audience Azure DevOps always names. |
azureDevops.issuerPrefix | string | yes | |
azureDevops.audience | string | yes | |
gitlab | object | yes | What a GitLab job's token is: GitLab.com's issuer, the instance an entry names when no host is typed. A GitLab job asks for audience in its id_tokens. |
gitlab.defaultIssuer | string | yes | |
limit | integer | yes | The most trusted publishers an organisation may have. |
items | TrustedPublisher[] | yes | By name, then id. |
items[].id | string | yes | |
items[].name | string | yes | |
items[].provider | "github" | "azure-devops" | "gitlab" | yes | github for a GitHub Actions workflow, azure-devops for an Azure Pipelines pipeline, gitlab for a GitLab project's CI/CD pipelines. |
items[].repository | string | null | yes | A GitHub entry's repository, owner/name. Null for the other providers. |
items[].repositoryId | string | null | yes | GitHub's id of the repository, which a run's token must carry. Null until known: a private repository's is pinned by its first run. |
items[].repositoryOwnerId | string | null | yes | GitHub's id of the repository's owner, which a run's token must carry. Null until known. |
items[].workflow | string | null | yes | A GitHub entry's workflow file in .github/workflows the run must start from. Null for the other providers. |
items[].environment | string | null | yes | The deployment environment the job must run in, or null for any. |
items[].ref | string | null | yes | The ref pattern the run must match, such as refs/heads/main, or null for any ref. |
items[].azureDevops | TrustedPublisherAzureDevopsPipeline | yes | An Azure Pipelines entry's pipeline. Null for the other providers. |
items[].azureDevops.organization | string | yes | The Azure DevOps organisation, by name. |
items[].azureDevops.project | string | yes | The project, by name. |
items[].azureDevops.pipelineId | string | yes | The pipeline's definition id, definitionId in its address. |
items[].azureDevops.organizationId | string | null | yes | Azure DevOps's id of the organisation, which a run's token must carry. Null until the first run pins it. |
items[].azureDevops.projectId | string | null | yes | Azure DevOps's id of the project, which a run's token must carry. Null until the first run pins it. |
items[].gitlab | TrustedPublisherGitlabProject | yes | A GitLab entry's project. Null for the other providers. |
items[].gitlab.host | string | yes | The GitLab instance, exactly as its tokens name their issuer. |
items[].gitlab.projectPath | string | yes | The project's full path. |
items[].gitlab.projectId | string | null | yes | GitLab's id of the project, which a job's token must carry. Null until the first job pins it. |
items[].gitlab.namespaceId | string | null | yes | GitLab's id of the project's group, which a job's token must carry. Null until the first job pins it. |
items[].gitlab.protectedOnly | boolean | yes | Whether only a job for a protected branch or tag signs in. |
items[].permissions | ("diagrams" | "drift:write")[] | yes | diagrams: publish to the organisation's library (and read it and the style rules). drift:write: report drift runs to the Drift tab and read the style rules. |
items[].createdAt | integer | yes | Milliseconds since the epoch. |
items[].createdBy | object | null | yes | Who added it, or null when that account is gone. |
items[].createdBy.id | string | yes | |
items[].createdBy.email | string | yes | |
items[].updatedAt | integer | yes | Milliseconds since the epoch. |
items[].lastUsedAt | integer | null | yes | When a run last signed in with it, in milliseconds since the epoch, or null for never. |
items[].refusedAt | integer | null | yes | When a run that named it was last refused, in milliseconds since the epoch, or null for never. At or after lastUsedAt, the entry is invalid: its runs do not sign in now. |
items[].group | string | yes | The group it is listed under, as GET /orgs/{org}/trusted-publishers/groups names it. |
nextCursor | string | null | yes | Send as cursor for the next page; null on the last. |
TrustedPublisher
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
provider | "github" | "azure-devops" | "gitlab" | yes | github for a GitHub Actions workflow, azure-devops for an Azure Pipelines pipeline, gitlab for a GitLab project's CI/CD pipelines. |
repository | string | null | yes | A GitHub entry's repository, owner/name. Null for the other providers. |
repositoryId | string | null | yes | GitHub's id of the repository, which a run's token must carry. Null until known: a private repository's is pinned by its first run. |
repositoryOwnerId | string | null | yes | GitHub's id of the repository's owner, which a run's token must carry. Null until known. |
workflow | string | null | yes | A GitHub entry's workflow file in .github/workflows the run must start from. Null for the other providers. |
environment | string | null | yes | The deployment environment the job must run in, or null for any. |
ref | string | null | yes | The ref pattern the run must match, such as refs/heads/main, or null for any ref. |
azureDevops | TrustedPublisherAzureDevopsPipeline | yes | An Azure Pipelines entry's pipeline. Null for the other providers. |
azureDevops.organization | string | yes | The Azure DevOps organisation, by name. |
azureDevops.project | string | yes | The project, by name. |
azureDevops.pipelineId | string | yes | The pipeline's definition id, definitionId in its address. |
azureDevops.organizationId | string | null | yes | Azure DevOps's id of the organisation, which a run's token must carry. Null until the first run pins it. |
azureDevops.projectId | string | null | yes | Azure DevOps's id of the project, which a run's token must carry. Null until the first run pins it. |
gitlab | TrustedPublisherGitlabProject | yes | A GitLab entry's project. Null for the other providers. |
gitlab.host | string | yes | The GitLab instance, exactly as its tokens name their issuer. |
gitlab.projectPath | string | yes | The project's full path. |
gitlab.projectId | string | null | yes | GitLab's id of the project, which a job's token must carry. Null until the first job pins it. |
gitlab.namespaceId | string | null | yes | GitLab's id of the project's group, which a job's token must carry. Null until the first job pins it. |
gitlab.protectedOnly | boolean | yes | Whether only a job for a protected branch or tag signs in. |
permissions | ("diagrams" | "drift:write")[] | yes | diagrams: publish to the organisation's library (and read it and the style rules). drift:write: report drift runs to the Drift tab and read the style rules. |
createdAt | integer | yes | Milliseconds since the epoch. |
createdBy | object | null | yes | Who added it, or null when that account is gone. |
createdBy.id | string | yes | |
createdBy.email | string | yes | |
updatedAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | When a run last signed in with it, in milliseconds since the epoch, or null for never. |
refusedAt | integer | null | yes | When a run that named it was last refused, in milliseconds since the epoch, or null for never. At or after lastUsedAt, the entry is invalid: its runs do not sign in now. |
group | string | yes | The group it is listed under, as GET /orgs/{org}/trusted-publishers/groups names it. |
TrustedPublisherAzureDevopsPipeline
An Azure Pipelines entry's pipeline. Null for the other providers.
| Field | Type | Required | Description |
|---|---|---|---|
organization | string | yes | The Azure DevOps organisation, by name. |
project | string | yes | The project, by name. |
pipelineId | string | yes | The pipeline's definition id, definitionId in its address. |
organizationId | string | null | yes | Azure DevOps's id of the organisation, which a run's token must carry. Null until the first run pins it. |
projectId | string | null | yes | Azure DevOps's id of the project, which a run's token must carry. Null until the first run pins it. |
TrustedPublisherGitlabProject
A GitLab entry's project. Null for the other providers.
| Field | Type | Required | Description |
|---|---|---|---|
host | string | yes | The GitLab instance, exactly as its tokens name their issuer. |
projectPath | string | yes | The project's full path. |
projectId | string | null | yes | GitLab's id of the project, which a job's token must carry. Null until the first job pins it. |
namespaceId | string | null | yes | GitLab's id of the project's group, which a job's token must carry. Null until the first job pins it. |
protectedOnly | boolean | yes | Whether only a job for a protected branch or tag signs in. |
TrustedPublisherGroups
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | Whether the owner's plan includes trusted publishers. Entries saved before stay, and sign nothing in, while it does not. |
plan | "free" | "pro" | "enterprise" | yes | |
audience | string | null | yes | The audience a GitHub workflow asks GitHub for: this API's origin. Null on a server that cannot exchange GitHub's tokens. |
issuer | string | yes | The issuer of GitHub's tokens. |
azureDevops | object | yes | What an Azure Pipelines token is: its issuer, which ends in the Azure DevOps organisation's id, and the audience Azure DevOps always names. |
azureDevops.issuerPrefix | string | yes | |
azureDevops.audience | string | yes | |
gitlab | object | yes | What a GitLab job's token is: GitLab.com's issuer, the instance an entry names when no host is typed. A GitLab job asks for audience in its id_tokens. |
gitlab.defaultIssuer | string | yes | |
limit | integer | yes | The most trusted publishers an organisation may have. |
held | integer | null | yes | How many trusted publishers the organisation has, whatever the filters. On the first page only, null after it. |
totals | object | null | yes | The entries that match the filters, in all and by CI provider. On the first page only, null after it. |
totals.all | integer | yes | |
totals.github | integer | yes | |
totals.azure-devops | integer | yes | |
totals.gitlab | integer | yes | |
groups | TrustedPublisherGroup[] | yes | By provider, then owner in lower case. |
groups[].id | string | yes | The provider and the owner in lower case, to send as group. |
groups[].provider | "github" | "azure-devops" | "gitlab" | yes | |
groups[].owner | string | yes | A GitHub repository's owner, an Azure DevOps organisation and project, or a GitLab project's group path (after its host when it is not GitLab.com), as typed. |
groups[].count | integer | yes | Its entries that match the filters. |
groups[].never | integer | yes | Of them, the ones no run signed in with yet. |
groups[].invalid | integer | yes | Of them, the ones whose last exchange was refused. |
nextCursor | string | null | yes | Send as cursor for the next page of groups; null on the last. |
TrustedPublisherGroup
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The provider and the owner in lower case, to send as group. |
provider | "github" | "azure-devops" | "gitlab" | yes | |
owner | string | yes | A GitHub repository's owner, an Azure DevOps organisation and project, or a GitLab project's group path (after its host when it is not GitLab.com), as typed. |
count | integer | yes | Its entries that match the filters. |
never | integer | yes | Of them, the ones no run signed in with yet. |
invalid | integer | yes | Of them, the ones whose last exchange was refused. |
TrustedPublisherBody
| Field | Type | Required | Description |
|---|
TrustedPublisherGithubBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A name to recognise it by in the usage, the call history and the audit log. Left out or blank, the repository name and the workflow, or the project and the pipeline id. at most 60 characters. |
provider | "github" | no | The CI provider: github, the default. |
repository | string | yes | The repository, owner/name. at most 140 characters. |
workflow | string | yes | The workflow file in .github/workflows, with no folder. at most 100 characters. |
environment | string | null | no | The deployment environment the job must run in. Left out, null or blank, any job of the workflow. at most 255 characters. |
ref | string | null | no | A branch (main) or a ref pattern (refs/tags/v*, * for any characters) the run must be for. Left out, null or blank, any ref. at most 255 characters. |
permissions | ("diagrams" | "drift:write")[] | no | What its runs may do. Left out, both. |
TrustedPublisherAzureDevopsBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A name to recognise it by in the usage, the call history and the audit log. Left out or blank, the repository name and the workflow, or the project and the pipeline id. at most 60 characters. |
provider | "azure-devops" | yes | The CI provider: azure-devops for an Azure Pipelines pipeline. |
azureOrganization | string | yes | The Azure DevOps organisation, by name: acme in https://dev.azure.com/acme. at most 50 characters. |
azureProject | string | yes | The project, by name. at most 64 characters. |
pipelineId | string | yes | The pipeline's definition id: the number after definitionId= in the address of its runs. A rename keeps it. at most 10 characters. |
ref | string | null | no | A branch (main) or a ref pattern (refs/tags/v*, * for any characters) the run must be for. Left out, null or blank, any ref. at most 255 characters. |
permissions | ("diagrams" | "drift:write")[] | no | What its runs may do. Left out, both. |
TrustedPublisherGitlabBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A name to recognise it by in the usage, the call history and the audit log. Left out or blank, the repository name and the workflow, or the project and the pipeline id. at most 60 characters. |
provider | "gitlab" | yes | The CI provider: gitlab for a GitLab project's CI/CD pipelines. |
gitlabHost | string | null | no | The GitLab instance: left out, null or blank for GitLab.com, or a self-managed instance as a host name or https:// address with no port or path. A self-managed instance must answer its OpenID Connect discovery document from the internet. at most 261 characters. |
projectPath | string | yes | The project's full path, group/subgroup/project. at most 255 characters. |
environment | string | null | no | The environment the job must name in environment:. Left out, null or blank, any job of the project's pipelines. at most 255 characters. |
ref | string | null | no | A branch (main) or a ref pattern (refs/tags/v*, * for any characters) the run must be for. Left out, null or blank, any ref. at most 255 characters. |
protectedOnly | boolean | no | When true, only a job for a protected branch or tag signs in. Left out, false. |
permissions | ("diagrams" | "drift:write")[] | no | What its runs may do. Left out, both. |
OrgAzureDevopsConnector
| Field | Type | Required | Description |
|---|---|---|---|
configured | boolean | yes | Whether this server has the Microsoft Entra app the connector signs in with. When false, the trusted publisher form keeps its typed fields. |
available | boolean | yes | Whether the plan has trusted publishers, which the connector serves: Pro and Enterprise. |
plan | string | yes | |
connection | object | null | yes | The sign-in, or null when nobody has connected Azure DevOps. The token is never answered. |
connection.accountLabel | string | null | yes | The Microsoft account's address or display name, whose access the lists use. |
connection.connectedBy | object | null | yes | The Plotwork account that connected it, or null when that account is gone. |
connection.connectedBy.id | string | yes | |
connection.connectedBy.email | string | yes | |
connection.connectedBy.name | string | null | yes | |
connection.connectedAt | integer | yes |
OrgAzureDevopsConnect
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | Microsoft's sign-in page. The browser goes there next. |
OrgAzureDevopsOrganizations
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | yes | The Azure DevOps organisations the connected account is a member of, by name. |
items[].id | string | yes | |
items[].name | string | yes | |
truncated | boolean | yes |
OrgAzureDevopsProjects
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | yes | The organisation's projects, by name. |
items[].id | string | yes | |
items[].name | string | yes | |
truncated | boolean | yes |
OrgAzureDevopsPipelines
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | yes | The project's pipelines, by folder then name. |
items[].id | string | yes | The pipeline's definition id, the definitionId of its address. |
items[].name | string | yes | |
items[].folder | string | yes | The folder it is in, \ for the top. |
truncated | boolean | yes | True when there were more than 1,000. |
OrgAzureDevopsPipeline
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The pipeline's definition id, the definitionId of its address. |
name | string | yes | |
folder | string | yes | The folder it is in, \ for the top. |
repository | object | null | yes | The repository the pipeline builds, by name, and its kind (such as TfsGit or GitHub). |
repository.name | string | yes | |
repository.type | string | yes | |
defaultBranch | string | null | yes | The repository's default branch for the pipeline, such as refs/heads/main. |
RunTask
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | Whether the owner's plan includes the run task (Pro and Enterprise). While it does not, each run is reported as passed with a sentence, and nothing is drawn. |
plan | "free" | "pro" | "enterprise" | yes | |
enabled | boolean | yes | Whether the run task is on. |
endpoint | string | null | yes | The endpoint URL to give HCP Terraform, by the organisation id. Null on a server with no API_URL. |
keyLast4 | string | null | yes | The HMAC key's last four characters, or null while the run task is off. |
failOnError | boolean | yes | True when a run Plotwork cannot draw or keep is reported as failed. False (the default) reports it as passed, with a sentence. |
enabledAt | integer | null | yes | When it was turned on, in milliseconds since the epoch. |
enabledBy | object | null | yes | Who turned it on, or null when that account is gone. |
enabledBy.id | string | yes | |
enabledBy.email | string | yes | |
lastRunAt | integer | null | yes | When HCP Terraform last called it for a run, in milliseconds since the epoch, or null for never. |
lastStatus | "passed" | "failed" | null | yes | The status sent back to the last run. |
RunTaskWithKey
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | Whether the owner's plan includes the run task (Pro and Enterprise). While it does not, each run is reported as passed with a sentence, and nothing is drawn. |
plan | "free" | "pro" | "enterprise" | yes | |
enabled | boolean | yes | Whether the run task is on. |
endpoint | string | null | yes | The endpoint URL to give HCP Terraform, by the organisation id. Null on a server with no API_URL. |
keyLast4 | string | null | yes | The HMAC key's last four characters, or null while the run task is off. |
failOnError | boolean | yes | True when a run Plotwork cannot draw or keep is reported as failed. False (the default) reports it as passed, with a sentence. |
enabledAt | integer | null | yes | When it was turned on, in milliseconds since the epoch. |
enabledBy | object | null | yes | Who turned it on, or null when that account is gone. |
enabledBy.id | string | yes | |
enabledBy.email | string | yes | |
lastRunAt | integer | null | yes | When HCP Terraform last called it for a run, in milliseconds since the epoch, or null for never. |
lastStatus | "passed" | "failed" | null | yes | The status sent back to the last run. |
hmacKey | string | yes | The HMAC key to give HCP Terraform. Shown by this answer only; keep it out of logs and files. 64 hex characters. |
RunTaskOptions
| Field | Type | Required | Description |
|---|---|---|---|
failOnError | boolean | yes | Report a run Plotwork cannot draw or keep as failed. With an advisory run task the run still goes on. |
OrgEvidence
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | True when the plan includes compliance evidence (Enterprise). When false the lists are empty. |
plan | "free" | "pro" | "enterprise" | yes | |
retentionDays | integer | yes | minimum 0. |
legalHold | boolean | yes | |
githubLinked | boolean | yes | |
settings | EvidenceSettings | yes | |
settings.frameworks | ("pci-dss" | "soc2" | "iso27001" | "nist-800-53")[] | yes | |
settings.staleDays | integer | yes | |
settings.defaults | boolean | yes | True when nothing was saved and these are the defaults: every framework, 14 days. |
frameworks | EvidenceFrameworkSummary[] | yes | |
frameworks[].id | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | yes | |
frameworks[].name | string | yes | |
frameworks[].version | string | yes | |
frameworks[].mark | string | yes | |
frameworks[].source | string | yes | |
frameworks[].chosen | boolean | yes | |
frameworks[].controls | EvidenceControlSummary[] | yes | |
frameworks[].controls[].id | string | yes | |
frameworks[].controls[].ref | string | yes | |
frameworks[].controls[].title | string | yes | |
frameworks[].controls[].evidence | string | yes | |
frameworks[].controls[].text | string | yes | |
frameworks[].controls[].paraphrased | boolean | yes | |
frameworks[].controls[].how | string | yes | |
frameworks[].controls[].limit | string | yes | |
frameworks[].controls[].total | integer | yes | Diagrams mapped to it, hand-drawn ones included. minimum 0. |
frameworks[].controls[].current | integer | yes | Of those, the ones that are current. minimum 0. |
repositories | EvidenceRepository[] | yes | |
repositories[].repository | string | yes | |
repositories[].status | "current" | "drifted" | "stale" | "unknown" | yes | current, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2). |
repositories[].repositoryId | string | null | yes | The GitHub App's id of the repository, when an installation reaches it. |
repositories[].private | boolean | null | yes | |
repositories[].archived | boolean | yes | |
repositories[].setup | "none" | "pr_open" | "merged" | "closed" | null | yes | |
repositories[].diagrams | integer | yes | minimum 0. |
repositories[].current | integer | yes | minimum 0. |
repositories[].drifted | integer | yes | minimum 0. |
repositories[].stale | integer | yes | minimum 0. |
repositories[].unknown | integer | yes | minimum 0. |
repositories[].unverified | integer | yes | minimum 0. |
repositories[].lastCheckedAt | integer | null | yes | |
repositories[].runUrl | string | null | yes | |
repositories[].controls | string[] | yes | |
repositories[].badge | boolean | yes | True when its README badge is on. |
repositories[].scannedAt | integer | null | yes | |
diagrams | EvidenceDiagram[] | yes | |
diagrams[].repository | string | yes | |
diagrams[].name | string | yes | |
diagrams[].out | string | yes | The diagram's path in the repository. |
diagrams[].format | string | null | yes | The importer it is drawn with, as the run reported or as its name says, or null. |
diagrams[].status | "current" | "drifted" | "stale" | "unknown" | yes | current, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2). |
diagrams[].lastKnown | "current" | "drifted" | null | yes | For a stale diagram, what its latest conclusive check found. |
diagrams[].lastCheckFailed | boolean | yes | True when the latest check could not make the diagram; the status is the one before it. |
diagrams[].driftedSince | integer | null | yes | For a drifted diagram, when its drift began. |
diagrams[].added | integer | yes | minimum 0. |
diagrams[].removed | integer | yes | minimum 0. |
diagrams[].changed | integer | yes | minimum 0. |
diagrams[].lastCheckedAt | integer | null | yes | |
diagrams[].lastSha | string | null | yes | |
diagrams[].runUrl | string | null | yes | |
diagrams[].pullRequestUrl | string | null | yes | |
diagrams[].controls | string[] | yes | The controls it serves as evidence for, suggested or set. |
diagrams[].suggested | string[] | yes | The controls its format suggests. |
findings | EvidenceFinding[] | yes | |
findings[].id | string | yes | |
findings[].repository | string | yes | |
findings[].path | string | yes | |
findings[].line | integer | yes | |
findings[].mermaidType | string | null | yes | |
findings[].kind | string | null | yes | |
findings[].nodes | integer | yes | minimum 0. |
findings[].matched | integer | yes | minimum 0. |
findings[].source | object | null | yes | The detected source that shares the most names with it. |
findings[].source.name | string | yes | |
findings[].source.format | string | yes | |
findings[].mentionsMissing | string[] | yes | Hints: names it draws that no source declares. Hints, not verification. |
findings[].codeMissing | string[] | yes | Hints: names the matching source declares that it does not draw. |
findings[].pullRequestNumber | integer | null | yes | |
findings[].superseded | boolean | yes | True once the source its pull request added has a check. |
findings[].controls | string[] | yes | |
findings[].suggested | string[] | yes | |
findings[].scannedAt | integer | yes | |
trend | object | null | yes | The 90-day trend, from the stored checks. Null on a plan without compliance evidence. |
trend.days | string[] | yes | The last 90 UTC dates, oldest first. |
trend.overall | (number | null)[] | yes | The share of diagrams drawn from code that were current at the end of each day, 0 to 1, or null before any. |
trend.frameworks | object | yes | The same share over the diagrams mapped to each framework's controls. |
trend.frameworks.pci-dss | (number | null)[] | no | |
trend.frameworks.soc2 | (number | null)[] | no | |
trend.frameworks.iso27001 | (number | null)[] | no | |
trend.frameworks.nist-800-53 | (number | null)[] | no | |
truncated | boolean | yes |
EvidenceSettings
| Field | Type | Required | Description |
|---|---|---|---|
frameworks | ("pci-dss" | "soc2" | "iso27001" | "nist-800-53")[] | yes | |
staleDays | integer | yes | |
defaults | boolean | yes | True when nothing was saved and these are the defaults: every framework, 14 days. |
EvidenceFrameworkSummary
| Field | Type | Required | Description |
|---|---|---|---|
id | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | yes | |
name | string | yes | |
version | string | yes | |
mark | string | yes | |
source | string | yes | |
chosen | boolean | yes | |
controls | EvidenceControlSummary[] | yes | |
controls[].id | string | yes | |
controls[].ref | string | yes | |
controls[].title | string | yes | |
controls[].evidence | string | yes | |
controls[].text | string | yes | |
controls[].paraphrased | boolean | yes | |
controls[].how | string | yes | |
controls[].limit | string | yes | |
controls[].total | integer | yes | Diagrams mapped to it, hand-drawn ones included. minimum 0. |
controls[].current | integer | yes | Of those, the ones that are current. minimum 0. |
EvidenceControlSummary
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
ref | string | yes | |
title | string | yes | |
evidence | string | yes | |
text | string | yes | |
paraphrased | boolean | yes | |
how | string | yes | |
limit | string | yes | |
total | integer | yes | Diagrams mapped to it, hand-drawn ones included. minimum 0. |
current | integer | yes | Of those, the ones that are current. minimum 0. |
EvidenceRepository
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
status | "current" | "drifted" | "stale" | "unknown" | yes | current, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2). |
repositoryId | string | null | yes | The GitHub App's id of the repository, when an installation reaches it. |
private | boolean | null | yes | |
archived | boolean | yes | |
setup | "none" | "pr_open" | "merged" | "closed" | null | yes | |
diagrams | integer | yes | minimum 0. |
current | integer | yes | minimum 0. |
drifted | integer | yes | minimum 0. |
stale | integer | yes | minimum 0. |
unknown | integer | yes | minimum 0. |
unverified | integer | yes | minimum 0. |
lastCheckedAt | integer | null | yes | |
runUrl | string | null | yes | |
controls | string[] | yes | |
badge | boolean | yes | True when its README badge is on. |
scannedAt | integer | null | yes |
EvidenceDiagram
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
name | string | yes | |
out | string | yes | The diagram's path in the repository. |
format | string | null | yes | The importer it is drawn with, as the run reported or as its name says, or null. |
status | "current" | "drifted" | "stale" | "unknown" | yes | current, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2). |
lastKnown | "current" | "drifted" | null | yes | For a stale diagram, what its latest conclusive check found. |
lastCheckFailed | boolean | yes | True when the latest check could not make the diagram; the status is the one before it. |
driftedSince | integer | null | yes | For a drifted diagram, when its drift began. |
added | integer | yes | minimum 0. |
removed | integer | yes | minimum 0. |
changed | integer | yes | minimum 0. |
lastCheckedAt | integer | null | yes | |
lastSha | string | null | yes | |
runUrl | string | null | yes | |
pullRequestUrl | string | null | yes | |
controls | string[] | yes | The controls it serves as evidence for, suggested or set. |
suggested | string[] | yes | The controls its format suggests. |
EvidenceFinding
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
repository | string | yes | |
path | string | yes | |
line | integer | yes | |
mermaidType | string | null | yes | |
kind | string | null | yes | |
nodes | integer | yes | minimum 0. |
matched | integer | yes | minimum 0. |
source | object | null | yes | The detected source that shares the most names with it. |
source.name | string | yes | |
source.format | string | yes | |
mentionsMissing | string[] | yes | Hints: names it draws that no source declares. Hints, not verification. |
codeMissing | string[] | yes | Hints: names the matching source declares that it does not draw. |
pullRequestNumber | integer | null | yes | |
superseded | boolean | yes | True once the source its pull request added has a check. |
controls | string[] | yes | |
suggested | string[] | yes | |
scannedAt | integer | yes |
EvidenceSettingsBody
| Field | Type | Required | Description |
|---|---|---|---|
frameworks | ("pci-dss" | "soc2" | "iso27001" | "nist-800-53")[] | yes | The frameworks the page shows, each once. |
staleDays | integer | yes | Days without a conclusive check on the default branch after which a diagram is stale, 1 to 90. minimum 1; maximum 90. |
EvidenceControlBody
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | The repository, as owner/name. at most 140 characters; pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$. |
diagram | string | yes | The diagram: a source name, or mermaid:<finding id> for a hand-drawn one. at least 1 character; at most 160 characters; pattern ^[^\p{Cc}]+$/u. |
control | "pci-dss:1.2.3" | "pci-dss:1.2.4" | "soc2:CC2.1" | "soc2:CC8.1" | "iso27001:A.5.9" | "iso27001:A.8.9" | "nist-800-53:CM-8" | "nist-800-53:PL-2" | yes | A control: <framework>:<control>, such as pci-dss:1.2.4. |
mode | "add" | "remove" | null | yes | add maps the diagram to the control, remove takes a suggested one off, and null returns it to its suggestion. |
EvidenceDiagramDetail
| Field | Type | Required | Description |
|---|---|---|---|
diagram | EvidenceDiagram | yes | |
diagram.repository | string | yes | |
diagram.name | string | yes | |
diagram.out | string | yes | The diagram's path in the repository. |
diagram.format | string | null | yes | The importer it is drawn with, as the run reported or as its name says, or null. |
diagram.status | "current" | "drifted" | "stale" | "unknown" | yes | current, drifted, stale or unknown, by the checks on the default branch (docs/architecture/compliance-evidence.md, section 2). |
diagram.lastKnown | "current" | "drifted" | null | yes | For a stale diagram, what its latest conclusive check found. |
diagram.lastCheckFailed | boolean | yes | True when the latest check could not make the diagram; the status is the one before it. |
diagram.driftedSince | integer | null | yes | For a drifted diagram, when its drift began. |
diagram.added | integer | yes | minimum 0. |
diagram.removed | integer | yes | minimum 0. |
diagram.changed | integer | yes | minimum 0. |
diagram.lastCheckedAt | integer | null | yes | |
diagram.lastSha | string | null | yes | |
diagram.runUrl | string | null | yes | |
diagram.pullRequestUrl | string | null | yes | |
diagram.controls | string[] | yes | The controls it serves as evidence for, suggested or set. |
diagram.suggested | string[] | yes | The controls its format suggests. |
checks | EvidenceCheck[] | yes | |
checks[].status | "in-step" | "drifted" | "written" | "failed" | yes | |
checks[].checks | integer | yes | |
checks[].firstAt | integer | yes | |
checks[].lastAt | integer | yes | |
checks[].firstSha | string | null | yes | |
checks[].lastSha | string | null | yes | |
checks[].runUrl | string | null | yes | |
checks[].pullRequestUrl | string | null | yes | |
checks[].added | integer | yes | minimum 0. |
checks[].removed | integer | yes | minimum 0. |
checks[].changed | integer | yes | minimum 0. |
truncated | boolean | yes | |
episodes | EvidenceEpisode[] | yes | |
episodes[].startedAt | integer | yes | |
episodes[].resolvedAt | integer | null | yes | |
episodes[].checks | integer | yes | minimum 0. |
episodes[].added | integer | yes | minimum 0. |
episodes[].removed | integer | yes | minimum 0. |
episodes[].changed | integer | yes | minimum 0. |
episodes[].pullRequestUrl | string | null | yes | |
episodes[].resolvedSha | string | null | yes | |
episodes[].resolvedRunUrl | string | null | yes |
EvidenceCheck
| Field | Type | Required | Description |
|---|---|---|---|
status | "in-step" | "drifted" | "written" | "failed" | yes | |
checks | integer | yes | |
firstAt | integer | yes | |
lastAt | integer | yes | |
firstSha | string | null | yes | |
lastSha | string | null | yes | |
runUrl | string | null | yes | |
pullRequestUrl | string | null | yes | |
added | integer | yes | minimum 0. |
removed | integer | yes | minimum 0. |
changed | integer | yes | minimum 0. |
EvidenceEpisode
| Field | Type | Required | Description |
|---|---|---|---|
startedAt | integer | yes | |
resolvedAt | integer | null | yes | |
checks | integer | yes | minimum 0. |
added | integer | yes | minimum 0. |
removed | integer | yes | minimum 0. |
changed | integer | yes | minimum 0. |
pullRequestUrl | string | null | yes | |
resolvedSha | string | null | yes | |
resolvedRunUrl | string | null | yes |
EvidenceBadge
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
url | string | yes | The badge, an SVG. The address is the secret: it names no repository. |
markdown | string | yes |
EvidenceBadgeBody
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | The repository, as owner/name. at most 140 characters; pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$. |
EvidenceScan
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
documents | integer | yes | minimum 0. |
truncated | boolean | yes | |
archived | boolean | yes | |
findings | EvidenceFinding[] | yes | |
findings[].id | string | yes | |
findings[].repository | string | yes | |
findings[].path | string | yes | |
findings[].line | integer | yes | |
findings[].mermaidType | string | null | yes | |
findings[].kind | string | null | yes | |
findings[].nodes | integer | yes | minimum 0. |
findings[].matched | integer | yes | minimum 0. |
findings[].source | object | null | yes | The detected source that shares the most names with it. |
findings[].source.name | string | yes | |
findings[].source.format | string | yes | |
findings[].mentionsMissing | string[] | yes | Hints: names it draws that no source declares. Hints, not verification. |
findings[].codeMissing | string[] | yes | Hints: names the matching source declares that it does not draw. |
findings[].pullRequestNumber | integer | null | yes | |
findings[].superseded | boolean | yes | True once the source its pull request added has a check. |
findings[].controls | string[] | yes | |
findings[].suggested | string[] | yes | |
findings[].scannedAt | integer | yes |
EvidenceVerify
| Field | Type | Required | Description |
|---|---|---|---|
outcome | "opened" | "present" | yes | opened: a pull request; present: the settings already draw the source. |
source | object | yes | |
source.name | string | yes | |
source.format | string | yes | |
pullRequest | object | null | yes | |
pullRequest.number | integer | yes | |
pullRequest.url | string | yes |
EvidenceShareCreated
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
framework | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | "all" | yes | |
from | string | yes | |
to | string | yes | |
paper | "a4" | "letter" | yes | |
label | string | null | yes | |
protection | "none" | "password" | "emails" | yes | |
emails | string[] | yes | |
createdBy | string | null | yes | |
createdAt | integer | yes | |
expiresAt | integer | yes | |
revokedAt | integer | null | yes | |
views | integer | yes | minimum 0. |
lastViewedAt | integer | null | yes | |
state | "live" | "expired" | "revoked" | yes | |
url | string | yes | The link. Its address is the secret: only its hash is stored, so it is in this answer and nowhere else. |
EvidenceShare
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
framework | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | "all" | yes | |
from | string | yes | |
to | string | yes | |
paper | "a4" | "letter" | yes | |
label | string | null | yes | |
protection | "none" | "password" | "emails" | yes | |
emails | string[] | yes | |
createdBy | string | null | yes | |
createdAt | integer | yes | |
expiresAt | integer | yes | |
revokedAt | integer | null | yes | |
views | integer | yes | minimum 0. |
lastViewedAt | integer | null | yes | |
state | "live" | "expired" | "revoked" | yes |
EvidenceShareBody
| Field | Type | Required | Description |
|---|---|---|---|
framework | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | "all" | yes | One framework, or all. |
from | string | yes | The first day, YYYY-MM-DD, UTC. |
to | string | yes | The last day, YYYY-MM-DD, UTC. |
paper | "a4" | "letter" | no | The report's paper. default "a4". |
label | string | null | no | A name for the link in the list, such as "FY26 SOC 2 audit". Shown to the viewer. at least 1 character; at most 80 characters; default null. |
days | 7 | 30 | 90 | yes | Days until the link stops working: 7, 30 or 90. |
password | string | null | no | A password the viewer types, at least 10 characters. Only a salted hash is kept. at least 10 characters; at most 200 characters; default null. |
emails | array | null | no | The addresses that may open it, signed in to Plotwork with an emailed code. Not with a password. default null. |
EvidenceShareList
| Field | Type | Required | Description |
|---|---|---|---|
shares | EvidenceShare[] | yes | |
shares[].id | string | yes | |
shares[].framework | "pci-dss" | "soc2" | "iso27001" | "nist-800-53" | "all" | yes | |
shares[].from | string | yes | |
shares[].to | string | yes | |
shares[].paper | "a4" | "letter" | yes | |
shares[].label | string | null | yes | |
shares[].protection | "none" | "password" | "emails" | yes | |
shares[].emails | string[] | yes | |
shares[].createdBy | string | null | yes | |
shares[].createdAt | integer | yes | |
shares[].expiresAt | integer | yes | |
shares[].revokedAt | integer | null | yes | |
shares[].views | integer | yes | minimum 0. |
shares[].lastViewedAt | integer | null | yes | |
shares[].state | "live" | "expired" | "revoked" | yes |
OrgConnectionList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrgConnection[] | yes | |
items[].id | string | yes | |
items[].clientId | string | yes | The OAuth client id the agent registered with. |
items[].clientName | string | yes | The name the agent gave itself when it registered. It is a claim, not a fact. |
items[].connectedAt | integer | yes | Milliseconds since the epoch. |
items[].lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if the agent has not made a call. |
items[].connectedBy | object | yes | The member who approved the connection. |
items[].connectedBy.userId | string | yes | |
items[].connectedBy.email | string | yes |
OrgConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
clientId | string | yes | The OAuth client id the agent registered with. |
clientName | string | yes | The name the agent gave itself when it registered. It is a claim, not a fact. |
connectedAt | integer | yes | Milliseconds since the epoch. |
lastUsedAt | integer | null | yes | Milliseconds since the epoch, or null if the agent has not made a call. |
connectedBy | object | yes | The member who approved the connection. |
connectedBy.userId | string | yes | |
connectedBy.email | string | yes |
NewOrgAppBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 3 characters; at most 60 characters. |
homepage | string | null | no | An https address, shown as a claim. at most 2048 characters. |
clientType | "confidential" | "public" | yes | |
redirectUris | string[] | yes | One to ten addresses a code may be sent to, matched exactly: https, or http on localhost, 127.0.0.1 or [::1] with any port. |
membersOnly | boolean | no |
OrgAppChangeBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 3 characters; at most 60 characters. |
homepage | string | null | no | at most 2048 characters. |
redirectUris | string[] | no | One to ten addresses a code may be sent to, matched exactly: https, or http on localhost, 127.0.0.1 or [::1] with any port. |
membersOnly | boolean | no |
OrgAppConnectionList
| Field | Type | Required | Description |
|---|---|---|---|
items | OrgAppConnection[] | yes | |
items[].id | string | yes | |
items[].app | object | yes | |
items[].app.id | string | yes | The app's id, which is its OAuth client_id. |
items[].app.name | string | yes | |
items[].app.homepage | string | null | yes | |
items[].scopes | AppScope[] | yes | |
items[].connectedAt | integer | yes | |
items[].lastUsedAt | integer | null | yes | |
items[].connectedBy | object | yes | |
items[].connectedBy.userId | string | yes | |
items[].connectedBy.email | string | yes |
OrgAppConnection
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
app | object | yes | |
app.id | string | yes | The app's id, which is its OAuth client_id. |
app.name | string | yes | |
app.homepage | string | null | yes | |
scopes | AppScope[] | yes | |
connectedAt | integer | yes | |
lastUsedAt | integer | null | yes | |
connectedBy | object | yes | |
connectedBy.userId | string | yes | |
connectedBy.email | string | yes |
AllowedAgentsPolicy
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | "Only approved agents can connect". False means any agent a member approves may connect. |
agents | AllowedAgent[] | yes | |
presets | object[] | yes | |
presets[].id | string | yes | |
presets[].label | string | yes | |
presets[].entries | object[] | yes | |
presets[].entries[].name | string | yes | |
presets[].entries[].redirect | string | yes | |
presets[].confirmed | boolean | yes | False when the name and redirect are what the agent is known to send but were not seen in Plotwork's own tests; it may not match. |
recent | object[] | yes | The agents that connected to the organisation in the last 90 days, one each, newest first. |
recent[].entry | AllowedAgent | yes | |
recent[].connections | integer | yes | How many of its connections to the organisation are live. |
recent[].lastConnectedAt | integer | yes |
AllowedAgent
| Field | Type | Required | Description |
|---|
AllowedAgentsPolicyResult
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
agents | AllowedAgent[] | yes | |
connectionsEnded | integer | yes | The connections from agents the list no longer approves, which the change ended (or with dryRun, would end). |
dryRun | boolean | yes |
AllowedAgentsPolicyBody
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
agents | (object | object)[] | yes | |
dryRun | boolean | no | Answer how many connections the change would end, and change nothing. |
AllowedAppsPolicy
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | "Only approved apps can connect". False means any app a member approves may connect. |
apps | PolicyApp[] | yes | The approved apps, by client id, in the order stored. |
apps[].id | string | yes | The app's client id. |
apps[].name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
apps[].homepage | string | null | yes | |
apps[].own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
own | PolicyApp[] | yes | The organisation's own registered apps, always allowed while the policy is on. |
own[].id | string | yes | The app's client id. |
own[].name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
own[].homepage | string | null | yes | |
own[].own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
recent | object[] | yes | Other apps connected to the organisation in the last 90 days, live or ended, one each, newest first. |
recent[].app | PolicyApp | yes | |
recent[].app.id | string | yes | The app's client id. |
recent[].app.name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
recent[].app.homepage | string | null | yes | |
recent[].app.own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
recent[].connections | integer | yes | How many of its connections to the organisation are live. |
recent[].lastConnectedAt | integer | yes |
PolicyApp
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The app's client id. |
name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
homepage | string | null | yes | |
own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
AllowedAppsPolicyResult
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
apps | PolicyApp[] | yes | |
apps[].id | string | yes | The app's client id. |
apps[].name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
apps[].homepage | string | null | yes | |
apps[].own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
connectionsEnded | integer | yes | The app connections the list no longer allows, which the change ended (or with dryRun, would end). |
dryRun | boolean | yes |
AllowedAppsPolicyBody
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
apps | string[] | yes | The client ids of the apps to approve. Each must name a registered app. |
dryRun | boolean | no | Answer how many connections the change would end, and change nothing. |
KeyPolicy
| Field | Type | Required | Description |
|---|---|---|---|
expiryDays | 30 | 90 | 180 | null | yes | "Keys expire after": 30, 90 or 180 days from when a key is made, or null for never. |
browserOnly | boolean | yes | "Agents sign in through the browser only": members and readers on a verified domain make no personal API key, and only the owner and admins make the organisation's keys, for CI. |
networks | string[] | yes | "Keys only from these networks": CIDR ranges, IPv4 or IPv6, in their canonical spelling. Empty is any network. |
KeyPolicyResult
| Field | Type | Required | Description |
|---|---|---|---|
expiryDays | 30 | 90 | 180 | null | yes | "Keys expire after": 30, 90 or 180 days from when a key is made, or null for never. |
browserOnly | boolean | yes | "Agents sign in through the browser only": members and readers on a verified domain make no personal API key, and only the owner and admins make the organisation's keys, for CI. |
networks | string[] | yes | "Keys only from these networks": CIDR ranges, IPv4 or IPv6, in their canonical spelling. Empty is any network. |
keysChanged | integer | yes | The live keys whose expiry date the change set, brought forward or cleared (or with dryRun, would). |
personalKeys | object | yes | When the change turns browserOnly on: the members and readers on a verified domain who hold personal API keys, and how many keys. Otherwise zero. |
personalKeys.members | integer | yes | |
personalKeys.keys | integer | yes | |
personalKeysRevoked | integer | yes | The personal keys the change revoked, with revokePersonalKeys. |
dryRun | boolean | yes |
KeyPolicyBody
| Field | Type | Required | Description |
|---|---|---|---|
expiryDays | 30 | 90 | 180 | null | yes | "Keys expire after": 30, 90 or 180 days from when a key is made, or null for never. |
browserOnly | boolean | yes | |
networks | string[] | yes | CIDR ranges (203.0.113.0/24, 2001:db8::/32) or single addresses. Each is checked and stored in its canonical spelling. |
dryRun | boolean | no | Answer how many keys would be given a new expiry date, and change nothing. |
revokePersonalKeys | boolean | no | When this change turns browserOnly on: also revoke the personal API keys of the members and readers it holds, and email each of them. Off unless sent. |
OrgBrand
| Field | Type | Required | Description |
|---|---|---|---|
brand | BrandColors | yes | The saved brand, or null when none is saved. |
brand.primary | string | yes | Lowercase #rrggbb. |
brand.secondary | string | yes | Lowercase #rrggbb. |
brand.accent | string | yes | Lowercase #rrggbb. |
chosen | ("primary" | "secondary" | "accent")[] | yes | The colors the person chose. The others are made from the primary. |
active | boolean | yes | True when a brand is saved and the owner's plan includes brand themes, so the hosted service paints with it. |
canEdit | boolean | yes | True when the caller's role may save, remove and preview a brand: the owner and admins. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan, which is its owner's. |
BrandColors
The saved brand, or null when none is saved.
| Field | Type | Required | Description |
|---|---|---|---|
primary | string | yes | Lowercase #rrggbb. |
secondary | string | yes | Lowercase #rrggbb. |
accent | string | yes | Lowercase #rrggbb. |
SavedBrand
| Field | Type | Required | Description |
|---|---|---|---|
brand | any | yes | |
brand.primary | string | yes | Lowercase #rrggbb. |
brand.secondary | string | yes | Lowercase #rrggbb. |
brand.accent | string | yes | Lowercase #rrggbb. |
chosen | ("primary" | "secondary" | "accent")[] | yes | |
check | BrandCheck | yes | |
check.issues | BrandIssue[] | yes | |
check.issues[].role | "primary" | "secondary" | "accent" | yes | |
check.issues[].severity | "error" | "warning" | "note" | yes | An error stops a save. A warning and a note are advice. |
check.issues[].code | "not-a-color" | "missing-primary" | "reads-as-status" | "too-similar" | "adjusted" | yes | |
check.issues[].message | string | yes | |
check.swatches | object | null | yes | The color each scheme draws for each role, made darker or lighter where it would not keep 3:1 against the surface. |
check.swatches.light | object | yes | |
check.swatches.dark | object | yes |
BrandCheck
| Field | Type | Required | Description |
|---|---|---|---|
issues | BrandIssue[] | yes | |
issues[].role | "primary" | "secondary" | "accent" | yes | |
issues[].severity | "error" | "warning" | "note" | yes | An error stops a save. A warning and a note are advice. |
issues[].code | "not-a-color" | "missing-primary" | "reads-as-status" | "too-similar" | "adjusted" | yes | |
issues[].message | string | yes | |
swatches | object | null | yes | The color each scheme draws for each role, made darker or lighter where it would not keep 3:1 against the surface. |
swatches.light | object | yes | |
swatches.light.primary | object | yes | |
swatches.light.secondary | object | yes | |
swatches.light.accent | object | yes | |
swatches.dark | object | yes | |
swatches.dark.primary | object | yes | |
swatches.dark.secondary | object | yes | |
swatches.dark.accent | object | yes |
BrandIssue
| Field | Type | Required | Description |
|---|---|---|---|
role | "primary" | "secondary" | "accent" | yes | |
severity | "error" | "warning" | "note" | yes | An error stops a save. A warning and a note are advice. |
code | "not-a-color" | "missing-primary" | "reads-as-status" | "too-similar" | "adjusted" | yes | |
message | string | yes |
BrandBody
| Field | Type | Required | Description |
|---|---|---|---|
primary | string | null | no | The main brand color, as #rrggbb or #rgb in any case. Takes the place of the blue tone. A brand needs one. at most 32 characters. |
secondary | string | null | no | Takes the place of the violet tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters. |
accent | string | null | no | Takes the place of the aqua tone. Left out or null, it is made from the primary by turning its hue, and follows the primary. at most 32 characters. |
BrandPreview
| Field | Type | Required | Description |
|---|---|---|---|
check | BrandCheck | yes | |
check.issues | BrandIssue[] | yes | |
check.issues[].role | "primary" | "secondary" | "accent" | yes | |
check.issues[].severity | "error" | "warning" | "note" | yes | An error stops a save. A warning and a note are advice. |
check.issues[].code | "not-a-color" | "missing-primary" | "reads-as-status" | "too-similar" | "adjusted" | yes | |
check.issues[].message | string | yes | |
check.swatches | object | null | yes | The color each scheme draws for each role, made darker or lighter where it would not keep 3:1 against the surface. |
check.swatches.light | object | yes | |
check.swatches.dark | object | yes | |
pictures | BrandPreviewPicture[] | yes | |
pictures[].id | string | yes | |
pictures[].title | string | yes | |
pictures[].light | string | yes | The sample as an SVG in the light scheme. |
pictures[].dark | string | yes | The sample as an SVG in the dark scheme. |
BrandPreviewPicture
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
title | string | yes | |
light | string | yes | The sample as an SVG in the light scheme. |
dark | string | yes | The sample as an SVG in the dark scheme. |
AccountBrand
| Field | Type | Required | Description |
|---|---|---|---|
chosen | object | null | yes | The organisation whose brand and custom icons the account's own calls use, or null. |
chosen.id | string | yes | |
chosen.slug | string | yes | |
chosen.name | string | yes | |
available | object[] | yes | The organisations the account belongs to that have a saved brand or custom icons, by name. |
available[].id | string | yes | |
available[].slug | string | yes | |
available[].name | string | yes | |
available[].active | boolean | yes | True when the organisation has a saved brand and the owner's plan includes brand themes. |
available[].iconsActive | boolean | yes | True when the organisation has custom icons and the owner's plan includes them. |
ChooseBrandBody
| Field | Type | Required | Description |
|---|---|---|---|
organization | string | null | yes | An organisation's id or slug, or null for no brand. The account must be a member and the organisation must have a saved brand. at least 1 character; at most 64 characters. |
OrgStyleRules
| Field | Type | Required | Description |
|---|---|---|---|
rules | StyleRules | null | yes | The saved rules as the engine read them (the format of docs/architecture/repository-settings.md), or null when none are saved. |
text | string | null | yes | The saved rules as the person wrote them, or null. |
active | boolean | yes | True when rules are saved and the owner's plan includes saved style rules, so CI that reads them applies them. |
canEdit | boolean | yes | True when the caller's role may save and remove the rules. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan, which is its owner's. |
updatedAt | integer | null | yes | When the rules were last saved, in milliseconds since the epoch, or null. |
StyleRules
A team's style rules for its Plotwork diagrams, with the version of the format.
| Field | Type | Required | Description |
|---|---|---|---|
$schema | string | no | at most 500 characters. |
version | 1 | yes | |
level | "error" | "warning" | no | error fails a check; warning is reported and passes. Defaults to the file's level, which defaults to error. |
requireTitle | boolean | no | Every diagram has a title in its header. |
requireDescription | boolean | no | Every diagram has desc= in its header, the text screen readers announce. |
maxNodes | integer | no | The most nodes one diagram may hold. minimum 1; maximum 10000. |
forbidKinds | ("flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley")[] | no | Kinds of diagram the team does not use. |
ids | object | no | A pattern every node id must match. |
ids.pattern | string | yes | A JavaScript regular expression, without slashes, such as ^[a-z][a-z0-9_]*$. No nested repeats and no back references. at least 1 character; at most 200 characters. |
ids.kinds | ("flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley")[] | no | Only diagrams of these kinds; every kind when left out. |
ids.hint | string | no | What to tell the author who breaks the rule. at least 1 character; at most 300 characters. |
ids.level | "error" | "warning" | no | error fails a check; warning is reported and passes. Defaults to the file's level, which defaults to error. |
labels | object | no | A pattern every node label must match. |
labels.pattern | string | yes | A JavaScript regular expression, without slashes, such as ^[a-z][a-z0-9_]*$. No nested repeats and no back references. at least 1 character; at most 200 characters. |
labels.kinds | ("flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley")[] | no | Only diagrams of these kinds; every kind when left out. |
labels.hint | string | no | What to tell the author who breaks the rule. at least 1 character; at most 300 characters. |
labels.level | "error" | "warning" | no | error fails a check; warning is reported and passes. Defaults to the file's level, which defaults to error. |
icons | object[] | no | Icons required by label. |
icons[].label | string | yes | Matched against each node label with case ignored, such as postgres|mysql. at least 1 character; at most 200 characters. |
icons[].use | string[] | yes | |
icons[].kinds | ("flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley")[] | no | Only diagrams of these kinds; every kind when left out. |
icons[].hint | string | no | What to tell the author who breaks the rule. at least 1 character; at most 300 characters. |
icons[].level | "error" | "warning" | no | error fails a check; warning is reported and passes. Defaults to the file's level, which defaults to error. |
tones | object[] | no | Tones allowed or forbidden, by node type. |
tones[].types | string[] | no | Only nodes of these types, as the kind names them (database, service, person, table, container); every node when left out. |
tones[].allow | ("neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red")[] | no | |
tones[].forbid | ("neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red")[] | no | |
tones[].kinds | ("flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley")[] | no | Only diagrams of these kinds; every kind when left out. |
tones[].hint | string | no | What to tell the author who breaks the rule. at least 1 character; at most 300 characters. |
tones[].level | "error" | "warning" | no | error fails a check; warning is reported and passes. Defaults to the file's level, which defaults to error. |
StyleRulesBody
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | The rules file as JSON text, at most 32768 characters. The style rules guide lists its fields. at least 1 character; at most 32768 characters. |
OrgIcons
| Field | Type | Required | Description |
|---|---|---|---|
icons | OrgIcon[] | yes | |
icons[].name | string | yes | |
icons[].ref | string | yes | What a diagram writes to use it. |
icons[].aliases | string[] | yes | |
icons[].mediaType | "image/svg+xml" | "image/png" | yes | |
icons[].image | string | yes | The checked picture as a data: address, for a preview. |
icons[].width | number | yes | |
icons[].height | number | yes | |
icons[].bytes | integer | yes | |
icons[].updatedAt | integer | yes | Milliseconds since the epoch. |
active | boolean | yes | True when the owner's plan includes custom icons, so the hosted service draws them. |
canEdit | boolean | yes | True when the caller's role may upload, replace and delete icons. |
plan | "free" | "pro" | "enterprise" | yes | |
limit | integer | yes | How many icons the plan lets the organisation keep. |
OrgIcon
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
ref | string | yes | What a diagram writes to use it. |
aliases | string[] | yes | |
mediaType | "image/svg+xml" | "image/png" | yes | |
image | string | yes | The checked picture as a data: address, for a preview. |
width | number | yes | |
height | number | yes | |
bytes | integer | yes | |
updatedAt | integer | yes | Milliseconds since the epoch. |
SavedIcon
| Field | Type | Required | Description |
|---|---|---|---|
icon | OrgIcon | yes | |
icon.name | string | yes | |
icon.ref | string | yes | What a diagram writes to use it. |
icon.aliases | string[] | yes | |
icon.mediaType | "image/svg+xml" | "image/png" | yes | |
icon.image | string | yes | The checked picture as a data: address, for a preview. |
icon.width | number | yes | |
icon.height | number | yes | |
icon.bytes | integer | yes | |
icon.updatedAt | integer | yes | Milliseconds since the epoch. |
removed | string[] | yes | What the check left out of the file because it draws nothing, such as editor metadata. |
IconBody
One file (svg or png), or neither to change only the aliases of an icon that exists.
| Field | Type | Required | Description |
|---|---|---|---|
svg | string | no | The SVG file's text, at most 32 KB. It is rewritten from an allowlist before it is stored. at most 49152 characters. |
png | string | no | The PNG file's bytes in base64, at most 32 KB and 1024 pixels on a side. at most 49152 characters. |
aliases | string[] | no | Other names search and automatic matching find the icon by, at most 10. Left out, the icon has none. |
IconPreview
| Field | Type | Required | Description |
|---|---|---|---|
ref | string | yes | What a diagram writes to use the icon. |
source | string | yes | The diagram source the preview draws, which uses the icon on one box. |
light | string | yes | The preview drawn on light, as SVG text. |
dark | string | yes | The preview drawn on dark, as SVG text. |
SavedAvatar
| Field | Type | Required | Description |
|---|---|---|---|
avatar | OrgAvatar | yes | The organisation's uploaded avatar, or null when it has none and a mark made from its id stands in. |
avatar.version | string | yes | Changes with every upload. Put it in the address (?v=) so a new picture is a new address. |
avatar.contentType | "image/svg+xml" | "image/png" | "image/gif" | "image/webp" | yes | |
avatar.animated | boolean | yes | True when it moves, so a page can hold it still for a person who asked for less motion. |
removed | string[] | yes | What the check left out of the file because it draws nothing, such as editor metadata, EXIF or XMP. |
AvatarBody
One file: svg, or image.
| Field | Type | Required | Description |
|---|---|---|---|
svg | string | no | The SVG file's text, at most 256 KB, still or animated with SMIL. It is rewritten from an allowlist before it is stored. at most 368640 characters. |
image | string | no | A PNG (APNG included), GIF or WebP file's bytes in base64, still or animated: at most 256 KB, 512 pixels on a side, and 200 frames. The format is read from the bytes. at most 368640 characters. |
DriftRunReceipt
| Field | Type | Required | Description |
|---|---|---|---|
organization | object | yes | The organisation the run was stored for. With _ in the path, this says which one the key belongs to. |
organization.id | string | yes | |
organization.slug | string | yes | |
repository | string | yes | The repository, as sent. |
sources | integer | yes | Sources stored. minimum 0. |
drifted | integer | yes | Sources that drifted. minimum 0. |
dashboardUrl | string | yes | The organisation's drift dashboard in the portal, for a signed-in member. |
DriftRunBody
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | The repository the run checked, as owner/name. at most 140 characters; pattern ^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$. |
ref | string | null | yes | The git ref the run checked, or null. at least 1 character; at most 255 characters; pattern ^[^\p{Cc}]+$/u. |
sha | string | null | yes | The commit the run checked, or null. pattern ^[0-9a-fA-F]{7,64}$. |
event | string | null | yes | The event that started the run, or null. at least 1 character; at most 64 characters; pattern ^[a-z][a-z0-9_]*$. |
runUrl | string | null | yes | The run on GitHub. An https address of at most 500 characters, or null. at most 500 characters. |
pullRequestUrl | string | null | yes | The pull request the run opened or checked. An https address of at most 500 characters, or null. at most 500 characters. |
defaultBranch | string | null | no | The repository's default branch, as the run's event names it. Compliance evidence keeps only the checks of runs on it; left out, the GitHub App's, else main or master. at least 1 character; at most 255 characters; pattern ^[^\p{Cc}]+$/u. |
sources | DriftSourceBody[] | yes | Every source the run checked, at most 250. A source of the repository that a run leaves out is removed from the dashboard. |
sources[].name | string | yes | The source's name as the repository's settings write it, 1 to 120 characters. Unique within a run. at least 1 character; at most 120 characters; pattern ^[^\p{Cc}]+$/u. |
sources[].out | string | yes | The diagram's path in the repository, 1 to 300 characters. at least 1 character; at most 300 characters; pattern ^[^\p{Cc}]+$/u. |
sources[].status | "in-step" | "drifted" | "written" | "failed" | yes | What the check found: the diagram matches its files (in-step), differs (drifted), was written by the run (written), or could not be made (failed). |
sources[].added | integer | yes | Items in the files that the diagram does not have. minimum 0; maximum 1000000. |
sources[].removed | integer | yes | Items in the diagram that the files no longer have. minimum 0; maximum 1000000. |
sources[].changed | integer | yes | Items both have that differ. minimum 0; maximum 1000000. |
sources[].errors | integer | yes | Errors the run met making this diagram. minimum 0; maximum 1000000. |
sources[].owners | string[] | yes | The owners CODEOWNERS gives the diagram's path, as it writes them: at most 20, each @user, @org/team or an email address. |
sources[].format | string | null | no | The importer the source reads, such as terraform or openapi. Compliance evidence suggests the controls a diagram serves as evidence for by it; left out, by the source name. pattern ^[a-z][a-z0-9-]{0,39}$. |
DriftSourceBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The source's name as the repository's settings write it, 1 to 120 characters. Unique within a run. at least 1 character; at most 120 characters; pattern ^[^\p{Cc}]+$/u. |
out | string | yes | The diagram's path in the repository, 1 to 300 characters. at least 1 character; at most 300 characters; pattern ^[^\p{Cc}]+$/u. |
status | "in-step" | "drifted" | "written" | "failed" | yes | What the check found: the diagram matches its files (in-step), differs (drifted), was written by the run (written), or could not be made (failed). |
added | integer | yes | Items in the files that the diagram does not have. minimum 0; maximum 1000000. |
removed | integer | yes | Items in the diagram that the files no longer have. minimum 0; maximum 1000000. |
changed | integer | yes | Items both have that differ. minimum 0; maximum 1000000. |
errors | integer | yes | Errors the run met making this diagram. minimum 0; maximum 1000000. |
owners | string[] | yes | The owners CODEOWNERS gives the diagram's path, as it writes them: at most 20, each @user, @org/team or an email address. |
format | string | null | no | The importer the source reads, such as terraform or openapi. Compliance evidence suggests the controls a diagram serves as evidence for by it; left out, by the source name. pattern ^[a-z][a-z0-9-]{0,39}$. |
OrgDrift
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | yes | True when the owner's plan includes the drift dashboard. When false the lists are empty and run reports are refused. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan, which is its owner's. |
retentionDays | integer | yes | Days a run and a status are kept after they were reported, from the owner's plan. Zero on a plan without the dashboard. minimum 0. |
repositories | DriftRepository[] | yes | Every repository with a stored status, by name. |
repositories[].repository | string | yes | |
repositories[].sources | integer | yes | minimum 0. |
repositories[].inStep | integer | yes | minimum 0. |
repositories[].drifted | integer | yes | minimum 0. |
repositories[].written | integer | yes | minimum 0. |
repositories[].failed | integer | yes | minimum 0. |
repositories[].ref | string | null | yes | |
repositories[].sha | string | null | yes | |
repositories[].runUrl | string | null | yes | The run on GitHub, or null. |
repositories[].pullRequestUrl | string | null | yes | The pull request, or null. |
repositories[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
sources | DriftSource[] | yes | The latest status of every source: failed first, then drifted, written and in step, each by repository and name. |
sources[].repository | string | yes | |
sources[].name | string | yes | |
sources[].out | string | yes | |
sources[].status | "in-step" | "drifted" | "written" | "failed" | yes | |
sources[].added | integer | yes | minimum 0. |
sources[].removed | integer | yes | minimum 0. |
sources[].changed | integer | yes | minimum 0. |
sources[].errors | integer | yes | minimum 0. |
sources[].owners | string[] | yes | The owners CODEOWNERS gave the path, as written there. |
sources[].ref | string | null | yes | |
sources[].sha | string | null | yes | |
sources[].runUrl | string | null | yes | The run on GitHub, or null. |
sources[].pullRequestUrl | string | null | yes | The pull request, or null. |
sources[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
truncated | boolean | yes | True when there were more sources than one answer carries. |
runs | DriftRun[] | yes | The latest runs, newest first. |
runs[].id | string | yes | |
runs[].repository | string | yes | |
runs[].event | string | null | yes | |
runs[].sources | integer | yes | minimum 0. |
runs[].drifted | integer | yes | minimum 0. |
runs[].failed | integer | yes | minimum 0. |
runs[].errors | integer | yes | minimum 0. |
runs[].ref | string | null | yes | |
runs[].sha | string | null | yes | |
runs[].runUrl | string | null | yes | The run on GitHub, or null. |
runs[].pullRequestUrl | string | null | yes | The pull request, or null. |
runs[].checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
DriftRepository
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
sources | integer | yes | minimum 0. |
inStep | integer | yes | minimum 0. |
drifted | integer | yes | minimum 0. |
written | integer | yes | minimum 0. |
failed | integer | yes | minimum 0. |
ref | string | null | yes | |
sha | string | null | yes | |
runUrl | string | null | yes | The run on GitHub, or null. |
pullRequestUrl | string | null | yes | The pull request, or null. |
checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
DriftSource
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | yes | |
name | string | yes | |
out | string | yes | |
status | "in-step" | "drifted" | "written" | "failed" | yes | |
added | integer | yes | minimum 0. |
removed | integer | yes | minimum 0. |
changed | integer | yes | minimum 0. |
errors | integer | yes | minimum 0. |
owners | string[] | yes | The owners CODEOWNERS gave the path, as written there. |
ref | string | null | yes | |
sha | string | null | yes | |
runUrl | string | null | yes | The run on GitHub, or null. |
pullRequestUrl | string | null | yes | The pull request, or null. |
checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
DriftRun
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
repository | string | yes | |
event | string | null | yes | |
sources | integer | yes | minimum 0. |
drifted | integer | yes | minimum 0. |
failed | integer | yes | minimum 0. |
errors | integer | yes | minimum 0. |
ref | string | null | yes | |
sha | string | null | yes | |
runUrl | string | null | yes | The run on GitHub, or null. |
pullRequestUrl | string | null | yes | The pull request, or null. |
checkedAt | integer | yes | When the run was reported, in milliseconds since the epoch. |
OrgAuditPage
| Field | Type | Required | Description |
|---|---|---|---|
items | OrgAuditEvent[] | yes | |
items[].version | 1 | yes | The version of this shape. A change that is not only an addition gets a new number. |
items[].id | string | yes | |
items[].orgId | string | yes | |
items[].at | string | yes | When it happened: an ISO 8601 time in UTC with milliseconds. |
items[].action | "orgs.org.create" | "orgs.org.rename" | "orgs.member.add" | "orgs.member.remove" | "orgs.member.leave" | "orgs.member.role" | "orgs.owner.transfer" | "orgs.invite.create" | "orgs.invite.revoke" | "orgs.invite.accept" | "orgs.key.create" | "orgs.key.reveal" | "orgs.key.revoke" | "orgs.key.expired" | "orgs.key.network_refused" | "orgs.connection.create" | "orgs.connection.revoke" | "orgs.app.create" | "orgs.app.update" | "orgs.app.delete" | "orgs.app.rotate" | "orgs.app.connect" | "orgs.app.disconnect" | "orgs.trusted_publisher.create" | "orgs.trusted_publisher.update" | "orgs.trusted_publisher.delete" | "orgs.trusted_publisher.exchange" | "orgs.trusted_publisher.refused" | "orgs.github.link" | "orgs.github.unlink" | "orgs.github.uninstalled" | "orgs.github.suspended" | "orgs.github.unsuspended" | "orgs.github.enable" | "orgs.run_task.enable" | "orgs.run_task.rotate" | "orgs.run_task.reveal" | "orgs.run_task.update" | "orgs.run_task.disable" | "orgs.run_task.run" | "orgs.diagram.publish" | "orgs.diagram.update" | "orgs.diagram.edit" | "orgs.diagram.restore" | "orgs.diagram.lock" | "orgs.diagram.unlock" | "orgs.diagram.publish_blocked" | "orgs.diagram.share" | "orgs.diagram.unshare" | "orgs.diagram.embed_link_create" | "orgs.diagram.embed_link_update" | "orgs.diagram.embed_link_rotate" | "orgs.diagram.embed_link_delete" | "orgs.diagram.classify" | "orgs.diagram.approval_request" | "orgs.diagram.approve" | "orgs.diagram.reject" | "orgs.diagram.approval_expire" | "orgs.settings.classification" | "orgs.settings.approval" | "orgs.diagram.delete" | "orgs.folder_rule.set" | "orgs.folder_rule.clear" | "orgs.folder.create" | "orgs.folder.delete" | "orgs.folder.move" | "orgs.brand.set" | "orgs.brand.clear" | "orgs.icon.set" | "orgs.icon.delete" | "orgs.avatar.set" | "orgs.avatar.clear" | "orgs.style_rules.set" | "orgs.style_rules.clear" | "orgs.settings.editable" | "orgs.settings.secret_scanning" | "orgs.settings.publishing" | "orgs.settings.public_sharing" | "orgs.settings.embed_links" | "orgs.settings.auto_publish" | "orgs.settings.legend" | "orgs.settings.style" | "orgs.settings.imports" | "orgs.settings.board_guests" | "orgs.board.guest_open" | "orgs.settings.agents" | "orgs.settings.allowed_agents" | "orgs.settings.allowed_apps" | "orgs.settings.key_policy" | "orgs.settings.caps" | "orgs.cap.reached" | "orgs.settings.log_access" | "orgs.settings.retention" | "orgs.legal_hold.on" | "orgs.legal_hold.off" | "orgs.retention.sweep" | "orgs.diagram.keep" | "orgs.pattern.create" | "orgs.pattern.update" | "orgs.pattern.delete" | "orgs.settings.patterns_only" | "orgs.settings.style_rules_strict" | "orgs.publishing.move" | "orgs.publishing.unpublish" | "orgs.drift.report" | "orgs.drift.settings" | "orgs.evidence.settings" | "orgs.evidence.control" | "orgs.evidence.export" | "orgs.evidence.share" | "orgs.evidence.share_view" | "orgs.evidence.badge" | "orgs.evidence.scan" | "orgs.evidence.verify" | "orgs.integration.create" | "orgs.integration.update" | "orgs.integration.delete" | "orgs.storage.connect" | "orgs.storage.update" | "orgs.storage.disconnect" | "orgs.storage.sync" | "orgs.storage.failing" | "orgs.storage.gave_up" | "orgs.documents.place" | "orgs.documents.unplace" | "orgs.documents.refresh" | "orgs.contract.set" | "orgs.contract.end" | "orgs.audit.export" | "orgs.calls.export" | "orgs.security.two_factor" | "orgs.security.reminder" | "orgs.connector.set" | "orgs.connector.remove" | "orgs.connector.rotate" | "orgs.connector.test" | "orgs.connector.default" | "orgs.connector.azure_devops_connect" | "orgs.connector.azure_devops_disconnect" | "orgs.sso.signin" | "orgs.sso.config" | "orgs.sso.domain_add" | "orgs.sso.domain_verify" | "orgs.sso.domain_remove" | "orgs.sso.signin_failed" | "orgs.sso.jit" | "orgs.sso.break_glass" | "orgs.sso.key_rotate" | "orgs.scim.token" | "orgs.scim.user_create" | "orgs.scim.user_update" | "orgs.scim.user_deactivate" | "orgs.scim.user_delete" | "orgs.scim.group" | "orgs.scim.role" | "orgs.board.create" | "orgs.board.update" | "orgs.board.delete" | "orgs.board.edit" | "orgs.board.restore" | "orgs.board.share" | "orgs.board.access" | "orgs.board.join_link" | "orgs.board.access_request" | "orgs.board.tab_save" | "orgs.board.tab_import" | "orgs.board.export" | "orgs.board.revision.create" | "orgs.board.revision.share" | "orgs.board.revision.switch_request" | "orgs.board.revision.merge" | "orgs.board.revision.discard" | "orgs.board.agent_message" | "orgs.board.agent_reply" | "orgs.board.agent_listen" | "orgs.settings.board_agent_messages" | yes | What happened. Never reused for another meaning. |
items[].actor | object | yes | |
items[].actor.kind | "user" | "key" | "ci" | "operator" | yes | |
items[].actor.id | string | null | yes | The account id (user), the key id (key, ci), or null (operator). |
items[].actor.name | string | null | yes | The address or key name when it was recorded, "Plotwork support" for the operator, null once a deleted account is forgotten. |
items[].target | object | yes | |
items[].target.type | "org" | "member" | "invite" | "key" | "diagram" | "folder" | "brand" | "icon" | "avatar" | "style_rules" | "settings" | "drift" | "contract" | "sso" | null | yes | |
items[].target.id | string | null | yes | |
items[].target.name | string | null | yes | A member's address, an invited address, a key's, a diagram's or an icon's name, or a folder. |
items[].metadata | object | yes | A few facts about the event, such as role or keepEditable. Never a diagram source, a key, a token or a color. |
items[].ip | string | null | yes | The network the request came from: the IPv4 /24 or the IPv6 /48, never the full address. |
items[].userAgent | string | null | yes | The first 200 characters of the user agent. |
items[].requestId | string | null | yes | The request id, which Plotwork support can look up in the API's logs. |
nextCursor | string | null | yes | Send as cursor for the next, older page; null on the last. |
retentionDays | integer | yes | How many days the organisation's plan keeps an event. |
canExport | boolean | yes | Whether the caller may export the log: the plan exports it, and the caller is the owner, an admin or a key with audit:read. |
OrgAuditEvent
| Field | Type | Required | Description |
|---|---|---|---|
version | 1 | yes | The version of this shape. A change that is not only an addition gets a new number. |
id | string | yes | |
orgId | string | yes | |
at | string | yes | When it happened: an ISO 8601 time in UTC with milliseconds. |
action | "orgs.org.create" | "orgs.org.rename" | "orgs.member.add" | "orgs.member.remove" | "orgs.member.leave" | "orgs.member.role" | "orgs.owner.transfer" | "orgs.invite.create" | "orgs.invite.revoke" | "orgs.invite.accept" | "orgs.key.create" | "orgs.key.reveal" | "orgs.key.revoke" | "orgs.key.expired" | "orgs.key.network_refused" | "orgs.connection.create" | "orgs.connection.revoke" | "orgs.app.create" | "orgs.app.update" | "orgs.app.delete" | "orgs.app.rotate" | "orgs.app.connect" | "orgs.app.disconnect" | "orgs.trusted_publisher.create" | "orgs.trusted_publisher.update" | "orgs.trusted_publisher.delete" | "orgs.trusted_publisher.exchange" | "orgs.trusted_publisher.refused" | "orgs.github.link" | "orgs.github.unlink" | "orgs.github.uninstalled" | "orgs.github.suspended" | "orgs.github.unsuspended" | "orgs.github.enable" | "orgs.run_task.enable" | "orgs.run_task.rotate" | "orgs.run_task.reveal" | "orgs.run_task.update" | "orgs.run_task.disable" | "orgs.run_task.run" | "orgs.diagram.publish" | "orgs.diagram.update" | "orgs.diagram.edit" | "orgs.diagram.restore" | "orgs.diagram.lock" | "orgs.diagram.unlock" | "orgs.diagram.publish_blocked" | "orgs.diagram.share" | "orgs.diagram.unshare" | "orgs.diagram.embed_link_create" | "orgs.diagram.embed_link_update" | "orgs.diagram.embed_link_rotate" | "orgs.diagram.embed_link_delete" | "orgs.diagram.classify" | "orgs.diagram.approval_request" | "orgs.diagram.approve" | "orgs.diagram.reject" | "orgs.diagram.approval_expire" | "orgs.settings.classification" | "orgs.settings.approval" | "orgs.diagram.delete" | "orgs.folder_rule.set" | "orgs.folder_rule.clear" | "orgs.folder.create" | "orgs.folder.delete" | "orgs.folder.move" | "orgs.brand.set" | "orgs.brand.clear" | "orgs.icon.set" | "orgs.icon.delete" | "orgs.avatar.set" | "orgs.avatar.clear" | "orgs.style_rules.set" | "orgs.style_rules.clear" | "orgs.settings.editable" | "orgs.settings.secret_scanning" | "orgs.settings.publishing" | "orgs.settings.public_sharing" | "orgs.settings.embed_links" | "orgs.settings.auto_publish" | "orgs.settings.legend" | "orgs.settings.style" | "orgs.settings.imports" | "orgs.settings.board_guests" | "orgs.board.guest_open" | "orgs.settings.agents" | "orgs.settings.allowed_agents" | "orgs.settings.allowed_apps" | "orgs.settings.key_policy" | "orgs.settings.caps" | "orgs.cap.reached" | "orgs.settings.log_access" | "orgs.settings.retention" | "orgs.legal_hold.on" | "orgs.legal_hold.off" | "orgs.retention.sweep" | "orgs.diagram.keep" | "orgs.pattern.create" | "orgs.pattern.update" | "orgs.pattern.delete" | "orgs.settings.patterns_only" | "orgs.settings.style_rules_strict" | "orgs.publishing.move" | "orgs.publishing.unpublish" | "orgs.drift.report" | "orgs.drift.settings" | "orgs.evidence.settings" | "orgs.evidence.control" | "orgs.evidence.export" | "orgs.evidence.share" | "orgs.evidence.share_view" | "orgs.evidence.badge" | "orgs.evidence.scan" | "orgs.evidence.verify" | "orgs.integration.create" | "orgs.integration.update" | "orgs.integration.delete" | "orgs.storage.connect" | "orgs.storage.update" | "orgs.storage.disconnect" | "orgs.storage.sync" | "orgs.storage.failing" | "orgs.storage.gave_up" | "orgs.documents.place" | "orgs.documents.unplace" | "orgs.documents.refresh" | "orgs.contract.set" | "orgs.contract.end" | "orgs.audit.export" | "orgs.calls.export" | "orgs.security.two_factor" | "orgs.security.reminder" | "orgs.connector.set" | "orgs.connector.remove" | "orgs.connector.rotate" | "orgs.connector.test" | "orgs.connector.default" | "orgs.connector.azure_devops_connect" | "orgs.connector.azure_devops_disconnect" | "orgs.sso.signin" | "orgs.sso.config" | "orgs.sso.domain_add" | "orgs.sso.domain_verify" | "orgs.sso.domain_remove" | "orgs.sso.signin_failed" | "orgs.sso.jit" | "orgs.sso.break_glass" | "orgs.sso.key_rotate" | "orgs.scim.token" | "orgs.scim.user_create" | "orgs.scim.user_update" | "orgs.scim.user_deactivate" | "orgs.scim.user_delete" | "orgs.scim.group" | "orgs.scim.role" | "orgs.board.create" | "orgs.board.update" | "orgs.board.delete" | "orgs.board.edit" | "orgs.board.restore" | "orgs.board.share" | "orgs.board.access" | "orgs.board.join_link" | "orgs.board.access_request" | "orgs.board.tab_save" | "orgs.board.tab_import" | "orgs.board.export" | "orgs.board.revision.create" | "orgs.board.revision.share" | "orgs.board.revision.switch_request" | "orgs.board.revision.merge" | "orgs.board.revision.discard" | "orgs.board.agent_message" | "orgs.board.agent_reply" | "orgs.board.agent_listen" | "orgs.settings.board_agent_messages" | yes | What happened. Never reused for another meaning. |
actor | object | yes | |
actor.kind | "user" | "key" | "ci" | "operator" | yes | |
actor.id | string | null | yes | The account id (user), the key id (key, ci), or null (operator). |
actor.name | string | null | yes | The address or key name when it was recorded, "Plotwork support" for the operator, null once a deleted account is forgotten. |
target | object | yes | |
target.type | "org" | "member" | "invite" | "key" | "diagram" | "folder" | "brand" | "icon" | "avatar" | "style_rules" | "settings" | "drift" | "contract" | "sso" | null | yes | |
target.id | string | null | yes | |
target.name | string | null | yes | A member's address, an invited address, a key's, a diagram's or an icon's name, or a folder. |
metadata | object | yes | A few facts about the event, such as role or keepEditable. Never a diagram source, a key, a token or a color. |
ip | string | null | yes | The network the request came from: the IPv4 /24 or the IPv6 /48, never the full address. |
userAgent | string | null | yes | The first 200 characters of the user agent. |
requestId | string | null | yes | The request id, which Plotwork support can look up in the API's logs. |
OrgUsage
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | False when the call history is not set up on this server, or could not be read; the figures are then zero. |
retentionDays | integer | yes | |
today | integer | yes | Calls today, UTC. |
month | integer | yes | Calls this calendar month, UTC. |
days | object[] | yes | The last 31 UTC days, oldest first. |
days[].day | string | yes | |
days[].connection | integer | yes | |
days[].key | integer | yes | |
groups | object[] | yes | This month's calls by what they did. |
groups[].group | "draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help" | yes | |
groups[].calls | integer | yes | |
via | object | yes | This month's calls by how they came. |
via.connection | integer | yes | |
via.key | integer | yes | |
canReadCalls | boolean | yes | Whether the caller may read every member's calls. |
canExport | boolean | yes | |
breakdown | object | null | yes | Calls of the last 90 days by member and by agent or key, for a caller who may read the history; null for anyone else. |
breakdown.members | object[] | yes | |
breakdown.members[].userId | string | yes | |
breakdown.members[].email | string | null | yes | |
breakdown.members[].calls | integer | yes | |
breakdown.members[].lastAt | number | yes | |
breakdown.agents | object[] | yes | |
breakdown.agents[].keyId | string | yes | |
breakdown.agents[].via | "connection" | "key" | yes | |
breakdown.agents[].name | string | null | yes | |
breakdown.agents[].member | object | null | yes | |
breakdown.agents[].calls | integer | yes | |
breakdown.agents[].lastAt | number | yes |
OrgCallPage
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | False when the call history is not set up on this server, or could not be read. |
items | OrgCall[] | yes | |
items[].at | string | yes | When the call ended: an ISO 8601 time in UTC with milliseconds. |
items[].surface | "mcp" | "api" | yes | mcp for the hosted MCP server, api for the REST API. |
items[].via | "connection" | "key" | yes | connection for an agent a member connected with a browser sign-in, key for a key from Keys and CI. |
items[].member | object | null | yes | The member who connected the agent; null for a key from Keys and CI. |
items[].member.userId | string | yes | |
items[].member.email | string | null | yes | |
items[].key | object | yes | The key behind the call, with its name; the name is null once the key is gone. |
items[].key.id | string | yes | |
items[].key.name | string | null | yes | |
items[].agent | string | null | yes | The name the agent gave itself, for a connection; null for a key. |
items[].tool | string | yes | The MCP tool, or the /v1 route as METHOD path. |
items[].group | "draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help" | yes | |
items[].outcome | "ok" | "invalid" | "refused" | "error" | yes | ok, invalid (the input was refused: a source with errors, arguments that do not fit), refused (a limit, a plan or a rule said no) or error. |
items[].durationMs | integer | yes | |
items[].requestId | string | null | yes | The request id or Cloudflare ray id, for support. |
nextCursor | string | null | yes | Send as cursor for the next, older page; null when this is the last. |
scope | "organisation" | "own" | yes | organisation: every member's calls. own: the calls of the agents the caller connected, for someone the owner has not let read the history. |
retentionDays | integer | yes | Days the history keeps a call. |
canExport | boolean | yes | Whether the caller may download the history as CSV (the owner and admins). |
OrgCall
| Field | Type | Required | Description |
|---|---|---|---|
at | string | yes | When the call ended: an ISO 8601 time in UTC with milliseconds. |
surface | "mcp" | "api" | yes | mcp for the hosted MCP server, api for the REST API. |
via | "connection" | "key" | yes | connection for an agent a member connected with a browser sign-in, key for a key from Keys and CI. |
member | object | null | yes | The member who connected the agent; null for a key from Keys and CI. |
member.userId | string | yes | |
member.email | string | null | yes | |
key | object | yes | The key behind the call, with its name; the name is null once the key is gone. |
key.id | string | yes | |
key.name | string | null | yes | |
agent | string | null | yes | The name the agent gave itself, for a connection; null for a key. |
tool | string | yes | The MCP tool, or the /v1 route as METHOD path. |
group | "draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help" | yes | |
outcome | "ok" | "invalid" | "refused" | "error" | yes | ok, invalid (the input was refused: a source with errors, arguments that do not fit), refused (a limit, a plan or a rule said no) or error. |
durationMs | integer | yes | |
requestId | string | null | yes | The request id or Cloudflare ray id, for support. |
LogAccess
| Field | Type | Required | Description |
|---|---|---|---|
roles | ("member" | "reader")[] | yes | |
members | object[] | yes | |
members[].userId | string | yes | |
members[].email | string | yes | |
members[].role | "owner" | "admin" | "member" | "reader" | yes |
LogAccessInput
| Field | Type | Required | Description |
|---|---|---|---|
roles | ("member" | "reader")[] | yes | Roles let in besides the owner and admins. |
members | string[] | yes | Members let in by name, by account id, at most 100. |
SsoSettings
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | Whether the organisation's plan has single sign-on (Enterprise). |
plan | "free" | "pro" | "enterprise" | yes | |
redirectUri | string | yes | The redirect URI to register at the identity provider. |
saml | SamlServiceProvider | yes | |
saml.entityId | string | yes | Our entity id for this organisation: the audience to set at the provider. |
saml.acsUrl | string | yes | Our assertion consumer service for this organisation: the single sign-on URL to set at the provider. |
saml.metadataUrl | string | yes | Our service provider metadata, for a provider that imports it. |
samlAvailable | boolean | yes | Whether this server can check SAML responses. |
federation | SsoFederation | yes | Plotwork's issuer for this organisation, or null when this server cannot sign assertions. |
federation.issuer | string | yes | Plotwork's issuer for this organisation: the federated credential's Issuer. |
federation.subject | string | yes | The federated credential's Subject identifier: the organisation's id. |
federation.audience | "api://AzureADTokenExchange" | yes | The federated credential's Audience. |
federation.jwksUri | string | yes | Where the public keys are published, for a provider that fetches them. |
connection | SsoConnection | yes | |
connection.protocol | "oidc" | "saml" | yes | OpenID Connect or SAML 2.0. One connection, one protocol. |
connection.issuer | string | yes | The OpenID Connect issuer, or the SAML provider's entity id. |
connection.clientId | string | null | yes | OpenID Connect only. |
connection.credential | "client_secret" | "federated" | "private_key_jwt" | null | yes | What the connection proves itself with at the token endpoint: a client secret, a Microsoft Entra ID federated credential, or a private key JWT. OpenID Connect only. |
connection.secretSet | boolean | yes | True when an OpenID Connect client secret is stored. It is never returned. False for the other credentials and for SAML. |
connection.tokenAuthMethod | "client_secret_basic" | "client_secret_post" | "private_key_jwt" | null | yes | |
connection.signingKey | SsoSigningKey | yes | The connection's signing key, for federated and private_key_jwt; null otherwise. |
connection.signingKey.kid | string | yes | |
connection.signingKey.createdAt | integer | yes | When the key was made: the last rotation, or when the credential was chosen. Milliseconds since the epoch. |
connection.signingKey.publicJwk | SsoPublicJwk | yes | |
connection.signingKey.publicKeyPem | string | yes | The same public key as a PEM PUBLIC KEY, for a provider that takes a pasted key. |
connection.signingKey.previousKid | string | null | yes | The key a rotation replaced, while it is still published (a day), or null. |
connection.signingKey.previousExpiresAt | integer | null | yes | When the previous key leaves the JWKS, or null. |
connection.warnings | "private_key_jwt_not_listed"[] | yes | What the save noticed but did not refuse: private_key_jwt_not_listed when the provider's discovery document does not list private_key_jwt. Empty when read. |
connection.saml | SamlConnection | yes | SAML only. |
connection.saml.entityId | string | yes | The provider's entity id, which every Issuer must equal. |
connection.saml.ssoUrl | string | yes | The provider's sign-in service on the redirect binding. |
connection.saml.certificates | object[] | yes | |
connection.saml.emailAttribute | string | null | yes | The attribute that carries the address, or null when the name identifier does. |
connection.saml.metadataUrl | string | null | yes | Where the metadata was fetched from, or null when it was pasted. |
connection.enabled | boolean | yes | |
connection.requireSso | boolean | yes | |
connection.jit | boolean | yes | |
connection.jitRole | "member" | "reader" | yes | |
connection.updatedAt | integer | yes | |
domains | SsoDomain[] | yes | |
domains[].id | string | yes | |
domains[].domain | string | yes | |
domains[].verified | boolean | yes | |
domains[].verifiedAt | integer | null | yes | |
domains[].checkedAt | integer | null | yes | |
domains[].createdAt | integer | yes | |
domains[].record | object | yes | |
domains[].record.name | string | yes | |
domains[].record.type | "TXT" | yes | |
domains[].record.value | string | yes | |
agentsOrgOnly | boolean | yes | "Agents connect to this organisation": members on a verified domain connect agents only to the organisation. |
SamlServiceProvider
| Field | Type | Required | Description |
|---|---|---|---|
entityId | string | yes | Our entity id for this organisation: the audience to set at the provider. |
acsUrl | string | yes | Our assertion consumer service for this organisation: the single sign-on URL to set at the provider. |
metadataUrl | string | yes | Our service provider metadata, for a provider that imports it. |
SsoFederation
Plotwork's issuer for this organisation, or null when this server cannot sign assertions.
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | Plotwork's issuer for this organisation: the federated credential's Issuer. |
subject | string | yes | The federated credential's Subject identifier: the organisation's id. |
audience | "api://AzureADTokenExchange" | yes | The federated credential's Audience. |
jwksUri | string | yes | Where the public keys are published, for a provider that fetches them. |
SsoConnection
| Field | Type | Required | Description |
|---|---|---|---|
protocol | "oidc" | "saml" | yes | OpenID Connect or SAML 2.0. One connection, one protocol. |
issuer | string | yes | The OpenID Connect issuer, or the SAML provider's entity id. |
clientId | string | null | yes | OpenID Connect only. |
credential | "client_secret" | "federated" | "private_key_jwt" | null | yes | What the connection proves itself with at the token endpoint: a client secret, a Microsoft Entra ID federated credential, or a private key JWT. OpenID Connect only. |
secretSet | boolean | yes | True when an OpenID Connect client secret is stored. It is never returned. False for the other credentials and for SAML. |
tokenAuthMethod | "client_secret_basic" | "client_secret_post" | "private_key_jwt" | null | yes | |
signingKey | SsoSigningKey | yes | The connection's signing key, for federated and private_key_jwt; null otherwise. |
signingKey.kid | string | yes | |
signingKey.createdAt | integer | yes | When the key was made: the last rotation, or when the credential was chosen. Milliseconds since the epoch. |
signingKey.publicJwk | SsoPublicJwk | yes | |
signingKey.publicJwk.kty | "RSA" | yes | |
signingKey.publicJwk.n | string | yes | The modulus, base64url. |
signingKey.publicJwk.e | string | yes | The public exponent, base64url. |
signingKey.publicJwk.kid | string | yes | The key id: the key's RFC 7638 thumbprint. |
signingKey.publicJwk.alg | "RS256" | yes | |
signingKey.publicJwk.use | "sig" | yes | |
signingKey.publicKeyPem | string | yes | The same public key as a PEM PUBLIC KEY, for a provider that takes a pasted key. |
signingKey.previousKid | string | null | yes | The key a rotation replaced, while it is still published (a day), or null. |
signingKey.previousExpiresAt | integer | null | yes | When the previous key leaves the JWKS, or null. |
warnings | "private_key_jwt_not_listed"[] | yes | What the save noticed but did not refuse: private_key_jwt_not_listed when the provider's discovery document does not list private_key_jwt. Empty when read. |
saml | SamlConnection | yes | SAML only. |
saml.entityId | string | yes | The provider's entity id, which every Issuer must equal. |
saml.ssoUrl | string | yes | The provider's sign-in service on the redirect binding. |
saml.certificates | object[] | yes | |
saml.certificates[].fingerprint | string | yes | SHA-256 of the certificate, as providers show it. |
saml.certificates[].notAfter | integer | yes | When the certificate expires, in milliseconds since the epoch. Shown, not enforced. |
saml.emailAttribute | string | null | yes | The attribute that carries the address, or null when the name identifier does. |
saml.metadataUrl | string | null | yes | Where the metadata was fetched from, or null when it was pasted. |
enabled | boolean | yes | |
requireSso | boolean | yes | |
jit | boolean | yes | |
jitRole | "member" | "reader" | yes | |
updatedAt | integer | yes |
SsoSigningKey
The connection's signing key, for federated and private_key_jwt; null otherwise.
| Field | Type | Required | Description |
|---|---|---|---|
kid | string | yes | |
createdAt | integer | yes | When the key was made: the last rotation, or when the credential was chosen. Milliseconds since the epoch. |
publicJwk | SsoPublicJwk | yes | |
publicJwk.kty | "RSA" | yes | |
publicJwk.n | string | yes | The modulus, base64url. |
publicJwk.e | string | yes | The public exponent, base64url. |
publicJwk.kid | string | yes | The key id: the key's RFC 7638 thumbprint. |
publicJwk.alg | "RS256" | yes | |
publicJwk.use | "sig" | yes | |
publicKeyPem | string | yes | The same public key as a PEM PUBLIC KEY, for a provider that takes a pasted key. |
previousKid | string | null | yes | The key a rotation replaced, while it is still published (a day), or null. |
previousExpiresAt | integer | null | yes | When the previous key leaves the JWKS, or null. |
SamlConnection
SAML only.
| Field | Type | Required | Description |
|---|---|---|---|
entityId | string | yes | The provider's entity id, which every Issuer must equal. |
ssoUrl | string | yes | The provider's sign-in service on the redirect binding. |
certificates | object[] | yes | |
certificates[].fingerprint | string | yes | SHA-256 of the certificate, as providers show it. |
certificates[].notAfter | integer | yes | When the certificate expires, in milliseconds since the epoch. Shown, not enforced. |
emailAttribute | string | null | yes | The attribute that carries the address, or null when the name identifier does. |
metadataUrl | string | null | yes | Where the metadata was fetched from, or null when it was pasted. |
SsoDomain
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
domain | string | yes | |
verified | boolean | yes | |
verifiedAt | integer | null | yes | |
checkedAt | integer | null | yes | |
createdAt | integer | yes | |
record | object | yes | |
record.name | string | yes | |
record.type | "TXT" | yes | |
record.value | string | yes |
SsoConnectionBody
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | The issuer URL of your own tenant. at least 9 characters; at most 300 characters. |
clientId | string | yes | at least 1 character; at most 255 characters. |
clientSecret | string | no | For client_secret: required the first time, and when switching from another credential. Left out later, the stored one is kept. Never returned. Ignored by the other credentials. at least 1 character; at most 1000 characters. |
credential | "client_secret" | "federated" | "private_key_jwt" | no | What the connection proves itself with. Left out, the stored credential is kept (a client secret for a new connection). federated and private_key_jwt make a signing key when the connection has none. |
AgentPolicy
| Field | Type | Required | Description |
|---|---|---|---|
orgOnly | boolean | yes | When true, a member whose address is on one of the organisation's verified domains can connect an agent only to the organisation, not to their own account. |
SsoSwitchesBody
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | no | |
requireSso | boolean | no | |
jit | boolean | no | |
jitRole | "member" | "reader" | no |
SamlConnectionBody
| Field | Type | Required | Description |
|---|---|---|---|
metadataUrl | string | no | The address of the provider's metadata, fetched over HTTPS. Give this or metadataXml, or neither to keep the stored metadata. at least 9 characters; at most 500 characters. |
metadataXml | string | no | The provider's metadata XML, pasted. at least 1 character; at most 262144 characters. |
emailAttribute | string | null | no | The attribute that carries the address. Null reads the name identifier; left out keeps the stored choice. at least 1 character; at most 200 characters. |
SsoDomainBody
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | at least 3 characters; at most 253 characters. |
SsoDomainVerify
| Field | Type | Required | Description |
|---|---|---|---|
domain | SsoDomain | yes | |
domain.id | string | yes | |
domain.domain | string | yes | |
domain.verified | boolean | yes | |
domain.verifiedAt | integer | null | yes | |
domain.checkedAt | integer | null | yes | |
domain.createdAt | integer | yes | |
domain.record | object | yes | |
domain.record.name | string | yes | |
domain.record.type | "TXT" | yes | |
domain.record.value | string | yes | |
checked | boolean | yes | False when the resolver did not answer, so nothing was learned. Try again. |
ScimSettings
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | Whether the organisation's plan includes SCIM (Enterprise). |
baseUrl | string | yes | The SCIM base URL to give the identity provider. |
token | ScimTokenView | yes | |
token.prefix | string | yes | The first characters of the token, to tell it apart. |
token.createdAt | integer | yes | |
token.lastUsedAt | integer | null | yes | When the provider last used it, to the minute. Null until it has. |
users | integer | yes | How many people the provider manages here, active or not. |
groups | ScimGroupView[] | yes | |
groups[].id | string | yes | |
groups[].displayName | string | yes | |
groups[].role | "admin" | "member" | "reader" | null | yes | The role the group gives its members, or null when it gives none. |
groups[].members | integer | yes |
ScimTokenView
| Field | Type | Required | Description |
|---|---|---|---|
prefix | string | yes | The first characters of the token, to tell it apart. |
createdAt | integer | yes | |
lastUsedAt | integer | null | yes | When the provider last used it, to the minute. Null until it has. |
ScimGroupView
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
displayName | string | yes | |
role | "admin" | "member" | "reader" | null | yes | The role the group gives its members, or null when it gives none. |
members | integer | yes |
ScimTokenIssued
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | The bearer token for the identity provider. Shown once; only its hash is kept. |
view | ScimTokenView | yes | |
view.prefix | string | yes | The first characters of the token, to tell it apart. |
view.createdAt | integer | yes | |
view.lastUsedAt | integer | null | yes | When the provider last used it, to the minute. Null until it has. |
ScimGroupRoleBody
| Field | Type | Required | Description |
|---|---|---|---|
role | "admin" | "member" | "reader" | null | yes |
SupportSettings
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | True when the organisation's plan includes priority support (Enterprise). |
plan | string | yes | The organisation's plan. |
contact | object | null | yes | The named contact, or null when none is named yet. A request still reaches Plotwork support. |
contact.name | string | yes | |
contact.email | string | yes | |
firstResponseHours | integer | null | yes | The first response target, in business hours, or null when the contract names none. |
hours | string | null | yes | When support is staffed, as the contract says it, or null. |
uptimeSla | boolean | yes | True when the plan includes an uptime SLA. |
contract | object | null | yes | The dates of the contract: for the owner and the admins only, and null for everyone else or a contract set without dates. |
contract.startsOn | string | yes | The first day of the contract, YYYY-MM-DD (UTC). |
contract.endsOn | string | yes | The last day of the contract, YYYY-MM-DD (UTC). |
contract.autoRenew | boolean | yes | Whether the contract renews by itself at the end. |
contract.noticeDays | integer | yes | The notice either side gives before the end, in days. |
SupportAck
| Field | Type | Required | Description |
|---|---|---|---|
received | true | yes | |
contactName | string | null | yes | The name of the contact who will answer, or null when none is named. |
firstResponseHours | integer | null | yes | The first response target, in business hours, or null. |
SupportRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
subject | string | yes | One line on what it is about. 1 to 160 characters. at least 1 character; at most 160 characters. |
message | string | yes | What happened, what was expected, and anything that helps reproduce it. 1 to 5000 characters; line breaks are kept. at least 1 character; at most 5000 characters. |
severity | "question" | "broken" | "urgent" | yes | question for a question, broken when something does not work, urgent when production is affected. The contact reads the urgent ones first. |
BoardList
| Field | Type | Required | Description |
|---|---|---|---|
items | BoardListItem[] | yes | |
items[].id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
items[].name | string | yes | |
items[].classification | "public" | "internal" | "confidential" | yes | |
items[].access | "org" | "restricted" | yes | |
items[].role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
items[].tabCount | integer | yes | minimum 0. |
items[].createdAt | integer | yes | |
items[].updatedAt | integer | yes | |
items[].createdBy | string | null | yes | The email address of the member who made it, or null when they left. |
items[].live | boolean | yes | True when someone opened its live connection in the last two minutes. |
items[].kept | boolean | yes | |
limit | integer | yes | Boards the organisation may keep. minimum 0. |
count | integer | yes | Boards the organisation keeps now, including those the caller may not open. minimum 0. |
BoardListItem
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
classification | "public" | "internal" | "confidential" | yes | |
access | "org" | "restricted" | yes | |
role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
tabCount | integer | yes | minimum 0. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
createdBy | string | null | yes | The email address of the member who made it, or null when they left. |
live | boolean | yes | True when someone opened its live connection in the last two minutes. |
kept | boolean | yes |
Board
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
classification | "public" | "internal" | "confidential" | yes | |
access | "org" | "restricted" | yes | |
role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
tabCount | integer | yes | minimum 0. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
createdBy | string | null | yes | The email address of the member who made it, or null when they left. |
live | boolean | yes | True when someone opened its live connection in the last two minutes. |
kept | boolean | yes | |
live | boolean | no | |
orgRole | "view" | "edit" | yes | What every member gets when access is org. |
head | BoardHead | yes | |
head.id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
head.orgId | string | yes | |
head.version | integer | yes | |
head.tabs | BoardTab[] | yes | |
head.tabs[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
head.tabs[].name | string | yes | |
head.tabs[].kind | string | yes | The kind the source declares, such as flow. |
head.tabs[].position | number | yes | |
head.tabs[].version | integer | yes | |
head.tabs[].updatedAt | integer | yes | |
head.tabs[].updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
head.tabs[].library | object | null | yes | |
limits | BoardLiveLimits | yes | |
limits.sessionMinutes | integer | yes | |
limits.idleMinutes | integer | yes | |
limits.hiddenGraceSeconds | integer | yes | |
limits.participants | integer | yes | |
limits.tabs | integer | yes | |
liveAvailable | boolean | yes | False when today's live minutes are spent: the board opens read-only and reloads its tabs by hand. |
url | string | yes | The board's address in the portal. |
shortUrl | string | yes | The short address, for chat and a QR code. |
BoardHead
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
orgId | string | yes | |
version | integer | yes | |
tabs | BoardTab[] | yes | |
tabs[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tabs[].name | string | yes | |
tabs[].kind | string | yes | The kind the source declares, such as flow. |
tabs[].position | number | yes | |
tabs[].version | integer | yes | |
tabs[].updatedAt | integer | yes | |
tabs[].updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
tabs[].library | object | null | yes | |
tabs[].library.diagramId | string | yes | |
tabs[].library.version | integer | yes | |
tabs[].library.saved | boolean | yes | True while the tab holds what was saved or imported. |
BoardTab
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
name | string | yes | |
kind | string | yes | The kind the source declares, such as flow. |
position | number | yes | |
version | integer | yes | |
updatedAt | integer | yes | |
updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
library | object | null | yes | |
library.diagramId | string | yes | |
library.version | integer | yes | |
library.saved | boolean | yes | True while the tab holds what was saved or imported. |
BoardLiveLimits
| Field | Type | Required | Description |
|---|---|---|---|
sessionMinutes | integer | yes | |
idleMinutes | integer | yes | |
hiddenGraceSeconds | integer | yes | |
participants | integer | yes | |
tabs | integer | yes |
CreateBoardBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 120 characters. |
classification | "public" | "internal" | "confidential" | no |
UpdateBoardBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 1 character; at most 120 characters. |
classification | "public" | "internal" | "confidential" | no | |
kept | boolean | no |
BoardTabRead
| Field | Type | Required | Description |
|---|---|---|---|
tab | BoardTab | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | The kind the source declares, such as flow. |
tab.position | number | yes | |
tab.version | integer | yes | |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
tab.library | object | null | yes | |
tab.library.diagramId | string | yes | |
tab.library.version | integer | yes | |
tab.library.saved | boolean | yes | True while the tab holds what was saved or imported. |
source | string | yes | |
changesSince | BoardHistoryEntry[] | yes | |
changesSince[].version | integer | yes | |
changesSince[].type | string | yes | |
changesSince[].actor | BoardActor | yes | |
changesSince[].actor.kind | "person" | "agent" | "key" | yes | |
changesSince[].actor.label | string | yes | |
changesSince[].counts | object | yes | |
changesSince[].counts.added | integer | yes | |
changesSince[].counts.removed | integer | yes | |
changesSince[].counts.renamed | integer | yes | |
changesSince[].counts.moved | integer | yes | |
changesSince[].counts.changed | integer | yes | |
changesSince[].at | integer | yes | |
changesSince[].restorable | boolean | yes |
BoardWriteResult
| Field | Type | Required | Description |
|---|---|---|---|
changed | boolean | yes | False when the write changed nothing; nothing was stored. |
version | integer | yes | |
tab | any | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | The kind the source declares, such as flow. |
tab.position | number | yes | |
tab.version | integer | yes | |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
tab.library | object | null | yes | |
tab.library.diagramId | string | yes | |
tab.library.version | integer | yes | |
tab.library.saved | boolean | yes | True while the tab holds what was saved or imported. |
head | BoardHead | yes | |
head.id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
head.orgId | string | yes | |
head.version | integer | yes | |
head.tabs | BoardTab[] | yes | |
head.tabs[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
head.tabs[].name | string | yes | |
head.tabs[].kind | string | yes | The kind the source declares, such as flow. |
head.tabs[].position | number | yes | |
head.tabs[].version | integer | yes | |
head.tabs[].updatedAt | integer | yes | |
head.tabs[].updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
head.tabs[].library | object | null | yes | |
results | object[] | yes | |
results[].op | string | yes | |
results[].applied | boolean | yes | |
results[].lines | integer[] | yes | |
results[].message | string | yes | |
results[].hint | string | null | yes | |
changes | object[] | yes | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
warnings | Diagnostic[] | yes | |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
secrets | object | yes | |
secrets.count | integer | yes | |
secrets.kinds | string[] | yes |
AddBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 60 characters. |
source | string | no | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
after | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
UpdateBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 1 character; at most 60 characters. |
after | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
EditBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
baseVersion | integer | yes | |
operations | object[] | yes | |
operations[].op | "rename" | "set" | "add_node" | "remove" | "add_edge" | "remove_edge" | "move" | "replace_text" | yes | |
operations[].target | string | no | Id, label, table.column, or "header". at most 2000 characters. |
operations[].to | string | no | rename: the new name. Edges: the end. at most 2000 characters. |
operations[].from | string | no | Edges: the start. at most 2000 characters. |
operations[].option | string | no | at most 40 characters; pattern ^[a-z][A-Za-z0-9_-]*$. |
operations[].value | string | null | no | set: null removes the option. at most 2000 characters. |
operations[].id | string | no | at most 2000 characters. |
operations[].label | string | no | add_edge on sankey: the amount. at most 2000 characters. |
operations[].type | string | no | add_node: node type, or statement word (c4 person, tree dir). at most 2000 characters. |
operations[].options | object | no | |
operations[].statement | string | no | add_node: the whole line, for a kind with no plain node statement. at most 2000 characters. |
operations[].into | string | null | no | A block; null is the top level. at most 2000 characters. |
operations[].after | string | no | at most 2000 characters. |
operations[].arrow | "<-->" | "-->" | "<->" | "..>" | "->" | "--" | no | |
operations[].find | string | no | at most 2000 characters. |
operations[].replace | string | no | at most 2000 characters. |
operations[].all | boolean | no |
ReplaceBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
baseVersion | integer | yes | |
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
BoardHistory
| Field | Type | Required | Description |
|---|---|---|---|
entries | BoardHistoryEntry[] | yes | |
entries[].version | integer | yes | |
entries[].type | string | yes | |
entries[].actor | BoardActor | yes | |
entries[].actor.kind | "person" | "agent" | "key" | yes | |
entries[].actor.label | string | yes | |
entries[].counts | object | yes | |
entries[].counts.added | integer | yes | |
entries[].counts.removed | integer | yes | |
entries[].counts.renamed | integer | yes | |
entries[].counts.moved | integer | yes | |
entries[].counts.changed | integer | yes | |
entries[].at | integer | yes | |
entries[].restorable | boolean | yes |
BoardTabVersion
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | yes | |
source | string | yes |
RestoreBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | yes |
BoardAccess
| Field | Type | Required | Description |
|---|---|---|---|
access | "org" | "restricted" | yes | |
orgRole | "view" | "edit" | yes | |
grants | BoardGrant[] | yes | |
grants[].kind | "user" | "group" | yes | |
grants[].id | string | yes | |
grants[].name | string | yes | A member's email address, or a group's name. |
grants[].role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
joinLinks | BoardJoinLink[] | yes | |
joinLinks[].id | string | yes | |
joinLinks[].role | "view" | "edit" | yes | |
joinLinks[].createdAt | integer | yes | |
joinLinks[].expiresAt | integer | yes | |
canManage | boolean | yes | |
guestLink | boolean | yes | True when anyone signed in with the link may watch the board, as the board chose. |
guests | "ok" | "off" | "confidential" | yes | Whether guests may open the board now: ok, or off when the owner does not allow guests on boards, or confidential for a Confidential board. Only ok lets a guest in. |
BoardGrant
| Field | Type | Required | Description |
|---|---|---|---|
kind | "user" | "group" | yes | |
id | string | yes | |
name | string | yes | A member's email address, or a group's name. |
role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
BoardJoinLink
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
role | "view" | "edit" | yes | |
createdAt | integer | yes | |
expiresAt | integer | yes |
SetBoardAccessBody
| Field | Type | Required | Description |
|---|---|---|---|
access | "org" | "restricted" | yes | |
orgRole | "view" | "edit" | yes | |
guestLink | boolean | no | Anyone signed in with the link may watch the board, read only. Left out, it stays as it is. |
SetBoardGrantBody
| Field | Type | Required | Description |
|---|---|---|---|
kind | "user" | "group" | yes | |
id | string | yes | at least 1 character; at most 64 characters. |
role | "view" | "edit" | "manage" | yes | view: look; edit: change the tabs; manage: also change who may open the board. |
NewBoardJoinLink
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
role | "view" | "edit" | yes | |
createdAt | integer | yes | |
expiresAt | integer | yes | |
url | string | yes | The link to share. Its token is not stored and cannot be shown again. |
CreateBoardJoinLinkBody
| Field | Type | Required | Description |
|---|---|---|---|
role | "view" | "edit" | yes |
BoardAccessRequestList
| Field | Type | Required | Description |
|---|---|---|---|
items | BoardAccessRequest[] | yes | |
items[].id | string | yes | |
items[].board | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
items[].boardName | string | yes | |
items[].email | string | yes | |
items[].note | string | null | yes | |
items[].member | boolean | yes | False for a person outside the organisation: approving invites them. |
items[].createdAt | integer | yes |
BoardAccessRequest
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
board | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
boardName | string | yes | |
email | string | yes | |
note | string | null | yes | |
member | boolean | yes | False for a person outside the organisation: approving invites them. |
createdAt | integer | yes |
DecideBoardAccessRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
decision | "approve" | "decline" | yes | |
role | "view" | "edit" | no |
ImportToBoardBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 1 character; at most 60 characters. |
after | string | null | no | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
from | object | object | object | object | object | object | object | object | yes |
SaveBoardTabResult
| Field | Type | Required | Description |
|---|---|---|---|
diagram | object | yes | |
diagram.id | string | yes | |
diagram.name | string | null | yes | |
diagram.version | integer | yes | |
status | "saved" | "held" | "unchanged" | yes | |
approval | object | null | yes | |
approval.code | string | yes | |
approval.message | string | yes | |
tab | BoardTab | yes | |
tab.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
tab.name | string | yes | |
tab.kind | string | yes | The kind the source declares, such as flow. |
tab.position | number | yes | |
tab.version | integer | yes | |
tab.updatedAt | integer | yes | |
tab.updatedBy | string | yes | Who changed it last: an email address, an agent and its member, or a key name. |
tab.library | object | null | yes | |
tab.library.diagramId | string | yes | |
tab.library.version | integer | yes | |
tab.library.saved | boolean | yes | True while the tab holds what was saved or imported. |
SaveBoardTabBody
| Field | Type | Required | Description |
|---|---|---|---|
to | "new" | "linked" | yes | new: a new library diagram. linked: a new version of the library diagram the tab is linked to. |
name | string | no | at least 1 character; at most 200 characters. |
folder | string | null | no | Folder names from the outermost in, joined with a slash, such as "Payments/Checkout", with no slash at either end. Folder names may use letters A to Z, numbers, spaces, - and _. No space at either end of a name and never two together. Up to 5 levels and 40 characters a name. at most 204 characters; pattern ^[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*(?:/[A-Za-z0-9_-]+(?: [A-Za-z0-9_-]+)*){0,4}$. |
libraryVersion | integer | no | For linked: the library diagram's version the tab last saw. Left out, the tab's own link. minimum 0. |
BoardExportBody
| Field | Type | Required | Description |
|---|---|---|---|
format | "svg" | "png" | "diagram" | "markdown" | "view-link" | "pdf" | "pptx" | "zip" | yes | |
tabs | integer | yes | minimum 1; maximum 100. |
DiagramBoards
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | yes | |
items[].id | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
items[].name | string | yes | |
items[].tab | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
hidden | integer | yes | minimum 0. |
BoardWhere
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | yes | |
board | string | yes | at least 22 characters; at most 22 characters; pattern ^[0-9A-Za-z]+$. |
JoinBoardBody
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | at least 16 characters; at most 128 characters. |
BoardAccessRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
note | string | no | at most 200 characters. |
BoardRevisionResult
| Field | Type | Required | Description |
|---|---|---|---|
changed | boolean | yes | |
revision | any | yes | |
revision.id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision.tab | string | yes | |
revision.name | string | yes | |
revision.author | RevisionPerson | yes | |
revision.author.kind | "person" | "agent" | "key" | yes | |
revision.author.label | string | yes | |
revision.authorId | string | null | yes | |
revision.visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
revision.people | string[] | yes | The account ids it is shared with by name. |
revision.status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
revision.baseVersion | integer | yes | The main version it forked from, or was last updated from. |
revision.version | integer | yes | |
revision.behind | integer | yes | Main versions made since baseVersion. |
revision.createdAt | integer | yes | |
revision.updatedAt | integer | yes | |
revision.updatedBy | RevisionPerson | yes | |
revision.updatedBy.kind | "person" | "agent" | "key" | yes | |
revision.updatedBy.label | string | yes | |
revision.readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
revision.mine | boolean | yes | |
revision.request | object | null | yes | |
revision.request.by | RevisionPerson | yes | |
revision.request.at | integer | yes | |
revision.request.note | string | null | yes | |
revision.review | object | null | yes | |
revision.review.by | RevisionPerson | yes | |
revision.review.at | integer | yes | |
revision.review.comment | string | null | yes | |
revision.mergedVersion | integer | null | yes | |
revision.mergedBy | any | yes | |
revision.mergedBy.kind | "person" | "agent" | "key" | yes | |
revision.mergedBy.label | string | yes | |
revision.closedAt | integer | null | yes | |
list | BoardRevisionList | no | |
list.mainVersion | integer | yes | |
list.protected | boolean | yes | True when a merge into main needs the approval of a person who manages the board. |
list.revisions | BoardRevision[] | yes | |
list.revisions[].id | string | yes | at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
list.revisions[].tab | string | yes | |
list.revisions[].name | string | yes | |
list.revisions[].author | RevisionPerson | yes | |
list.revisions[].authorId | string | null | yes | |
list.revisions[].visibility | "private" | "board" | "people" | yes | private: the author only; board: everyone the board is open to; people: the author and the people named. |
list.revisions[].people | string[] | yes | The account ids it is shared with by name. |
list.revisions[].status | "open" | "pending" | "merged" | "discarded" | yes | open, pending (a merge waits for approval), merged, or discarded. |
list.revisions[].baseVersion | integer | yes | The main version it forked from, or was last updated from. |
list.revisions[].version | integer | yes | |
list.revisions[].behind | integer | yes | Main versions made since baseVersion. |
list.revisions[].createdAt | integer | yes | |
list.revisions[].updatedAt | integer | yes | |
list.revisions[].updatedBy | RevisionPerson | yes | |
list.revisions[].readable | boolean | yes | False for a private revision shown by its name only, to the people who manage the board. |
list.revisions[].mine | boolean | yes | |
list.revisions[].request | object | null | yes | |
list.revisions[].review | object | null | yes | |
list.revisions[].mergedVersion | integer | null | yes | |
list.revisions[].mergedBy | any | yes | |
list.revisions[].closedAt | integer | null | yes | |
list.hidden | integer | yes | Open revisions the caller may not see. |
list.limit | integer | yes | Open revisions a tab may have. |
source | string | no | |
results | object[] | no | |
results[].op | string | yes | |
results[].applied | boolean | yes | |
results[].lines | integer[] | yes | |
results[].message | string | yes | |
results[].hint | string | null | yes | |
changes | object[] | no | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
counts | object | no | |
counts.added | integer | yes | |
counts.removed | integer | yes | |
counts.renamed | integer | yes | |
counts.moved | integer | yes | |
counts.changed | integer | yes | |
warnings | Diagnostic[] | no | |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
secrets | object | no | |
secrets.count | integer | yes | |
secrets.kinds | string[] | yes | |
entries | object[] | no | |
entries[].version | integer | yes | |
entries[].type | string | yes | |
entries[].actor | RevisionPerson | yes | |
entries[].actor.kind | "person" | "agent" | "key" | yes | |
entries[].actor.label | string | yes | |
entries[].counts | object | yes | |
entries[].counts.added | integer | yes | |
entries[].counts.removed | integer | yes | |
entries[].counts.renamed | integer | yes | |
entries[].counts.moved | integer | yes | |
entries[].counts.changed | integer | yes | |
entries[].at | integer | yes | |
compare | BoardRevisionCompare | no | |
compare.mainVersion | integer | yes | |
compare.version | integer | yes | |
compare.behind | integer | yes | |
compare.same | boolean | yes | |
compare.counts | object | yes | |
compare.counts.added | integer | yes | |
compare.counts.removed | integer | yes | |
compare.counts.renamed | integer | yes | |
compare.counts.moved | integer | yes | |
compare.counts.changed | integer | yes | |
compare.changes | object[] | yes | |
compare.changes[].change | string | yes | |
compare.changes[].subject | string | yes | |
compare.changes[].name | string | yes | |
compare.changes[].line | integer | null | yes | |
compare.changes[].detail | string | yes | |
compare.truncated | boolean | yes | |
compare.summary | string | yes | |
compare.conflicts | BoardMergeConflict[] | yes | |
compare.conflicts[].key | string | yes | The statement: its id, its label in quotes, or an edge by its ends. A resolution names it. |
compare.conflicts[].subject | string | yes | |
compare.conflicts[].base | string | null | yes | |
compare.conflicts[].main | string | null | yes | |
compare.conflicts[].revision | string | null | yes | |
compare.mergeable | boolean | yes | |
compare.main | string | yes | Main's source now. |
compare.merged | string | null | yes | Main as the merge would leave it; null while a conflict is open. |
compare.revision | string | yes | |
merge | object | no | |
merge.status | "merged" | "pending" | yes | |
merge.mainVersion | integer | yes | |
merge.method | "same" | "fast-forward" | "replay" | "statements" | null | yes | |
sent | integer | no |
BoardRevisionCompare
| Field | Type | Required | Description |
|---|---|---|---|
mainVersion | integer | yes | |
version | integer | yes | |
behind | integer | yes | |
same | boolean | yes | |
counts | object | yes | |
counts.added | integer | yes | |
counts.removed | integer | yes | |
counts.renamed | integer | yes | |
counts.moved | integer | yes | |
counts.changed | integer | yes | |
changes | object[] | yes | |
changes[].change | string | yes | |
changes[].subject | string | yes | |
changes[].name | string | yes | |
changes[].line | integer | null | yes | |
changes[].detail | string | yes | |
truncated | boolean | yes | |
summary | string | yes | |
conflicts | BoardMergeConflict[] | yes | |
conflicts[].key | string | yes | The statement: its id, its label in quotes, or an edge by its ends. A resolution names it. |
conflicts[].subject | string | yes | |
conflicts[].base | string | null | yes | |
conflicts[].main | string | null | yes | |
conflicts[].revision | string | null | yes | |
mergeable | boolean | yes | |
main | string | yes | Main's source now. |
merged | string | null | yes | Main as the merge would leave it; null while a conflict is open. |
revision | string | yes |
CreateBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | at least 1 character; at most 60 characters. |
fromVersion | integer | no | |
visibility | "private" | "board" | "people" | no | private: the author only; board: everyone the board is open to; people: the author and the people named. |
UpdateBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | at least 1 character; at most 60 characters. |
visibility | "private" | "board" | "people" | no | private: the author only; board: everyone the board is open to; people: the author and the people named. |
people | string[] | no |
EditBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
baseVersion | integer | yes | |
operations | object[] | yes | |
operations[].op | "rename" | "set" | "add_node" | "remove" | "add_edge" | "remove_edge" | "move" | "replace_text" | yes | |
operations[].target | string | no | Id, label, table.column, or "header". at most 2000 characters. |
operations[].to | string | no | rename: the new name. Edges: the end. at most 2000 characters. |
operations[].from | string | no | Edges: the start. at most 2000 characters. |
operations[].option | string | no | at most 40 characters; pattern ^[a-z][A-Za-z0-9_-]*$. |
operations[].value | string | null | no | set: null removes the option. at most 2000 characters. |
operations[].id | string | no | at most 2000 characters. |
operations[].label | string | no | add_edge on sankey: the amount. at most 2000 characters. |
operations[].type | string | no | add_node: node type, or statement word (c4 person, tree dir). at most 2000 characters. |
operations[].options | object | no | |
operations[].statement | string | no | add_node: the whole line, for a kind with no plain node statement. at most 2000 characters. |
operations[].into | string | null | no | A block; null is the top level. at most 2000 characters. |
operations[].after | string | no | at most 2000 characters. |
operations[].arrow | "<-->" | "-->" | "<->" | "..>" | "->" | "--" | no | |
operations[].find | string | no | at most 2000 characters. |
operations[].replace | string | no | at most 2000 characters. |
operations[].all | boolean | no |
ReplaceBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
baseVersion | integer | yes | |
source | string | yes | Diagram source; the first line is the header, such as flow "Title" (draw_diagram lists every kind). at least 1 character; at most 120000 characters. |
RestoreBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | yes |
UpdateBoardRevisionFromMainBody
| Field | Type | Required | Description |
|---|---|---|---|
resolutions | BoardMergeResolution[] | no | |
resolutions[].key | string | yes | at least 1 character; at most 2000 characters. |
resolutions[].take | "main" | "revision" | "text" | yes | |
resolutions[].text | string | null | no | With take text: the line to keep; empty removes the statement. at most 2000 characters. |
BoardMergeResolution
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | at least 1 character; at most 2000 characters. |
take | "main" | "revision" | "text" | yes | |
text | string | null | no | With take text: the line to keep; empty removes the statement. at most 2000 characters. |
MergeBoardRevisionBody
| Field | Type | Required | Description |
|---|---|---|---|
mainVersion | integer | no | The main version the resolutions were made against. |
resolutions | BoardMergeResolution[] | no | |
resolutions[].key | string | yes | at least 1 character; at most 2000 characters. |
resolutions[].take | "main" | "revision" | "text" | yes | |
resolutions[].text | string | null | no | With take text: the line to keep; empty removes the statement. at most 2000 characters. |
DeclineBoardMergeBody
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | no | at least 1 character; at most 500 characters. |
BoardSwitchRequestBody
| Field | Type | Required | Description |
|---|---|---|---|
revision | string | null | yes | The revision to switch to, or null for main. at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
BoardProtectionBody
| Field | Type | Required | Description |
|---|---|---|---|
mergeApproval | boolean | yes |
OrgBoardGuests
| Field | Type | Required | Description |
|---|---|---|---|
allowGuests | boolean | yes | Whether a board may be shared with anyone signed in, read only. Off by default. |
sharedBoards | integer | yes | Boards that share their link with guests now (their label is not Confidential). |
OrgBoardGuestsChanged
| Field | Type | Required | Description |
|---|---|---|---|
allowGuests | boolean | yes | Whether a board may be shared with anyone signed in, read only. Off by default. |
sharedBoards | integer | yes | Boards that share their link with guests now (their label is not Confidential). |
guestsClosed | integer | yes | Guests' live connections that turning it off closed. |
SetOrgBoardGuestsBody
| Field | Type | Required | Description |
|---|---|---|---|
allowGuests | boolean | yes |
OrgSecurity
| Field | Type | Required | Description |
|---|---|---|---|
requireTwoFactor | boolean | yes | Whether every member must have two-step sign-in on to use the organisation. |
since | integer | null | yes | When it was turned on, in milliseconds since the epoch, or null. |
canManage | boolean | yes | Whether the caller may change it: the owner and the admins. |
members | object | yes | |
members.total | integer | yes | |
members.withTwoFactor | integer | yes | |
without | object[] | yes | The members without two-step sign-in, for the owner and the admins; empty for anyone else. At most 200. |
without[].userId | string | yes | |
without[].email | string | yes | |
without[].name | string | null | yes | |
without[].role | string | yes | |
without[].remindedAt | integer | null | yes |
SetOrgSecurityBody
| Field | Type | Required | Description |
|---|---|---|---|
requireTwoFactor | boolean | yes |
TwoFactorReminders
| Field | Type | Required | Description |
|---|---|---|---|
sent | string[] | yes | The members a reminder went to. |
skipped | object[] | yes | Members reminded less than a day before, and when they can be reminded again. |
skipped[].userId | string | yes | |
skipped[].nextAt | integer | yes |
RemindTwoFactorBody
| Field | Type | Required | Description |
|---|---|---|---|
userIds | string[] | no | The members to remind. Left out, every member without two-step sign-in. |
OrgConnectors
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | Whether the plan has connectors: Enterprise. |
plan | string | yes | |
domains | string[] | yes | The domains the organisation verified, which a From address must be on. |
email | OrgEmailConnector[] | yes | The email connectors, at most one a provider: the default first, then in the order they were added. |
email[].provider | "resend" | "sendgrid" | "postmark" | "mailgun" | "brevo" | yes | |
email[].fromEmail | string | yes | |
email[].fromName | string | null | yes | |
email[].replyTo | string | null | yes | |
email[].region | "us" | "eu" | null | yes | Mailgun's region; null for every other provider. |
email[].tokenLast4 | string | yes | The last four characters of the token. The token itself is never answered. |
email[].enabled | boolean | yes | |
email[].isDefault | boolean | yes | Whether it is the default, the connector tried first. At most one is. |
email[].testedAt | integer | null | yes | |
email[].lastError | string | null | yes | Why the last email through it failed, in our words, or null. |
email[].lastErrorAt | integer | null | yes | |
email[].keyVersion | integer | yes | The version of the organisation's data key the token is sealed with. |
email[].updatedAt | integer | yes | |
defaultProvider | "resend" | "sendgrid" | "postmark" | "mailgun" | "brevo" | null | yes | The provider tried first, or null when there is no connector. |
OrgEmailConnector
| Field | Type | Required | Description |
|---|---|---|---|
provider | "resend" | "sendgrid" | "postmark" | "mailgun" | "brevo" | yes | |
fromEmail | string | yes | |
fromName | string | null | yes | |
replyTo | string | null | yes | |
region | "us" | "eu" | null | yes | Mailgun's region; null for every other provider. |
tokenLast4 | string | yes | The last four characters of the token. The token itself is never answered. |
enabled | boolean | yes | |
isDefault | boolean | yes | Whether it is the default, the connector tried first. At most one is. |
testedAt | integer | null | yes | |
lastError | string | null | yes | Why the last email through it failed, in our words, or null. |
lastErrorAt | integer | null | yes | |
keyVersion | integer | yes | The version of the organisation's data key the token is sealed with. |
updatedAt | integer | yes |
SetOrgEmailConnectorBody
| Field | Type | Required | Description |
|---|---|---|---|
token | string | no | The provider's API token. Required for a new connector; left out, the stored one is kept. at least 8 characters; at most 500 characters. |
fromEmail | string | yes | at least 3 characters; at most 254 characters; pattern ^[^\s@]+@[^\s@]+\.[^\s@]+$. |
fromName | string | null | no | at most 80 characters. |
replyTo | string | null | no | at least 3 characters; at most 254 characters; pattern ^[^\s@]+@[^\s@]+\.[^\s@]+$. |
region | "us" | "eu" | null | no | |
enabled | boolean | no | |
makeDefault | boolean | no | Make it the default. The organisation's first connector is the default whatever this says. |
OrgConnectorTest
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | |
reason | string | null | yes | |
to | string | yes |
BoardMessageBody
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | What the person asks of their agent, in their words. Kept on the board like a tab, never in the audit log. at least 1 character; at most 2000 characters. |
tab | string | null | no | The tab on screen, or null. at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
revision | string | null | no | The revision on screen, or null for main. at least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$. |
problems | BoardAgentProblem[] | no | The tab's problems, for Send problems. |
problems[].code | string | yes | pattern ^[A-Z]\d{3,4}$. |
problems[].severity | "error" | "warning" | yes | |
problems[].line | integer | yes | minimum 1; maximum 1000000. |
problems[].column | integer | yes | minimum 1; maximum 1000000. |
problems[].message | string | yes | at least 1 character; at most 500 characters. |
problems[].hint | string | null | yes | at least 1 character; at most 500 characters. |
BoardAgentMessagesSetting
| Field | Type | Required | Description |
|---|---|---|---|
setting | "connector" | "managers" | yes | connector: only the member who connected the agent; managers: also the owners and admins. |
FindPatternResponse
Patterns that match a request, best first, with summaries and no source.
| Field | Type | Required | Description |
|---|---|---|---|
query | string | yes | The query that was searched. |
matches | object[] | yes | Up to the limit, best match first. Empty when nothing fits. |
matches[].id | string | yes | The pattern id, as find_pattern returns it, such as three-tier-network. at least 1 character; at most 60 characters. |
matches[].title | string | yes | |
matches[].summary | string | yes | One sentence: what the diagram shows. |
matches[].kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
matches[].tags | string[] | yes | |
matches[].providers | ("neutral" | "aws" | "azure" | "gcp")[] | yes | The flavours the pattern comes in. |
matches[].score | number | yes | How well it matches; only the order of the results is meaningful. |
matches[].origin | "organisation" | no | Present on a pattern of your organisation's own, which it approved and which comes first. Absent on the built-in patterns. |
matches[].label | "Your organisation's pattern" | no | Present, with origin, on a pattern of your organisation: the words to show beside it. |
next | string | yes | The next step in one sentence. |
FindPatternInput
Words that describe the architecture wanted, and optional filters.
| Field | Type | Required | Description |
|---|---|---|---|
query | string | yes | The architecture wanted, in plain words, such as "three tier network". at least 1 character; at most 200 characters. |
provider | "neutral" | "aws" | "azure" | "gcp" | no | Only patterns that come in this flavour: neutral, aws, azure, or gcp. |
tags | string[] | no | Tags every result must have, such as "load balancer". Up to 5. |
kind | "flow" | "sequence" | "schema" | "git" | "gantt" | "class" | "state" | "timeline" | "journey" | "mindmap" | "treemap" | "pie" | "quadrant" | "layers" | "c4" | "matrix" | "sankey" | "xychart" | "tree" | "swimlane" | "requirement" | "block" | "packet" | "kanban" | "radar" | "usecase" | "venn" | "fishbone" | "wardley" | no | Only patterns of this diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley. |
limit | integer | no | Most results to return, up to 5. minimum 1; maximum 5; default 5. |
GetPatternResponse
A pattern filled for one flavour, with its slots and advice.
| Field | Type | Required | Description |
|---|---|---|---|
found | boolean | yes | True when the pattern and flavour exist and the slot values are usable. When false, problems says why and nothing else is filled. |
id | string | yes | The pattern id that was asked for. |
title | string | null | yes | |
patternSummary | string | null | yes | One sentence: what the pattern shows. |
whenToUse | string | null | yes | |
kind | string | null | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
flavour | "neutral" | "aws" | "azure" | "gcp" | null | yes | The flavour that was filled. |
flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | Every flavour this pattern comes in; empty when the pattern was not found. |
source | string | null | yes | Plotwork source, valid and ready to use; null when not found. |
slots | object[] | yes | Every slot the source uses, with the value it has. |
slots[].id | string | yes | The slot id; the key to use in slots. |
slots[].value | string | yes | The text the slot has in the source: the value sent, or the default. |
slots[].default | string | yes | The default text. |
slots[].meaning | string | yes | What belongs in this slot. |
slots[].isDefault | boolean | yes | True when the slot kept its default. |
notes | object | null | yes | How to adapt the pattern: what to keep, what to rename, and when to split. |
notes.keep | string | yes | What to leave exactly as it is. |
notes.rename | string | yes | What to rename or replace, and how. |
notes.split | string | yes | When the diagram has grown too big, and where to cut it. |
problems | object[] | yes | Mistakes in the id, the flavour, or the slot values, each with a fix. Empty when found. |
problems[].code | "unknown-pattern" | "unknown-flavour" | "unknown-slot" | "bad-slot-value" | "bad-source" | yes | |
problems[].message | string | yes | |
problems[].hint | string | yes | How to fix it. |
tree | object[] | yes | The groups, overlays, and nodes as drawn, depth first, so you can see what to rename. |
tree[].depth | integer | yes | How deep the item sits: 0 for the top level. |
tree[].kind | "group" | "overlay" | "node" | "actor" | "table" | yes | |
tree[].id | string | yes | The id written in the source. |
tree[].label | string | yes | |
tree[].type | string | null | yes | The group type, node type, or actor type; null for a table or an untyped group. |
outline | string[] | yes | The text description of the diagram. |
file | object | null | no | The whole pattern as a pattern file, when file was true and the pattern was found. |
file.$schema | string | no | |
file.name | string | yes | |
file.title | string | yes | |
file.summary | string | yes | |
file.whenToUse | string | no | |
file.tags | string[] | no | |
file.templates | object | yes | |
file.templates.neutral | string | no | |
file.templates.aws | string | no | |
file.templates.azure | string | no | |
file.templates.gcp | string | no | |
file.slots | object[] | no | |
file.slots[].id | string | yes | |
file.slots[].default | string | yes | |
file.slots[].meaning | string | yes | |
file.notes | object | no | |
file.notes.keep | string | no | |
file.notes.rename | string | no | |
file.notes.split | string | no | |
next | string | yes | The next step in one sentence. |
GetPatternInput
A pattern id, the flavour to draw, and the slot values to use.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The pattern id, as find_pattern returns it, such as three-tier-network. at least 1 character; at most 60 characters. |
provider | "neutral" | "aws" | "azure" | "gcp" | no | neutral (generic glyphs, no vendor names; the default), or aws, azure, or gcp for that provider's icons. Not every pattern comes in every flavour; the answer lists the ones it has. default "neutral". |
slots | object | no | Slot values keyed by slot id, such as {"office": "Branch office"}: plain text of up to 60 characters, no quotes or line breaks. Omit a slot to keep its default. get_pattern lists the slots and what they mean. |
file | boolean | no | true also returns the whole pattern as a pattern file, to edit, check_pattern and publish_pattern. |
DrawFromPatternResponse
A pattern filled, checked, and drawn in one call.
| Field | Type | Required | Description |
|---|---|---|---|
found | boolean | yes | True when the pattern and flavour exist and the slot values are usable. When false, problems says why and nothing else is filled. |
id | string | yes | The pattern id that was asked for. |
title | string | null | yes | |
patternSummary | string | null | yes | One sentence: what the pattern shows. |
whenToUse | string | null | yes | |
kind | string | null | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
flavour | "neutral" | "aws" | "azure" | "gcp" | null | yes | The flavour that was filled. |
flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | Every flavour this pattern comes in; empty when the pattern was not found. |
source | string | null | yes | Plotwork source, valid and ready to use; null when not found. |
slots | object[] | yes | Every slot the source uses, with the value it has. |
slots[].id | string | yes | The slot id; the key to use in slots. |
slots[].value | string | yes | The text the slot has in the source: the value sent, or the default. |
slots[].default | string | yes | The default text. |
slots[].meaning | string | yes | What belongs in this slot. |
slots[].isDefault | boolean | yes | True when the slot kept its default. |
notes | object | null | yes | How to adapt the pattern: what to keep, what to rename, and when to split. |
notes.keep | string | yes | What to leave exactly as it is. |
notes.rename | string | yes | What to rename or replace, and how. |
notes.split | string | yes | When the diagram has grown too big, and where to cut it. |
problems | object[] | yes | Mistakes in the id, the flavour, or the slot values, each with a fix. Empty when found. |
problems[].code | "unknown-pattern" | "unknown-flavour" | "unknown-slot" | "bad-slot-value" | "bad-source" | yes | |
problems[].message | string | yes | |
problems[].hint | string | yes | How to fix it. |
valid | boolean | yes | True when the source has no errors. When false, nothing was drawn: fix the errors and call again. |
errors | Diagnostic[] | yes | Every error found in one pass, each with line, column, and a hint. Empty when valid. |
errors[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
errors[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
errors[].message | string | yes | What is wrong, in one sentence. |
errors[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
errors[].column | integer | yes | 1-based column in that line. minimum 1. |
errors[].length | integer | yes | Number of characters the problem covers. minimum 1. |
errors[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
errors[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
errors[].fix.label | string | yes | What the fix does, in a few words, for a button. |
errors[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
warnings | Diagnostic[] | yes | Quality warnings for a valid diagram: too dense, too wide, text cut, unconnected nodes, and suggestions for an icon or a group type. Empty when invalid. |
warnings[].code | "E100" | "E101" | "E110" | "E111" | "E120" | "E121" | "E123" | "E124" | "E125" | "E130" | "E131" | "E132" | "E133" | "E134" | "E135" | "E136" | "E137" | "E138" | "E139" | "E140" | "W200" | "W201" | "W202" | "W203" | "W204" | "W205" | "W206" | "W207" | "W208" | "W209" | "W500" | "W600" | "W601" | "W700" | "W701" | "W702" | "W703" | "W704" | "W705" | "W706" | "W707" | "W708" | "W709" | "W710" | "M100" | "M101" | "M102" | "M103" | "M104" | "M110" | "M200" | "M201" | "M202" | "M203" | "M204" | "M205" | "M206" | "M207" | "M208" | "M209" | "M210" | "M211" | "M212" | "M213" | "M214" | "M215" | "M216" | "M217" | "M218" | "E300" | "E301" | "E302" | "E303" | "E304" | "W300" | "W301" | "W302" | "W303" | "M120" | "M220" | "M221" | "M222" | "E340" | "E341" | "E342" | "E343" | "E344" | "E345" | "W320" | "W321" | "W322" | "W323" | "M240" | "M241" | "M242" | "E360" | "E361" | "E362" | "E363" | "E364" | "E365" | "E366" | "E367" | "W330" | "W331" | "W332" | "W333" | "W334" | "M250" | "M251" | "E400" | "E401" | "E402" | "E403" | "W350" | "W351" | "W352" | "W353" | "M270" | "M271" | "E420" | "E421" | "E422" | "E423" | "E424" | "W360" | "W361" | "W362" | "W363" | "W364" | "M180" | "M280" | "M281" | "M282" | "E320" | "E321" | "E322" | "E323" | "E324" | "E325" | "E326" | "E327" | "E328" | "E329" | "E330" | "W310" | "W311" | "W312" | "W313" | "W314" | "M130" | "M131" | "M132" | "M230" | "M231" | "M232" | "M233" | "M234" | "M235" | "M236" | "M237" | "M238" | "E380" | "E381" | "E382" | "E383" | "W340" | "W341" | "W342" | "W343" | "M260" | "I100" | "I101" | "I102" | "I103" | "I104" | "I105" | "I200" | "I201" | "I202" | "I203" | "I204" | "I206" | "I207" | "R100" | "R101" | "R200" | "R201" | "R202" | "R203" | "R204" | "R205" | "R206" | "R207" | "S100" | "S200" | "S101" | "S102" | "S103" | "S104" | "S201" | "S202" | "S203" | "S204" | "S205" | yes | Stable code to branch on; E-codes are errors, W-codes are warnings. |
warnings[].severity | "error" | "warning" | yes | Errors stop rendering; warnings never do. |
warnings[].message | string | yes | What is wrong, in one sentence. |
warnings[].line | integer | yes | 1-based line in the submitted source. minimum 1. |
warnings[].column | integer | yes | 1-based column in that line. minimum 1. |
warnings[].length | integer | yes | Number of characters the problem covers. minimum 1. |
warnings[].hint | string | null | yes | A concrete suggestion for fixing it, or null. |
warnings[].fix | object | no | The one certain fix, to apply as it is. Present only when exactly one fix is certain. |
warnings[].fix.label | string | yes | What the fix does, in a few words, for a button. |
warnings[].fix.edits | FixEdit[] | yes | The edits, all against the source the diagnostic was found in. |
summary | string | null | yes | One-line description of the diagram, usable as alt text; null when invalid. |
outline | string[] | yes | The diagram as plain text in reading order, to check it says what you meant; empty when invalid. |
outlineTruncated | boolean | yes | True when the summary level cut the outline short. Call again with detail "full" to read all of it. |
size | object | null | yes | Natural size of the laid-out diagram; null when invalid. |
size.width | integer | yes | Width in px. minimum 1. |
size.height | integer | yes | Height in px. minimum 1. |
quality | object | no | How clean the picture looks (score, grade, measures) and up to three changes that would help; read it instead of looking. Absent when invalid. |
quality.score | integer | yes | 0 to 100; 100 is a picture with nothing to fix. The same diagram always gets the same score. minimum 0; maximum 100. |
quality.grade | "clean" | "fair" | "cluttered" | yes | clean is 85 or more, fair 60 or more, cluttered below. |
quality.measures | object | yes | What the score is made from: crossings, lineOverBox, labelOverlaps, smallestTextPx (in an 880px column), aspectRatio, emptySpace (0 to 1), longestLine (px), detour (1 is straight), the counts of boxes, lines, labels, series, and slices, and any measure the kind adds. |
quality.hints | string[] | yes | Up to three changes, the one worth most first, each naming the statement or option to edit. |
quality.line | string | yes | The grade, the score, and the first hint in one line. |
notices | Note[] | no | Information notes, such as an icon alias drawn as the real icon; absent when there is none. |
notices[].code | string | yes | A stable code, such as I122 for an icon alias. |
notices[].severity | "info" | yes | A note never stops a drawing and is not a warning. |
notices[].message | string | yes | |
notices[].line | integer | yes | minimum 1. |
notices[].column | integer | yes | minimum 1. |
notices[].length | integer | yes | minimum 1. |
notices[].hint | string | null | yes | The text to write instead. |
renders | object[] | yes | One picture per requested color scheme, light first; empty when invalid, when svg is never, and when every picture was left out (see picturesOmitted). |
renders[].scheme | "light" | "dark" | yes | The color scheme this picture is drawn in. |
renders[].svg | string | yes | Self-contained SVG markup with an accessible title and description. |
renders[].size | Size | yes | Natural size of a rendered diagram in px. |
renders[].size.width | integer | yes | Width in px. minimum 1. |
renders[].size.height | integer | yes | Height in px. minimum 1. |
picturesOmitted | object | no | Present only when pictures were left out because the answer would have been too big for an AI client to read in one piece. |
picturesOmitted.schemes | ("light" | "dark")[] | yes | The color schemes whose pictures were left out. |
picturesOmitted.characters | integer | yes | How many characters the pictures left out came to. |
picturesOmitted.limit | integer | yes | The most characters one answer may hold before the pictures are left out. |
picturesOmitted.why | string | yes | Why they were left out, and what to do. |
viewUrl | string | no | A link that shows a valid diagram in a browser; give it to the person who wants to look. It holds the drawing itself: the source is in the part after #, never sent to a server, so nothing is saved on Plotwork and it appears in no Diagrams list; anyone with the link can read it. Absent when too long; next says so. |
pngUrl | string | no | The viewUrl with &download=png: opening it in a browser saves the diagram as a PNG for Slack, email, or a wiki. The PNG is drawn in the person's browser, not on a server, so it is a link to open, not an image address to embed. Absent when too long. |
svgUrl | string | no | The viewUrl with &download=svg: a person opens it to download the SVG. Not a file address for curl; use saveCommand. Absent when too long. |
saveCommand | string | no | Run in a shell to save the SVG into the repository: the CLI decodes the link locally, fetches nothing, and embeds the source. Set --out to the path; add --scheme dark for dark. Absent when too long. |
next | string | yes | The next step in one sentence. |
DrawFromPatternInput
A pattern id, the flavour and slot values to use, and what to return.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The pattern id, as find_pattern returns it, such as three-tier-network. at least 1 character; at most 60 characters. |
provider | "neutral" | "aws" | "azure" | "gcp" | no | neutral (generic glyphs, no vendor names; the default), or aws, azure, or gcp for that provider's icons. Not every pattern comes in every flavour; the answer lists the ones it has. default "neutral". |
slots | object | no | Slot values keyed by slot id, such as {"office": "Branch office"}: plain text of up to 60 characters, no quotes or line breaks. Omit a slot to keep its default. get_pattern lists the slots and what they mean. |
schemes | "light" | "dark" | "both" | no | light, dark, or both (the default): the light picture and the dark one a dark page needs. default "both". |
detail | "summary" | "full" | no | summary (the default), or full: the whole outline, and the source embedded in each SVG. default "summary". |
svg | "auto" | "always" | "never" | no | auto (the default): over MCP the SVG text stays out of the answer (picturesOmitted). always returns it. never draws nothing, cheapest. Checks run either way. The HTTP API treats auto as always. default "auto". |
embedSource | boolean | no | Write the source into each SVG so read_diagram can give it back. Set it when you save the SVG in a repository or publish it to edit later; anyone with the file or link can then read the source. default false. |
settings | object | no | The repo's plotwork.config.json, if any. Schema: https://docs.plotwork.dev/schemas/plotwork.config.json (opens in a new tab). |
CheckPatternResponse
Whether a pattern file would be saved, its problems with fixes, and the source each flavour draws.
| Field | Type | Required | Description |
|---|---|---|---|
valid | boolean | yes | True when the file passes every check a save runs, so publish_pattern or the portal's import would take it. |
id | string | null | yes | The id it would have, org: |
kind | string | null | yes | The kind of diagram every flavour draws; null when not valid. |
flavours | ("neutral" | "aws" | "azure" | "gcp")[] | yes | The flavours the file gives. |
problems | object[] | yes | Every problem at once, each with its field and a fix. Empty when valid. |
problems[].field | string | yes | Where the problem is: name, title, templates.aws, slots.0.default, and so on; json for a file that is not JSON. |
problems[].message | string | yes | |
problems[].hint | string | yes | How to fix it. |
sources | object | yes | Each flavour filled with the slot defaults, keyed by flavour: send one to draw_diagram to see it and its warnings. Empty when not valid. |
next | string | yes | The next step in one sentence. |
CheckPatternInput
A pattern file to check before it is published or imported.
| Field | Type | Required | Description |
|---|---|---|---|
pattern | object | yes | The pattern file. Every field is described at https://docs.plotwork.dev/schemas/plotwork.pattern.json (opens in a new tab); get_pattern with file true gives one to start from. |
pattern.$schema | string | no | |
pattern.name | string | yes | |
pattern.title | string | yes | |
pattern.summary | string | yes | |
pattern.whenToUse | string | no | |
pattern.tags | string[] | no | |
pattern.templates | object | yes | |
pattern.templates.neutral | string | no | |
pattern.templates.aws | string | no | |
pattern.templates.azure | string | no | |
pattern.templates.gcp | string | no | |
pattern.slots | object[] | no | |
pattern.slots[].id | string | yes | |
pattern.slots[].default | string | yes | |
pattern.slots[].meaning | string | yes | |
pattern.notes | object | no | |
pattern.notes.keep | string | no | |
pattern.notes.rename | string | no | |
pattern.notes.split | string | no |
ProviderVersions
| Field | Type | Required | Description |
|---|---|---|---|
source | "registry" | "fallback" | yes | registry when the list is the Terraform Registry's; fallback when the Registry could not be read and the list is the one release this build was made with. |
latest | string | yes | The newest stable version, or the newest beta while no stable version exists. at most 64 characters. |
items | ProviderVersion[] | yes | Every version the Registry lists, newest first, at most 100. |
items[].version | string | yes | The version, as required_providers names it. at most 64 characters. |
items[].channel | "stable" | "beta" | yes | beta for a pre-release (a version with a suffix such as -beta.3), which a version range never picks; stable otherwise. |
items[].publishedAt | string | null | yes | When the Registry published it, as an ISO 8601 time, or null when that is not known (the committed fallback). at most 40 characters. |
ProviderVersion
| Field | Type | Required | Description |
|---|---|---|---|
version | string | yes | The version, as required_providers names it. at most 64 characters. |
channel | "stable" | "beta" | yes | beta for a pre-release (a version with a suffix such as -beta.3), which a version range never picks; stable otherwise. |
publishedAt | string | null | yes | When the Registry published it, as an ISO 8601 time, or null when that is not known (the committed fallback). at most 40 characters. |
StorageGoogleStart
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | Google’s consent page. The browser goes there next. |
StorageIssuerDocument
| Field | Type | Required | Description |
|---|---|---|---|
issuer | string | yes | |
jwks_uri | string | yes | |
response_types_supported | string[] | yes | |
subject_types_supported | string[] | yes | |
id_token_signing_alg_values_supported | string[] | yes | |
claims_supported | string[] | yes |
StorageJwks
| Field | Type | Required | Description |
|---|---|---|---|
keys | object[] | yes | |
keys[].kty | "RSA" | yes | |
keys[].n | string | yes | |
keys[].e | string | yes | |
keys[].kid | string | yes | |
keys[].alg | "RS256" | yes | |
keys[].use | "sig" | yes |
StorageOverview
| Field | Type | Required | Description |
|---|---|---|---|
available | boolean | yes | Whether the plan sends the library to your storage: Pro and Enterprise. |
plan | string | yes | |
issuer | string | null | yes | Plotwork’s issuer for this organisation, which a bucket trusts; null when this server is no issuer. |
google | object | yes | |
google.configured | boolean | yes | Whether this server can connect Google Drive. |
google.picker | boolean | yes | Whether the Google folder picker is set up, so an existing folder can be chosen. |
destinations | StorageDestination[] | yes | At most one of each type. |
destinations[].id | string | yes | |
destinations[].type | "google_drive" | "s3" | "azure_blob" | "gcs" | yes | google_drive, s3, azure_blob or gcs. |
destinations[].state | "setup" | "on" | "paused" | yes | setup while the steps are not done (nothing is sent), on, or paused. |
destinations[].connected | boolean | yes | False for Google Drive until a Google account has granted access; true for a bucket. |
destinations[].target | StorageGoogleDriveTarget | StorageS3Target | StorageAzureBlobTarget | StorageGcsTarget | yes | |
destinations[].send | StorageSend | yes | |
destinations[].send.folders | array | null | yes | Library folders to send, each with the folders inside it; null for every folder that has no access rule. |
destinations[].send.formats | ("svg" | "source")[] | yes | svg sends the picture; source sends the .diagram text the picture carries, when it carries one. |
destinations[].send.scheme | "published" | "light" | "dark" | yes | A picture that follows the reader’s color scheme is sent as it is, or pinned to light or dark. |
destinations[].send.mirrorDeletions | boolean | yes | Remove a file when its diagram is deleted from the library or moved out of what is sent. |
destinations[].send.skipConfidential | boolean | yes | Leave out diagrams labelled Confidential. |
destinations[].subject | string | null | yes | The subject Plotwork’s issuer signs for this destination, which the bucket’s trust names. Null for Google Drive. |
destinations[].createdAt | integer | yes | |
destinations[].updatedAt | integer | yes | |
destinations[].status | StorageStatus | yes | |
destinations[].status.queued | integer | yes | |
destinations[].status.delivered | integer | yes | |
destinations[].status.dropped | integer | yes | |
destinations[].status.droppedLast24h | integer | yes | |
destinations[].status.files | integer | yes | Diagrams the destination holds a copy of now. |
destinations[].status.lastSuccessAt | integer | null | yes | |
destinations[].status.lastErrorAt | integer | null | yes | |
destinations[].status.lastError | string | null | yes | What failed last, in our words. Never what the destination answered. |
destinations[].status.nextAttemptAt | integer | null | yes | |
destinations[].status.failingSince | integer | null | yes |
StorageDestination
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
type | "google_drive" | "s3" | "azure_blob" | "gcs" | yes | google_drive, s3, azure_blob or gcs. |
state | "setup" | "on" | "paused" | yes | setup while the steps are not done (nothing is sent), on, or paused. |
connected | boolean | yes | False for Google Drive until a Google account has granted access; true for a bucket. |
target | StorageGoogleDriveTarget | StorageS3Target | StorageAzureBlobTarget | StorageGcsTarget | yes | |
send | StorageSend | yes | |
send.folders | array | null | yes | Library folders to send, each with the folders inside it; null for every folder that has no access rule. |
send.formats | ("svg" | "source")[] | yes | svg sends the picture; source sends the .diagram text the picture carries, when it carries one. |
send.scheme | "published" | "light" | "dark" | yes | A picture that follows the reader’s color scheme is sent as it is, or pinned to light or dark. |
send.mirrorDeletions | boolean | yes | Remove a file when its diagram is deleted from the library or moved out of what is sent. |
send.skipConfidential | boolean | yes | Leave out diagrams labelled Confidential. |
subject | string | null | yes | The subject Plotwork’s issuer signs for this destination, which the bucket’s trust names. Null for Google Drive. |
createdAt | integer | yes | |
updatedAt | integer | yes | |
status | StorageStatus | yes | |
status.queued | integer | yes | |
status.delivered | integer | yes | |
status.dropped | integer | yes | |
status.droppedLast24h | integer | yes | |
status.files | integer | yes | Diagrams the destination holds a copy of now. |
status.lastSuccessAt | integer | null | yes | |
status.lastErrorAt | integer | null | yes | |
status.lastError | string | null | yes | What failed last, in our words. Never what the destination answered. |
status.nextAttemptAt | integer | null | yes | |
status.failingSince | integer | null | yes |
StorageGoogleDriveTarget
| Field | Type | Required | Description |
|---|---|---|---|
folderId | string | null | yes | The Drive folder the library goes into, as the folder picker or a new folder gave it. pattern ^[A-Za-z0-9_-]{10,200}$. |
folderName | string | null | yes | The folder's name, for the portal to show. at least 1 character; at most 200 characters. |
StorageS3Target
| Field | Type | Required | Description |
|---|---|---|---|
roleArn | string | yes | The IAM role that trusts Plotwork’s issuer for this organisation. pattern ^arn:aws(-[a-z]+)*:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$. |
bucket | string | yes | pattern ^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$. |
region | string | yes | pattern ^[a-z]{2}(-gov|-iso[a-z]*)?-[a-z]+-\d$. |
prefix | string | yes | Where in the bucket the files go, such as plotwork/. Empty for the top. at most 200 characters; pattern ^(?!\/)[A-Za-z0-9!_.*'()/ -]*$. |
StorageAzureBlobTarget
| Field | Type | Required | Description |
|---|---|---|---|
tenantId | string | yes | The Microsoft Entra tenant. |
clientId | string | yes | The app registration whose federated credential trusts Plotwork’s issuer. |
account | string | yes | pattern ^[a-z0-9]{3,24}$. |
container | string | yes | pattern ^[a-z0-9](?!.*--)[a-z0-9-]{1,61}[a-z0-9]$. |
prefix | string | yes | Where in the bucket the files go, such as plotwork/. Empty for the top. at most 200 characters; pattern ^(?!\/)[A-Za-z0-9!_.*'()/ -]*$. |
StorageGcsTarget
| Field | Type | Required | Description |
|---|---|---|---|
projectNumber | string | yes | pattern ^\d{6,20}$. |
poolId | string | yes | pattern ^[a-z0-9-]{4,32}$. |
providerId | string | yes | pattern ^[a-z0-9-]{4,32}$. |
bucket | string | yes | pattern ^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$. |
prefix | string | yes | Where in the bucket the files go, such as plotwork/. Empty for the top. at most 200 characters; pattern ^(?!\/)[A-Za-z0-9!_.*'()/ -]*$. |
serviceAccount | string | null | yes | A service account to act as, when the bucket grants it rather than the pool. Null to use the pool’s identity directly. pattern ^[a-z0-9-]{6,30}@[a-z0-9-]{6,30}\.iam\.gserviceaccount\.com$. |
StorageSend
| Field | Type | Required | Description |
|---|---|---|---|
folders | array | null | yes | Library folders to send, each with the folders inside it; null for every folder that has no access rule. |
formats | ("svg" | "source")[] | yes | svg sends the picture; source sends the .diagram text the picture carries, when it carries one. |
scheme | "published" | "light" | "dark" | yes | A picture that follows the reader’s color scheme is sent as it is, or pinned to light or dark. |
mirrorDeletions | boolean | yes | Remove a file when its diagram is deleted from the library or moved out of what is sent. |
skipConfidential | boolean | yes | Leave out diagrams labelled Confidential. |
StorageStatus
| Field | Type | Required | Description |
|---|---|---|---|
queued | integer | yes | |
delivered | integer | yes | |
dropped | integer | yes | |
droppedLast24h | integer | yes | |
files | integer | yes | Diagrams the destination holds a copy of now. |
lastSuccessAt | integer | null | yes | |
lastErrorAt | integer | null | yes | |
lastError | string | null | yes | What failed last, in our words. Never what the destination answered. |
nextAttemptAt | integer | null | yes | |
failingSince | integer | null | yes |
CreateStorageBody
| Field | Type | Required | Description |
|---|---|---|---|
type | "s3" | "azure_blob" | "gcs" | yes | A bucket. Google Drive is added by signing in with Google. |
target | StorageS3Target | StorageAzureBlobTarget | StorageGcsTarget | yes | |
send | StorageSend | no | |
send.folders | array | null | yes | Library folders to send, each with the folders inside it; null for every folder that has no access rule. |
send.formats | ("svg" | "source")[] | yes | svg sends the picture; source sends the .diagram text the picture carries, when it carries one. |
send.scheme | "published" | "light" | "dark" | yes | A picture that follows the reader’s color scheme is sent as it is, or pinned to light or dark. |
send.mirrorDeletions | boolean | yes | Remove a file when its diagram is deleted from the library or moved out of what is sent. |
send.skipConfidential | boolean | yes | Leave out diagrams labelled Confidential. |
UpdateStorageBody
| Field | Type | Required | Description |
|---|---|---|---|
target | StorageGoogleDriveTarget | StorageS3Target | StorageAzureBlobTarget | StorageGcsTarget | no | |
createFolder | string | no | Google Drive only: make a folder of this name at the top of My Drive and send there. at least 1 character; at most 200 characters. |
send | StorageSend | no | |
send.folders | array | null | yes | Library folders to send, each with the folders inside it; null for every folder that has no access rule. |
send.formats | ("svg" | "source")[] | yes | svg sends the picture; source sends the .diagram text the picture carries, when it carries one. |
send.scheme | "published" | "light" | "dark" | yes | A picture that follows the reader’s color scheme is sent as it is, or pinned to light or dark. |
send.mirrorDeletions | boolean | yes | Remove a file when its diagram is deleted from the library or moved out of what is sent. |
send.skipConfidential | boolean | yes | Leave out diagrams labelled Confidential. |
state | "on" | "paused" | no | Turn sending on (the library is sent at once) or pause it. |
StorageTest
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | yes | |
error | string | null | yes | |
link | string | null | yes | Where to see the sample file, in Drive or the cloud console. |
StorageSync
| Field | Type | Required | Description |
|---|---|---|---|
queued | integer | yes | Diagrams queued to be sent. |
DocumentPlacements
| Field | Type | Required | Description |
|---|---|---|---|
placements | DocumentPlacement[] | yes | |
placements[].id | string | yes | |
placements[].diagramId | string | yes | |
placements[].diagramName | string | null | yes | |
placements[].kind | "slides" | "docs" | yes | slides for a Google Slides deck, docs for a Google Doc. |
placements[].fileId | string | yes | |
placements[].fileName | string | yes | |
placements[].pageId | string | null | yes | The slide, for a deck; null for a Doc. |
placements[].status | "ok" | "failing" | "gone" | yes | ok, failing (the last send failed; lastError says why) or gone (the file or the picture is no longer there). |
placements[].lastError | string | null | yes | |
placements[].lastSentAt | integer | null | yes | |
placements[].current | boolean | yes | Whether the file shows the library's current version. |
placements[].createdAt | integer | yes | |
placements[].link | string | yes | The file in Google. |
DocumentPlacement
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
diagramId | string | yes | |
diagramName | string | null | yes | |
kind | "slides" | "docs" | yes | slides for a Google Slides deck, docs for a Google Doc. |
fileId | string | yes | |
fileName | string | yes | |
pageId | string | null | yes | The slide, for a deck; null for a Doc. |
status | "ok" | "failing" | "gone" | yes | ok, failing (the last send failed; lastError says why) or gone (the file or the picture is no longer there). |
lastError | string | null | yes | |
lastSentAt | integer | null | yes | |
current | boolean | yes | Whether the file shows the library's current version. |
createdAt | integer | yes | |
link | string | yes | The file in Google. |
DocumentDeckPages
| Field | Type | Required | Description |
|---|---|---|---|
slides | object[] | yes | |
slides[].id | string | yes | |
slides[].index | integer | yes | |
width | number | yes | The slide width, in points. |
height | number | yes | The slide height, in points. |
DocumentPlacementAnswer
| Field | Type | Required | Description |
|---|---|---|---|
placement | DocumentPlacement | yes | |
placement.id | string | yes | |
placement.diagramId | string | yes | |
placement.diagramName | string | null | yes | |
placement.kind | "slides" | "docs" | yes | slides for a Google Slides deck, docs for a Google Doc. |
placement.fileId | string | yes | |
placement.fileName | string | yes | |
placement.pageId | string | null | yes | The slide, for a deck; null for a Doc. |
placement.status | "ok" | "failing" | "gone" | yes | ok, failing (the last send failed; lastError says why) or gone (the file or the picture is no longer there). |
placement.lastError | string | null | yes | |
placement.lastSentAt | integer | null | yes | |
placement.current | boolean | yes | Whether the file shows the library's current version. |
placement.createdAt | integer | yes | |
placement.link | string | yes | The file in Google. |
DocumentPlaceBody
| Field | Type | Required | Description |
|---|---|---|---|
diagramId | string | yes | The library diagram. |
kind | "slides" | "docs" | yes | slides for a Google Slides deck, docs for a Google Doc. |
fileId | string | yes | The deck or Doc, as the Google Picker gave it. pattern ^[A-Za-z0-9_-]{10,200}$. |
fileName | string | yes | The file's name, for the portal to show. at least 1 character; at most 300 characters. |
pageId | string | no | The slide to place the picture on. Required for a deck. pattern ^[A-Za-z0-9_.:-]{1,200}$. |
LocalUsageAck
| Field | Type | Required | Description |
|---|---|---|---|
accepted | integer | yes | How many counts were stored. A count sent again replaces the one stored, so a retry never adds twice. minimum 0. |
ignored | integer | yes | How many counts were dropped because their tool or kind is not one this server knows. A 200 means the client may treat the days as sent. minimum 0. |
LocalUsageBody
| Field | Type | Required | Description |
|---|---|---|---|
schema | 1 | yes | The version of this request shape. Always 1. |
client | LocalUsageClient | yes | |
client.name | "plotwork-mcp" | yes | Always plotwork-mcp. |
client.version | string | yes | The package version, in semver form. at most 40 characters; pattern ^\d{1,6}\.\d{1,6}\.\d{1,6}(?:-[0-9A-Za-z.-]{1,32})?(?:\+[0-9A-Za-z.-]{1,32})?$. |
client.os | "linux" | "darwin" | "win32" | "other" | yes | The operating system family. Anything else is other. |
client.node | integer | yes | The Node major version, a whole number. minimum 18; maximum 99. |
days | LocalUsageDay[] | yes | At most 31 finished days. |
days[].day | string | yes | A UTC date from 40 days ago to yesterday. Nothing is accepted for today. pattern ^\d{4}-\d{2}-\d{2}$. |
days[].id | string | yes | A pseudonym for one install for one month: the first 128 bits of an HMAC-SHA-256 of plotwork-usage: and the month, keyed with a secret that never leaves the device. It changes every month, so installs can be counted within a month and cannot be followed from one month to the next. pattern ^[0-9a-f]{32}$. |
days[].counts | LocalUsageCount[] | yes | At most 500 counts. A tool, kind, and outcome may appear once a day. |
days[].counts[].tool | string | yes | The name of the local MCP tool, such as draw_diagram. A name this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9_]{0,63}$. |
days[].counts[].kind | string | yes | The diagram kind the source declared, such as flow, or none for a call with no source or one that names no kind. A kind this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9]{0,31}$. |
days[].counts[].outcome | "ok" | "rejected" | "error" | yes | ok produced its answer, rejected was refused because of its input, error failed inside the tool. |
days[].counts[].count | integer | yes | A whole number from 1 to 1,000,000. minimum 1; maximum 1000000. |
LocalUsageClient
| Field | Type | Required | Description |
|---|---|---|---|
name | "plotwork-mcp" | yes | Always plotwork-mcp. |
version | string | yes | The package version, in semver form. at most 40 characters; pattern ^\d{1,6}\.\d{1,6}\.\d{1,6}(?:-[0-9A-Za-z.-]{1,32})?(?:\+[0-9A-Za-z.-]{1,32})?$. |
os | "linux" | "darwin" | "win32" | "other" | yes | The operating system family. Anything else is other. |
node | integer | yes | The Node major version, a whole number. minimum 18; maximum 99. |
LocalUsageDay
| Field | Type | Required | Description |
|---|---|---|---|
day | string | yes | A UTC date from 40 days ago to yesterday. Nothing is accepted for today. pattern ^\d{4}-\d{2}-\d{2}$. |
id | string | yes | A pseudonym for one install for one month: the first 128 bits of an HMAC-SHA-256 of plotwork-usage: and the month, keyed with a secret that never leaves the device. It changes every month, so installs can be counted within a month and cannot be followed from one month to the next. pattern ^[0-9a-f]{32}$. |
counts | LocalUsageCount[] | yes | At most 500 counts. A tool, kind, and outcome may appear once a day. |
counts[].tool | string | yes | The name of the local MCP tool, such as draw_diagram. A name this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9_]{0,63}$. |
counts[].kind | string | yes | The diagram kind the source declared, such as flow, or none for a call with no source or one that names no kind. A kind this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9]{0,31}$. |
counts[].outcome | "ok" | "rejected" | "error" | yes | ok produced its answer, rejected was refused because of its input, error failed inside the tool. |
counts[].count | integer | yes | A whole number from 1 to 1,000,000. minimum 1; maximum 1000000. |
LocalUsageCount
| Field | Type | Required | Description |
|---|---|---|---|
tool | string | yes | The name of the local MCP tool, such as draw_diagram. A name this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9_]{0,63}$. |
kind | string | yes | The diagram kind the source declared, such as flow, or none for a call with no source or one that names no kind. A kind this server does not know is ignored, not refused, so an older server accepts a newer package. pattern ^[a-z][a-z0-9]{0,31}$. |
outcome | "ok" | "rejected" | "error" | yes | ok produced its answer, rejected was refused because of its input, error failed inside the tool. |
count | integer | yes | A whole number from 1 to 1,000,000. minimum 1; maximum 1000000. |
SyntaxResponse
The diagram language for one scope: the overview, or one kind in full.
| Field | Type | Required | Description |
|---|---|---|---|
answer | string | yes | What this answer is: overview, a topic (import-formats, icon-words), or the kind it describes in full (flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today; later versions add kinds, so expect others). |
howToGetAKind | string | yes | In plain words: what this answer holds and how to get the rest. |
kinds | string[] | yes | Header keywords: the first line names the kind. |
kindDetails | object[] | yes | The overview lists every kind in the order of kinds, with its header, noun, and summary, and a pointer in more. A kind answer holds that kind alone, in full. |
kindDetails[].kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
kindDetails[].header | string | yes | The header line, such as flow "Title". |
kindDetails[].noun | string | yes | What the kind's diagrams are called in a sentence, such as flow or database schema. |
kindDetails[].summary | string | yes | One sentence: what the kind draws. |
kindDetails[].statements | object[] | no | The statements the kind adds to the header. Empty for a kind whose language the shared tables of this reference already describe. |
kindDetails[].statements[].syntax | string | yes | The statement with its parts named, such as: task |
kindDetails[].statements[].meaning | string | yes | What the statement does, and what it needs. |
kindDetails[].statements[].example | string | yes | One line that parses. |
kindDetails[].limits | object[] | no | The quality thresholds the kind adds. Empty for a kind whose limits are in the limits table of this reference. |
kindDetails[].limits[].name | string | yes | What is counted, such as tasks. |
kindDetails[].limits[].value | integer | yes | More than this in one diagram draws a quality warning. |
kindDetails[].limits[].meaning | string | yes | Why the limit exists and what to do past it. |
kindDetails[].more | string | no | Only in the overview, where statements and limits are left out: what a call with this kind returns that the overview does not, and how to ask for it. |
nodeTypes | object[] | no | |
nodeTypes[].type | "person" | "agent" | "client" | "service" | "gateway" | "function" | "database" | "cache" | "queue" | "storage" | "identity" | "secret" | "external" | "step" | "decision" | "terminal" | yes | |
nodeTypes[].shape | "card" | "pill" | yes | How the node is drawn. |
nodeTypes[].isTinted | boolean | yes | True when the card is filled and outlined in its tone, as for decisions. |
nodeTypes[].defaultTone | "neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red" | yes | Color family used when tone= is not set. |
nodeTypes[].defaultIcon | string | null | yes | Icon used when icon= is not set, or null for none. |
nodeTypes[].isDashed | boolean | yes | True when the outline is dashed, as for external systems. |
nodeTypes[].usableAsActor | boolean | yes | True when a sequence diagram actor may use this type. |
tones | ("neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red")[] | no | |
directions | ("auto" | "right" | "down" | "left" | "up")[] | no | Values for direction= on a flow header. |
arrows | object[] | no | |
arrows[].token | string | yes | The arrow as written in source. |
arrows[].line | "solid" | "dashed" | "dotted" | yes | How the line is drawn. |
arrows[].heads | "end" | "both" | "none" | yes | Which ends carry an arrowhead. |
arrows[].meaning | string | yes | What the arrow says, so the right one is chosen. |
blockTypes | ("alt" | "opt" | "loop" | "par")[] | no | Frames a sequence diagram can wrap around messages. |
columnFlags | ("pk" | "fk" | "unique" | "nullable")[] | no | Flags a schema column row may carry. |
schemes | ("light" | "dark")[] | no | The color schemes a picture is drawn in, chosen where it is drawn (a tool's scheme argument), not in the source. |
themes | ("plotwork" | "slate" | "ocean" | "forest" | "sunset" | "mono" | "contrast")[] | no | Colour themes: theme= |
iconSets | ("lucide" | "simple" | "status" | "aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel" | "k8s")[] | no | |
iconCount | integer | no | Number of bundled icons; use search_icons to find names. |
iconProviders | object[] | no | Cloud and platform providers, each an icon set holding the provider (set:cloud) and its products. |
iconProviders[].set | "aws" | "gcp" | "azure" | "alibaba" | "oci" | "ibm" | "cloudflare" | "digitalocean" | "vercel" | yes | Icon set prefix, as in aws:lambda. |
iconProviders[].title | string | yes | The provider the set stands for. |
iconProviders[].iconCount | integer | yes | Icons in the set: the provider itself (set:cloud) and its products. |
iconProviders[].example | string | yes | One icon of the set that is bundled, for example aws:lambda. |
overlay | object | no | A dashed frame around members that may sit in different groups; it owns none of them. |
overlay.options | string[] | yes | Options an overlay statement takes after its name, as in: overlay id "Name" members=a,b type=scale-group. |
overlay.frame | "solid" | "dashed" | "dotted" | yes | How an overlay is always drawn. |
overlay.meaning | string | yes | What an overlay is for, so it is used where a group would be wrong. |
group | object | no | How a flow group looks and what it accepts; its corner tab shows its icon and name. |
group.options | string[] | yes | Options a group statement takes after its name, as in: group id "Name" type=region provider=aws {. |
group.defaultTone | "neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red" | yes | Color family of a group with no type when tone= is not set. |
group.example | object | yes | A complete architecture diagram: typed groups nested by provider, a provider icon on every node, stack marks, and a dotted edge. Copy and edit it. |
group.example.kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
group.example.title | string | yes | |
group.example.source | string | yes | A complete diagram that is checked by the build; copy and edit it. |
group.types | object[] | yes | Every group type. A type gives the group a default icon, tone, frame style, and a shade that deepens with nesting; icon= and tone= override them. |
group.types[].type | "cloud" | "account" | "region" | "zone" | "network" | "subnet" | "public-subnet" | "private-subnet" | "management-subnet" | "isolated-subnet" | "resource-group" | "cluster" | "scale-group" | "service-plan" | "web-tier" | "app-tier" | "data-tier" | "storage-account" | "messaging" | "edge" | "security" | "identity-boundary" | "trust-boundary" | "observability" | "ci-cd" | "environment" | "cloud-boundary" | "on-premises" | "client-side" | "external-systems" | yes | Value for type= on a group. |
group.types[].title | string | yes | What the frame is called in the text description. |
group.types[].meaning | string | yes | What the author means by this type, so the right one is chosen. |
group.types[].tone | "neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red" | yes | Color family the frame and tab get when tone= is not set. |
group.types[].frame | "solid" | "dashed" | "dotted" | yes | How the outline is drawn. |
group.types[].icon | string | yes | Icon in the corner tab when the group has no provider. |
group.types[].providerIcons | object | yes | Icon in the corner tab for each provider whose icon differs from the generic one, keyed by provider set. |
flowLook | object[] | no | Options that shape a flow diagram: spacing=, edges= and fit= on the header, main=on on an edge, and the align statement. |
flowLook[].key | string | yes | The option or statement as written, such as spacing or align. |
flowLook[].scope | "header" | "line" | "statement" | yes | header: on the flow header line. line: on an edge. statement: a line of its own. |
flowLook[].values | string | yes | What it takes. |
flowLook[].meaning | string | yes | What it does. |
flowLook[].example | string | yes | One line that parses. |
lineOptions | object[] | no | Options that animate a line (animate=on makes dashes travel toward the arrowhead) or number the steps of a flow or sequence (numbered=on, start=, and step= on a line). All are off by default. |
lineOptions[].key | string | yes | The option as written, such as animate or step. |
lineOptions[].scope | "header" | "line" | yes | header: on the flow or sequence header line. line: on an edge or a message. |
lineOptions[].values | string | yes | What the option takes. |
lineOptions[].meaning | string | yes | What it does, and the cases where it is refused. |
lineOptions[].example | string | yes | One line that parses. |
labelIcons | object[] | no | Edge labels that name an outcome and get its status icon automatically (a tick for yes, a cross for no, a clock for expired); one per icon in a kind answer, every one in topic icon-words. icon=none on the edge removes it. |
labelIcons[].label | string | yes | An edge label that gets an icon automatically, matched whole and ignoring case. |
labelIcons[].icon | string | yes | The icon the label gets. |
verbIcons | object[] | no | The icons a flow edge label draws when it names a relationship with a verb. icon= on the edge wins, icon=none removes it, and icons=off on the header turns them all off. |
verbIcons[].icon | string | yes | The icon drawn in the label. |
verbIcons[].words | string[] | yes | Phrases that draw it: the whole label, or its first words followed by what is acted on ("reads orders"). |
style | string[] | no | How to make a flow diagram look finished: verbs on arrows, role= on lines that mean something, typed groups, product names. |
autoIcons | object | no | Items with no icon= get the icon their label names for certain (a brand, a cloud product, a common role). icon=none keeps one item plain; icons=off on the header keeps them all plain. |
autoIcons.key | string | yes | The header option: icons. |
autoIcons.values | string | yes | What it takes. |
autoIcons.meaning | string | yes | What it does, and how one item opts out. |
autoIcons.example | string | yes | One header line that parses. |
roleIcons | object[] | no | The plain icons for common roles, drawn on flow and sequence service and external items, C4 elements, layers blocks, mind map topics, and swimlane lanes. The last role word of the label wins. |
roleIcons[].icon | string | yes | The icon drawn. |
roleIcons[].words | string[] | yes | Whole words of a label of three words or fewer that draw it. |
statusIcons | object[] | no | Colored status and outcome icons: a green check, a red X, and so on. |
statusIcons[].ref | string | yes | Value for icon=, such as status:success. |
statusIcons[].tone | "neutral" | "blue" | "violet" | "aqua" | "orange" | "green" | "amber" | "red" | yes | Color the icon is always drawn in, whatever tone its owner has. |
statusIcons[].meaning | string | yes | What the icon says, so the right one is chosen. |
limits | object | no | Bounds and quality thresholds. |
limits.maxSourceLength | integer | yes | |
limits.maxFlowNodes | integer | yes | Quality lint: more nodes than this warns, for a diagram with no groups. |
limits.nodesPerGroup | integer | yes | Each group of a flow diagram raises the node limit by this many. |
limits.maxFlowNodesCeiling | integer | yes | The node limit never rises above this, whatever the groups. |
limits.maxSchemaTables | integer | yes | |
limits.maxSequenceActors | integer | yes | |
limits.maxNumberedSteps | integer | yes | More numbered steps than this in one diagram warns (W200). |
limits.maxStackMarks | integer | yes | Most technology marks a node carries in stack=. |
limits.targetWidth | integer | yes | Column width in px that diagrams are checked against. |
editing | object | no | How to edit an existing Plotwork SVG: read it back with read_diagram, change the source, draw it, and save or publish it again. |
editing.steps | string[] | yes | In order: how to change a diagram that already exists as a Plotwork SVG, a hosted link or a file in the repository. |
editing.embedSource | string | yes | When to set embedSource true on draw_diagram or render_diagram, that publish_diagram embeds the source unless it is false, and what it means for who can read the source. |
diagnosticCodes | object[] | no | |
diagnosticCodes[].name | string | yes | Identifier of the code. |
diagnosticCodes[].code | string | yes | The code to branch on, such as E120. |
diagnosticCodes[].severity | "error" | "warning" | yes | |
examples | object[] | yes | Tested examples: the overview holds the ones for the kinds the shared tables describe in full, a kind answer holds its own. |
examples[].kind | string | yes | A diagram kind: flow, sequence, schema, git, gantt, class, state, timeline, journey, mindmap, treemap, pie, quadrant, layers, c4, matrix, sankey, xychart, tree, swimlane, requirement, block, packet, kanban, radar, usecase, venn, fishbone, or wardley today. Later versions add kinds, so expect others. |
examples[].title | string | yes | |
examples[].source | string | yes | A complete diagram that is checked by the build; copy and edit it. |
importFormats | object[] | no | Only for topic import-formats: every format import_source reads, a line each. |
importFormats[].format | string | yes | The format, as import_source takes it. |
importFormats[].reads | string | yes | What it reads. |
importFormats[].draws | string | yes | The diagram it draws. |
importFormats[].options | string | yes | The options it takes. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Tool reference | The same operations as callable tools |
| Language reference | What the diagram source may contain |