Beta.
pb.bridge wraps the Bridge guide
REST surface (/v1/bridges). It is live and tested; expect it to grow.pb.bridge records version-stamped matches between an external API’s types and your
ontology’s types. You open a persistent mapping session, ingest an OpenAPI spec,
record a match per type (with a relation and your reasoning), then analyze
coverage and drift. See the concept guide
for the vocabulary; this page is the SDK surface.
The fluent session
pb.bridge.open returns a session whose methods read like the judgments you are
making.
Session methods
| Method | What it does |
|---|---|
mapping.id | The mapping_id this session operates on. |
mapping.ingestOpenAPI(spec, opts?) | Ingest a parsed OpenAPI 3.x document. |
mapping.ingestSource(input) | Ingest a foreign IR by explicit input. |
mapping.type(path) | Begin a type mapping from a source path. Chain .mapsTo(toType, { relation }), or .markDisjoint({ reasoning }) to record it as deliberately out of scope. |
mapping.property(path, fromProperty) | Begin a property mapping. Chain .mapsTo(toProperty, { role }). |
mapping.reviewProposals(input) | Review model-proposed matches without mutating the mapping. |
mapping.analyze(input?) | Coverage, property coverage, drift, and a healthy roll-up. |
mapping.inspect() | Read the current mapping state. |
One-shot mapping
When you already have the matches in hand,pb.bridge.map runs open, ingest,
type mappings, properties, and analyze in a single call.
Granular methods
The session is sugar over these. Reach for them when you want to drive the steps yourself, or resume a mapping by id.| Method | What it does |
|---|---|
pb.bridge.tools() | List the IR tools and their REST routes. |
pb.bridge.open(input) | Open a session and return a fluent BridgeSession. |
pb.bridge.get(mappingId) | Resume an existing mapping as a session. |
pb.bridge.map(input) | Run a whole mapping in one call. |
pb.bridge.openMapping(input) | Open a session, returning the raw result. |
pb.bridge.ingestSource(mappingId, input) | Ingest a spec into a mapping. |
pb.bridge.mapType(mappingId, input) | Map one type to another (or record disjoint). |
pb.bridge.unmapType(mappingId, input) | Remove a type mapping. |
pb.bridge.mapProperty(mappingId, input) | Map a property pair. |
pb.bridge.reviewProposals(mappingId, input) | Review model-proposed matches. |
pb.bridge.inspect(mappingId) | Read mapping state. |
pb.bridge.analyze(mappingId, input?) | Coverage and drift. |
pb.bridge.dispatch(tool, args) | Escape hatch: call any IR tool by name. |
IR tool errors come back inside the result as
isError: true, not as a thrown
HTTP error. Check the result rather than relying on a catch.Next
IR mapping guide
The vocabulary, a worked mapping, and drift detection.
Decision quality
Verify a region of the graph is fit to act on.