{"openapi":"3.1.0","info":{"title":"Caplo Public REST API","version":"1.0.0","description":"Workspace-scoped CRUD for Caplo repository entities and relations. Authenticate with a Caplo API key (`Authorization: Bearer caplo_sk_...`)."},"servers":[{"url":"https://app.caplo.ai/api/v1"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"caplo_sk","description":"Workspace API key minted in Caplo Settings → API keys."}},"schemas":{"Entity":{"type":"object","required":["id","type","name","properties","approved","origin","created_at","updated_at","creator_id","updater_id","deleted_at","deleted_by"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["stakeholder","driver","assessment","goal","outcome","principle","requirement","constraint","meaning","value","courseOfAction","capability","resource","valueStream","businessService","businessActor","businessRole","businessCollaboration","businessInterface","process","businessFunction","businessInteraction","businessEvent","contract","businessObject","representation","product","applicationService","applicationFunction","applicationInterface","applicationInteraction","applicationProcess","applicationEvent","application","applicationCollaboration","dataObject","technologyService","technologyEvent","technologyFunction","technologyInterface","technologyInteraction","technologyProcess","systemSoftware","device","technologyCollaboration","path","itInfrastructure","communicationNetwork","artifact","equipment","facility","distributionNetwork","material","plateau","deliverable","workPackage","implementationEvent","gap","location","vendor"]},"name":{"type":"string"},"properties":{"type":"object","additionalProperties":true,"nullable":true},"approved":{"type":"boolean"},"origin":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true},"creator_id":{"type":"string","format":"uuid","nullable":true},"updater_id":{"type":"string","format":"uuid","nullable":true},"deleted_at":{"type":"string","format":"date-time","nullable":true},"deleted_by":{"type":"string","format":"uuid","nullable":true}}},"Relation":{"type":"object","required":["id","type","name","from","to","from_type","to_type","properties","approved","origin","created_at","updated_at","creator_id","updater_id","deleted_at","deleted_by"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["association","child-of","realizes","accessed-by","contains","triggers","flows"]},"name":{"type":"string"},"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"},"from_type":{"type":"string"},"to_type":{"type":"string"},"properties":{"type":"object","additionalProperties":true,"nullable":true},"approved":{"type":"boolean"},"origin":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true},"creator_id":{"type":"string","format":"uuid","nullable":true},"updater_id":{"type":"string","format":"uuid","nullable":true},"deleted_at":{"type":"string","format":"date-time","nullable":true},"deleted_by":{"type":"string","format":"uuid","nullable":true}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{}}}}}}}},"security":[{"ApiKeyAuth":[]}],"paths":{"/entities":{"get":{"summary":"List entities","operationId":"listEntities","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["stakeholder","driver","assessment","goal","outcome","principle","requirement","constraint","meaning","value","courseOfAction","capability","resource","valueStream","businessService","businessActor","businessRole","businessCollaboration","businessInterface","process","businessFunction","businessInteraction","businessEvent","contract","businessObject","representation","product","applicationService","applicationFunction","applicationInterface","applicationInteraction","applicationProcess","applicationEvent","application","applicationCollaboration","dataObject","technologyService","technologyEvent","technologyFunction","technologyInterface","technologyInteraction","technologyProcess","systemSoftware","device","technologyCollaboration","path","itInfrastructure","communicationNetwork","artifact","equipment","facility","distributionNetwork","material","plateau","deliverable","workPackage","implementationEvent","gap","location","vendor"]}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"approved","in":"query","schema":{"type":"boolean"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Entity page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Entity"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create entity","operationId":"createEntity","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","name"],"properties":{"type":{"type":"string","enum":["stakeholder","driver","assessment","goal","outcome","principle","requirement","constraint","meaning","value","courseOfAction","capability","resource","valueStream","businessService","businessActor","businessRole","businessCollaboration","businessInterface","process","businessFunction","businessInteraction","businessEvent","contract","businessObject","representation","product","applicationService","applicationFunction","applicationInterface","applicationInteraction","applicationProcess","applicationEvent","application","applicationCollaboration","dataObject","technologyService","technologyEvent","technologyFunction","technologyInterface","technologyInteraction","technologyProcess","systemSoftware","device","technologyCollaboration","path","itInfrastructure","communicationNetwork","artifact","equipment","facility","distributionNetwork","material","plateau","deliverable","workPackage","implementationEvent","gap","location","vendor"]},"name":{"type":"string"},"properties":{"type":"object","additionalProperties":true},"approved":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Created entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/entities/{id}":{"get":{"summary":"Get entity","operationId":"getEntity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update entity","operationId":"updateEntity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"properties":{"type":"object","additionalProperties":true},"approved":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Entity"}}}}}},"delete":{"summary":"Soft-delete entity","operationId":"deleteEntity","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/relations":{"get":{"summary":"List relations","operationId":"listRelations","parameters":[{"name":"approved","in":"query","schema":{"type":"boolean"}},{"name":"from","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"to","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","schema":{"type":"string","enum":["association","child-of","realizes","accessed-by","contains","triggers","flows"]}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Relation page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Relation"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"summary":"Create relation","operationId":"createRelation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to","type","name"],"properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["association","child-of","realizes","accessed-by","contains","triggers","flows"]},"name":{"type":"string"},"properties":{"type":"object","additionalProperties":true}}}}}},"responses":{"201":{"description":"Created relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relation"}}}}}}},"/relations/{id}":{"get":{"summary":"Get relation","operationId":"getRelation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relation"}}}}}},"patch":{"summary":"Update relation","operationId":"updateRelation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"properties":{"type":"object","additionalProperties":true},"approved":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated relation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Relation"}}}}}},"delete":{"summary":"Soft-delete relation","operationId":"deleteRelation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"}}}},"/entity-types":{"get":{"summary":"List enabled entity types and property schemas","operationId":"listEntityTypes","responses":{"200":{"description":"Entity types with property definitions"}}}},"/entity-types/{type}/properties":{"get":{"summary":"Get property schema for one entity type","operationId":"getEntityTypeProperties","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["stakeholder","driver","assessment","goal","outcome","principle","requirement","constraint","meaning","value","courseOfAction","capability","resource","valueStream","businessService","businessActor","businessRole","businessCollaboration","businessInterface","process","businessFunction","businessInteraction","businessEvent","contract","businessObject","representation","product","applicationService","applicationFunction","applicationInterface","applicationInteraction","applicationProcess","applicationEvent","application","applicationCollaboration","dataObject","technologyService","technologyEvent","technologyFunction","technologyInterface","technologyInteraction","technologyProcess","systemSoftware","device","technologyCollaboration","path","itInfrastructure","communicationNetwork","artifact","equipment","facility","distributionNetwork","material","plateau","deliverable","workPackage","implementationEvent","gap","location","vendor"]}}],"responses":{"200":{"description":"Property definitions"}}}},"/relation-types":{"get":{"summary":"List relation types and property schemas","operationId":"listRelationTypes","responses":{"200":{"description":"Relation types with property definitions"}}}},"/relation-types/{type}/properties":{"get":{"summary":"Get property schema for one relation type","operationId":"getRelationTypeProperties","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["association","child-of","realizes","accessed-by","contains","triggers","flows"]}}],"responses":{"200":{"description":"Property definitions"}}}}}}