SODEA

Fountain Integration API

The Fountain Integration API defines the interaction contract between the Fountain IDE and the Morpheus runtime. It is not a separate backend, but a well-defined set of calls and patterns used by Fountain to fetch, edit, execute, and visualize semantic objects hosted by Morpheus.

This API ensures consistency, simplifies integration, and enables the development of custom tools and interfaces that interact with the SODEA ecosystem.


Overview

OperationMethodEndpointDescription
List ObjectsGET/objectsRetrieve a list of available semantic objects.
Fetch ObjectGET/objects/:idRetrieve a specific object for inspection or editing.
Save ObjectPUT/objects/:idSave modifications to a semantic object.
Execute HookPOST/execute/:id/:hookNameExecute a named hook (e.g., onTick, onEvent).
Get Template ListGET/templatesRetrieve available object templates.
Create Object from TemplatePOST/templates/:idCreate a new object using a specified template.

Example Usage

Retrieve All Objects

GET /objects

Response:

[
  "urn:demo:counter",
  "urn:system:logger",
  ...
]

Execute onEvent Hook

POST /execute/urn:demo:counter/onEvent
Content-Type: application/json

{
  "eventType": "reset_counter",
  "payload": {}
}

Response:

{
  "status": "reset",
  "counter": 0
}

Integration Behavior in Fountain

Fountain leverages this API to:

  • Populate the Object Browser and Editor.
  • Track object relationships via @id and nested links.
  • Display live execution results and logs in the console view.
  • Support real-time demo scenarios (e.g., ticking counters, reacting to events).
  • Persist user changes to semantic objects.

Implementation Note

  • These endpoints are implemented in the Morpheus backend.
  • Fountain assumes compatibility with this interface.
  • Custom runtimes may implement this API contract to support Fountain or similar IDEs.