{"openapi":"3.1.0","info":{"title":"Viaduct API","version":"1.0.0","description":"Read and write C4 models, their documentation, contracts and change sets.\n\nAuthenticate with a personal access token issued in Settings → MCP access: `Authorization: Bearer c4pat_…`. A token carries scopes — `read` covers every GET, `write` is needed for anything that changes something, and a token without the scope is answered 403 `insufficient_scope`.\n\nBudget: 600 requests per minute per token. Over it, 429 with `Retry-After`.\n\nCollections that can grow accept `limit` and `cursor`; a response that has more carries `next_cursor`. Omitting both returns the whole list.","contact":{"name":"Viaduct support","email":"support@quietgridlabs.com"}},"servers":[{"url":"https://c4.quietgridlabs.com/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A personal access token, `c4pat_…`."}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}},"Project":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"folder_id":{"type":["string","null"]},"version_name_pattern":{"type":["string","null"]},"declared_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"owner_id":{"type":"string"},"owner_username":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"access":{"type":"string","enum":["owner","edit","view"],"description":"What this token may do with the project."},"mine":{"type":"boolean"}}},"ProjectWithModel":{"allOf":[{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"folder_id":{"type":["string","null"]},"version_name_pattern":{"type":["string","null"]},"declared_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"owner_id":{"type":"string"},"owner_username":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"access":{"type":"string","enum":["owner","edit","view"],"description":"What this token may do with the project."},"mine":{"type":"boolean"}}},{"type":"object","properties":{"model":{"type":"object","description":"The whole model, as four collections plus what hangs off them.","properties":{"systems":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"containers":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"components":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"codeElements":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"dataFlows":{"type":"array","items":{"type":"object"}},"domains":{"type":"array","items":{"type":"object"}},"viewLevel":{"type":"string","enum":["system","container","component","code"]},"schemaVersion":{"type":"integer"}}}}}]},"Model":{"type":"object","description":"The whole model, as four collections plus what hangs off them.","properties":{"systems":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"containers":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"components":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"codeElements":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"dataFlows":{"type":"array","items":{"type":"object"}},"domains":{"type":"array","items":{"type":"object"}},"viewLevel":{"type":"string","enum":["system","container","component","code"]},"schemaVersion":{"type":"integer"}}},"Element":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"Connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"Access":{"type":"object","required":["access","projectId","canEdit"],"properties":{"access":{"type":"string","enum":["owner","edit","view"]},"projectId":{"type":"string"},"canEdit":{"type":"boolean"}}},"Mutation":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}},"Doc":{"type":"object","description":"A markdown document attached to one element.","required":["id","title"],"properties":{"id":{"type":"string"},"project_id":{"type":"string"},"owner_type":{"type":"string","enum":["system","container","component","code"]},"owner_id":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"created_by_name":{"type":["string","null"]},"updated_by":{"type":["string","null"]},"updated_by_name":{"type":["string","null"]}}},"ChangeSet":{"type":"object","description":"A piece of work pinned to one version of the model.","required":["id","intent","status"],"properties":{"id":{"type":"string"},"project_id":{"type":"string"},"revision_id":{"type":"string","description":"The pinned snapshot it is implemented against."},"intent":{"type":"string"},"status":{"type":"string","enum":["draft","ready","implementing","update_documentation","done"],"description":"Derived from reported evidence, not set by hand except where it must be."},"scope":{"type":"array","items":{"type":"string"},"description":"Element ids this work touches."},"constraints":{"type":"object","additionalProperties":true},"base_code_ref":{"type":["string","null"]},"update_documentation":{"type":"boolean"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"position":{"type":"integer"},"proven":{"type":"boolean"}}}},"progress":{"type":"array","description":"Append-only: what was finished, and what proves it.","items":{"type":"object","properties":{"id":{"type":"string"},"summary":{"type":"string"},"criterion_id":{"type":["string","null"]},"commit_ref":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}}},"created_by":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"description":"Empty means every event."},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastDeliveryAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["integer","null"],"description":"HTTP status of the last attempt."},"consecutiveFailures":{"type":"integer"},"disabledReason":{"type":["string","null"]}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string"},"attempt":{"type":"integer"},"statusCode":{"type":["integer","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":["string","null"],"format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","description":"Set while a retry is still owed; null once the attempt is finished either way."}}}}},"paths":{"/projects":{"get":{"summary":"List the projects this token can see","description":"The model is not included here — fetch a project to get it.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Page size. Omit for the whole list."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque cursor from a previous response’s `next_cursor`."}],"responses":{"200":{"description":"The projects.","content":{"application/json":{"schema":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"folder_id":{"type":["string","null"]},"version_name_pattern":{"type":["string","null"]},"declared_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"owner_id":{"type":"string"},"owner_username":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"access":{"type":"string","enum":["owner","edit","view"],"description":"What this token may do with the project."},"mine":{"type":"boolean"}}}},"next_cursor":{"type":["string","null"],"description":"The next page, or null on the last one. Absent when the list was returned whole."}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}}},"post":{"summary":"Create a project","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"model":{"type":"object","description":"Start from an existing model instead of an empty one.","properties":{"systems":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"containers":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"components":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"codeElements":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"dataFlows":{"type":"array","items":{"type":"object"}},"domains":{"type":"array","items":{"type":"object"}},"viewLevel":{"type":"string","enum":["system","container","component","code"]},"schemaVersion":{"type":"integer"}}}}}}}},"responses":{"201":{"description":"The project.","content":{"application/json":{"schema":{"type":"object","required":["project"],"properties":{"project":{"allOf":[{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"folder_id":{"type":["string","null"]},"version_name_pattern":{"type":["string","null"]},"declared_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"owner_id":{"type":"string"},"owner_username":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"access":{"type":"string","enum":["owner","edit","view"],"description":"What this token may do with the project."},"mine":{"type":"boolean"}}},{"type":"object","properties":{"model":{"type":"object","description":"The whole model, as four collections plus what hangs off them.","properties":{"systems":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"containers":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"components":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"codeElements":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"dataFlows":{"type":"array","items":{"type":"object"}},"domains":{"type":"array","items":{"type":"object"}},"viewLevel":{"type":"string","enum":["system","container","component","code"]},"schemaVersion":{"type":"integer"}}}}}]}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}}}},"/projects/{id}":{"get":{"summary":"One project, with its whole model","responses":{"200":{"description":"The project and its model.","content":{"application/json":{"schema":{"type":"object","required":["project"],"properties":{"project":{"allOf":[{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"folder_id":{"type":["string","null"]},"version_name_pattern":{"type":["string","null"]},"declared_tags":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"owner_id":{"type":"string"},"owner_username":{"type":["string","null"]},"owner_name":{"type":["string","null"]},"access":{"type":"string","enum":["owner","edit","view"],"description":"What this token may do with the project."},"mine":{"type":"boolean"}}},{"type":"object","properties":{"model":{"type":"object","description":"The whole model, as four collections plus what hangs off them.","properties":{"systems":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"containers":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"components":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"codeElements":{"type":"array","items":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}}},"dataFlows":{"type":"array","items":{"type":"object"}},"domains":{"type":"array","items":{"type":"object"}},"viewLevel":{"type":"string","enum":["system","container","component","code"]},"schemaVersion":{"type":"integer"}}}}}]}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/docs":{"get":{"summary":"Documentation attached to the model","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ownerType","in":"query","schema":{"type":"string","enum":["system","container","component","code"]},"description":"With `ownerId`, narrows the list to one element."},{"name":"ownerId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The documents.","content":{"application/json":{"schema":{"type":"object","required":["docs"],"properties":{"docs":{"type":"array","items":{"type":"object","description":"A markdown document attached to one element.","required":["id","title"],"properties":{"id":{"type":"string"},"project_id":{"type":"string"},"owner_type":{"type":"string","enum":["system","container","component","code"]},"owner_id":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"created_by_name":{"type":["string","null"]},"updated_by":{"type":["string","null"]},"updated_by_name":{"type":["string","null"]}}}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}}},"post":{"summary":"Write a document","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ownerType","ownerId","title"],"properties":{"ownerType":{"type":"string","enum":["system","container","component","code"]},"ownerId":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"}}}}}},"responses":{"200":{"description":"The document.","content":{"application/json":{"schema":{"type":"object","required":["doc"],"properties":{"doc":{"type":"object","description":"A markdown document attached to one element.","required":["id","title"],"properties":{"id":{"type":"string"},"project_id":{"type":"string"},"owner_type":{"type":"string","enum":["system","container","component","code"]},"owner_id":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"created_by_name":{"type":["string","null"]},"updated_by":{"type":["string","null"]},"updated_by_name":{"type":["string","null"]}}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/change-sets":{"get":{"summary":"Change sets on the project","responses":{"200":{"description":"The change sets, newest first.","content":{"application/json":{"schema":{"type":"object","required":["changeSets"],"properties":{"changeSets":{"type":"array","items":{"type":"object","description":"A piece of work pinned to one version of the model.","required":["id","intent","status"],"properties":{"id":{"type":"string"},"project_id":{"type":"string"},"revision_id":{"type":"string","description":"The pinned snapshot it is implemented against."},"intent":{"type":"string"},"status":{"type":"string","enum":["draft","ready","implementing","update_documentation","done"],"description":"Derived from reported evidence, not set by hand except where it must be."},"scope":{"type":"array","items":{"type":"string"},"description":"Element ids this work touches."},"constraints":{"type":"object","additionalProperties":true},"base_code_ref":{"type":["string","null"]},"update_documentation":{"type":"boolean"},"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"position":{"type":"integer"},"proven":{"type":"boolean"}}}},"progress":{"type":"array","description":"Append-only: what was finished, and what proves it.","items":{"type":"object","properties":{"id":{"type":"string"},"summary":{"type":"string"},"criterion_id":{"type":["string","null"]},"commit_ref":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}}},"created_by":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/webhooks":{"get":{"summary":"Endpoints this project posts its changes to","description":"Owner only. The signing secret is never returned — it is shown once, when the webhook is created.","responses":{"200":{"description":"The webhooks, and every event type that exists.","content":{"application/json":{"schema":{"type":"object","required":["webhooks","eventTypes"],"properties":{"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"description":"Empty means every event."},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastDeliveryAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["integer","null"],"description":"HTTP status of the last attempt."},"consecutiveFailures":{"type":"integer"},"disabledReason":{"type":["string","null"]}}}},"eventTypes":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"summary":"Add an endpoint","description":"The URL must be https and resolve to a public address; a private one is refused here and again before every delivery.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"description":"Omit or leave empty to receive everything."}}}}}},"responses":{"201":{"description":"The webhook, with its secret — shown this once.","content":{"application/json":{"schema":{"type":"object","required":["webhook","secret"],"properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"description":"Empty means every event."},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastDeliveryAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["integer","null"],"description":"HTTP status of the last attempt."},"consecutiveFailures":{"type":"integer"},"disabledReason":{"type":["string","null"]}}},"secret":{"type":"string","description":"Sign with this. Stored encrypted; never returned again."},"verify":{"type":"string","description":"The verification, as code you can paste."}}}}}},"400":{"description":"The URL is not one this server will call.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"},"hint":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/webhooks/{webhookId}":{"patch":{"summary":"Switch an endpoint on or off","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"description":"Empty means every event."},"enabled":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastDeliveryAt":{"type":["string","null"],"format":"date-time"},"lastStatus":{"type":["integer","null"],"description":"HTTP status of the last attempt."},"consecutiveFailures":{"type":"integer"},"disabledReason":{"type":["string","null"]}}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Remove an endpoint","responses":{"200":{"description":"Removed, with its delivery log.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/webhooks/{webhookId}/deliveries":{"get":{"summary":"What this endpoint was sent, and how it answered","responses":{"200":{"description":"The last deliveries, newest first.","content":{"application/json":{"schema":{"type":"object","required":["deliveries"],"properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string"},"attempt":{"type":"integer"},"statusCode":{"type":["integer","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":["string","null"],"format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time","description":"Set while a retry is still owed; null once the attempt is finished either way."}}}}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/access":{"get":{"summary":"What this token may do with the project","responses":{"200":{"description":"The access level.","content":{"application/json":{"schema":{"type":"object","required":["access","projectId","canEdit"],"properties":{"access":{"type":"string","enum":["owner","edit","view"]},"projectId":{"type":"string"},"canEdit":{"type":"boolean"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/elements":{"post":{"summary":"Create an element on any level","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["kind","name"],"properties":{"kind":{"type":"string","enum":["system","container","component","code"],"description":"Which level the element belongs to."},"name":{"type":"string"},"parentId":{"type":"string","description":"Required below the system level: the element this one lives in."},"description":{"type":"string"},"technology":{"type":"string"},"external":{"type":"boolean"},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}}}}}}},"responses":{"200":{"description":"The element that already existed under that name.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"201":{"description":"The element, as created.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/projects/{id}/elements/{ownerType}/{ownerId}":{"patch":{"summary":"Update an element","requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Any subset of the element’s own fields.","properties":{"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string"},"external":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}}}}}}},"responses":{"200":{"description":"The element, updated.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ownerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete an element","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"ownerType","in":"path","required":true,"schema":{"type":"string"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string"}},{"name":"cascade","in":"query","schema":{"type":"boolean"},"description":"Delete its children too. Without it, an element with children is refused."}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}}}},"/projects/{id}/connections":{"post":{"summary":"Create or update a connection","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["sourceId","targetId"],"properties":{"sourceId":{"type":"string"},"targetId":{"type":"string"},"sourceType":{"type":"string","enum":["system","container","component","code"]},"label":{"type":"string"},"technology":{"type":"string"},"bidirectional":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The connection.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"delete":{"summary":"Delete a connection","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["sourceId","targetId"],"properties":{"sourceId":{"type":"string"},"targetId":{"type":"string"},"sourceType":{"type":"string"}}}}}},"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"created":{"type":"boolean","description":"True when the call made something new."},"access":{"type":"string","enum":["owner","edit","view"]},"canEdit":{"type":"boolean"},"entity":{"type":"object","description":"A system, container, component or code element. The same shape on every level — which level it belongs to is decided by the collection it is in.","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"technology":{"type":"string","description":"Free text; drives the colour and the logo."},"url":{"type":"string","description":"Legacy single link; `links` supersedes it."},"links":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}}}},"type":{"type":"string","description":"Level-specific kind, e.g. `service`, `datastore`, `person`."},"external":{"type":"boolean","description":"True when the element is somebody else’s."},"parentId":{"type":"string","description":"The container or system it lives in."},"tags":{"type":"array","items":{"type":"string"}},"groupName":{"type":["string","null"]},"domainId":{"type":["string","null"]},"position":{"type":"object","description":"Where the element sits on its level’s canvas.","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"connections":{"type":"array","items":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}}}}},"connection":{"type":"object","description":"An arrow leaving this element. Connections live on their source.","properties":{"id":{"type":"string"},"targetId":{"type":"string","description":"The element it points at."},"label":{"type":["string","null"]},"technology":{"type":["string","null"],"description":"What the relationship runs over."},"protocol":{"type":["string","null"]},"bidirectional":{"type":"boolean"}}},"removed":{"type":"boolean"},"ownerType":{"type":"string"},"ownerId":{"type":"string"},"sourceType":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}}}}}},"401":{"description":"No valid credentials.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"403":{"description":"Authenticated, but not allowed — wrong scope or no access.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"404":{"description":"No such resource, or not visible to this account.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}},"429":{"description":"Over the per-token budget.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"message":{"type":"string","description":"One sentence for a human."}}}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}