Skip to content

Wire API ​

The entity-plane HTTP surface — served by the node host (hypha-http), aggregated by the hub (hypha-hub). One canonical spelling per route: hypha-node-api's HttpEntityApi and the hub speak the same paths. (The P3-era alias spellings — /api/entities/{id}/export, /api/entities/import, /api/index, /api/outbox — are gone.)

Node surface ​

RouteVerbPurpose
/api/healthGETliveness probe (pre-auth)
/api/pairPOSTredeem a pairing code → bearer token
/api/auth/login /api/auth/logoutPOSTauth-cookie exchange
/api/userGETOS user info for pickers
/api/nodeGET/PATCHnode descriptor / rename
/api/fs?path=GETdirect subdirectories of an absolute path
/api/eventsGETSSE event feed
/api/entitiesGET/POSTlist (?kind=) / create entity
/api/entities/{id}GET/DELETEentity doc / entity.delete
/api/entities/{id}/opsPOSTsubmit op {kind, payload}
/api/entities/{id}/snapshotGETexport snapshot bytes
/api/entities/snapshotPOSTimport snapshot (body.kind picks the plane)
/api/entity-indexGET{"index": [{node, entities}]} — one row, this node
/api/pending-opsGET{"ops": [...]} — always empty on a bare node (the outbox is hub-side)
/api/push/vapidGET{publicKey} (501 without a push store)
/api/push/subscribePOST/DELETEpush subscription add/remove

Hub surface ​

Same /api/entities* shape, aggregated: merged index from all HYPHA_NODES nodes, ops routed to the owner (durable outbox when offline), plus hub-owned routes:

RoutePurpose
/api/entity-indexmerged per-node entity buckets
/api/pending-opsoutbox depth — queued + dead-letter ops
/api/eventsSSE bridge to the upstream node
/api/entities/{id}/streamper-entity live stream (kind policy's stream_path, owning node)
/api/push/*hub-owned subscription store (fans out to every node)
/api/{*rest}passthrough to the upstream node for everything else

Not on the substrate: /api/config* — node config is integration-owned (a composing integration mounts its own surface); EntityApi::get_config/set_config are doc-hidden for that reason.

Client ​

hypha_node_api::HttpEntityApi (ureq) implements EntityApi; FakeEntityApi is the in-memory test double. Wire DTOs: EntityDto, EntityOp, EntityIndexDto, PendingOpDto, NodeInfoDto, NodeStatusDto, PushSubscriptionDto — see hypha-node-api/src/dto.rs and the generated rustdoc under /hypha/api/.

MIT licensed — part of the 9aia GAIA stack.