How it works
OneAPI is built from four pieces. Your company connects services, designs artifacts, links each artifact's operations to the services with flows, and OneAPI serves the result as your API.
The four pieces
The systems your company uses: e-conomic, HubSpot, Shopify, Slack… Pick one from OneAPI's gallery, or import any service that publishes an OpenAPI description. An admin signs in to it once for the whole company.
The records your company works with, designed by you: Invoice with its InvoiceLines, Customer, Order. Each has typed fields (text, number, date, choice…) and links to other artifacts. Start from scratch or from a template in the artifact library.
What each operation (create, read, update, delete, list) actually does: a short flowchart of calls on the
services, with decisions ("is the customer there? if not, create them") and a mapping table per call
(customer_name → recipient.name).
Each published artifact becomes a REST endpoint, /api/invoice/, documented as OpenAPI. People and
systems call it with a OneAPI key and get exactly the permissions they were given.
What happens on one call
Say your webshop sends POST /api/invoice/ with a new invoice. OneAPI goes through five steps, and any
of them can stop the call with a clear answer:
- Who is calling?The key in the
Authorizationheader is looked up: the webshop's API key.Unknown, expired or revoked: 401 - Allowed?Does the webshop have WRITE on Invoice?No permission at all: 404. READ only: 403
- Valid?The body is checked against the Invoice fields: required fields, types, choices.Field errors: 400, per field
- Run the flowThe create flow calls e-conomic: find the customer, create them if needed, create the invoice.Service down: retried once, then 503
- Answer and logThe new invoice comes back in your shape, with a OneAPI id. The call goes in the call log.
OneAPI keeps no copy of your data
The invoice lives in e-conomic, not in OneAPI. What OneAPI keeps is the link table: for each OneAPI id,
the records at the services behind it. When someone reads /api/invoice/17, OneAPI looks up 17, fetches
draft invoice 2041 from e-conomic and returns it in your shape.
| OneAPI id | Artifact | Behind it |
|---|---|---|
17 | Invoice | economic.invoice → 2041 · economic.customer → 118 |
18 | InvoiceLine (part of 17) | line 1 of e-conomic draft 2041 |
19 | InvoiceLine (part of 17) | line 2 of e-conomic draft 2041 |
One OneAPI record can point to records in several services, for instance an invoice in e-conomic and a deal in your CRM. Callers only ever see OneAPI's ids and your fields, never the vendor's, which is what lets you change what sits behind them.
Changing things safely
Artifacts and flows are edited as a draft. Nothing reaches the API until you publish, and publishing goes through two checks:
- The flows must be sound. Every required input is mapped, types fit and formulas work. Saved test cases (real runs you saved on purpose) are replayed against the changed flow without calling the services.
- Callers must not break. An additive change, like a new optional field, goes live in place. A breaking
change, like a removed or retyped field, becomes a new version at
/api/v2/invoice/that runs next to the old one, so callers move when they're ready.
Built to fail safely
- When a service is down or slow, OneAPI tries once more after 5 seconds and then answers
503naming the service. A write is only retried when it can't have arrived, so nothing is created twice. - When a service rejects the sign-in, the service is marked "sign-in needed" and admins are emailed.
- OneAPI only ever calls the addresses a service lists, over https. Nothing a caller sends can redirect a call or replace the sign-in.