BridgeStick

Docs

Data API reference

Your own tools read the tables of your sources — or a destination's copy, to spare the source — through REST and WebSocket, with API keys you scope, expire and revoke. Every value arrives exactly as the source holds it.

Base URL and keys

Every route lives under https://api.bridgestick.com/api/v1/data and takes the key in the Authorization header (Bearer bsk_…). Make a key in API Keys → New API key: it is shown once, stored only as a hash, and reads only what it is granted — all your sources, the sources you tick, or the tables of the connections you tick — and only sources you have exposed (Expose via data API).

  • A key can expire, and can be revoked at any time; its last use is shown.
  • A connection's grant opens the connection's routes alone — its tables, at the source or at a destination — never the source's other tables.
  • A key reads its own space only: a slug names one of your sources or connections.
  • A key learns a source's name, type and health — never its host, its user or an error that names your network.

Endpoints

The data API's routes
PathMethodWhat it answers
/sourcesGETThe sources the key may read
/sources/{slug}/tablesGETTheir tables and fields
/sources/{slug}/tables/rowsGETA page of rows: ?table=&fields=&cursor=&limit= (limit up to 10,000)
/sources/{slug}/tables/previewGETA small sample: ?table=&limit= (up to 200), served from a cache (refresh=true reads again)
/sources/{slug}/healthGETWhether the source answers
/connectionsGETThe connections the key may read, with their state
/connections/{slug}GETOne connection
/connections/{slug}/tablesGETThe tables the connection syncs
/connections/{slug}/tables/rowsGETA page of rows of a synced table — at the source, or as a destination holds it (below)

A table's name is always the ?table= parameter, never a path segment: SAP names such as /CEEIS/RU_DEBTS pass as they are.

A page of rows
curl -H "Authorization: Bearer bsk_…" "https://api.bridgestick.com/api/v1/data/sources/sap-prod/tables/rows?table=MARA&fields=MATNR,MTART&limit=1000"

Paging

A page carries rows, row_count and next_cursor: pass it back as cursor for the next page; null means the last one. A table with a key is read in key order, so every row comes exactly once even while it changes.

  • A table without a key is read in one pass, handed over page by page (one: cursors), kept open up to 30 minutes between pages.
  • Asking for the same page twice (a request tried again) answers the same page.
  • Syncs never count against your reads, and your reads never slow a sync down.
Every page, in Python
import requestsurl = "https://api.bridgestick.com/api/v1/data/sources/sap-prod/tables/rows"headers = {"Authorization": "Bearer bsk_…"}params = {"table": "MARA", "limit": 10000, "decimals": "string"}while True:    page = requests.get(url, headers=headers, params=params, timeout=120).json()    for row in page["rows"]:        print(row)    if page["next_cursor"] is None:        break    params["cursor"] = page["next_cursor"]

Reading a destination's copy

Through a connection, from=destination reads the table as one of its destinations holds it — to spare the source — with destination=<slug> (left out when only one can be read). The destination's Data API switch must be on, on its form. With fallback=source, a destination that cannot serve the first page — unreachable, failing, or not holding the table yet — has the source serve it instead.

  • Every page says where it was read: served_from (kind, slug, name, table, and for a destination when it last synced).
  • A cursor holds for the end that issued it; a sync that publishes the table again between two pages ends the read (400: start it again).
From a destination's copy, falling back on the source
curl -H "Authorization: Bearer bsk_…" "https://api.bridgestick.com/api/v1/data/connections/sap-to-warehouse/tables/rows?table=MARA&from=destination&fallback=source"

Values

Every value arrives in one exact form, whatever the source: a decimal is a JSON number with every digit the source holds (1234.5600) — read it with a decimal-aware parser, or ask decimals=string for a string of those digits; a float is a JSON number; dates and times are ISO 8601; binary data is Base64. Each page's types names every column's type (decimal, number, string, …).

Errors and limits

An error is a JSON object with a detail field.

Error codes
CodeWhat it means
400A bad request or cursor, a field the table does not have, or one the connection does not sync
401A key missing, unknown, revoked or expired — or its user deactivated
403A source out of the key's scope, not exposed, or a connection disabled
404No such source, connection or table (the database's own catalog is never read)
429Over a limit of the key's — 600 requests a minute, 1,000,000 rows a minute, 4 reads in flight (8 per source) —: wait Retry-After seconds
502The source or the destination failed (its own fault code, when it has one)

Live events

A WebSocket streams what changes, as it changes: wss://api.bridgestick.com/ws?key=bsk_…&topics=health,jobs — a key's events are the health of its sources and the jobs of their syncs, for the sources it may read. A key revoked or expired closes the stream.

Bridge your data with nothing bent on the way.

Create your space, connect a source and run your first sync — free during early access. When your systems are private, an agent is one command away.