Skip to main content
Uses: Python · TypeScript · CLI · REST API
Applications that expose selectable objects - databases especially - need one extra step after connecting: telling Engini which tables or entities to work with. You can check whether an app needs this via supportsObjectSelection on the application, or useSelectDBObjects on the connection. The sequence is refresh → poll → browse → select → poll again.
cURL samples assume BASE=https://api.engini.io/v1 and AUTH="x-api-key: $ENGINI_API_KEY" - the setup from the REST walkthrough. Steps 1-2 are shown raw first because the polling contract is where the surprises live; the SDK and CLI wrap both steps in one call (the CodeGroup in step 2).

1. Trigger a refresh

Refresh is asynchronous. An empty 200 means accepted, not finished.
Async triggers can return a gateway 502/503/504 while the job is still accepted server-side. Don’t treat that as failure - the status poll is the source of truth. Both SDKs already tolerate this.

2. Poll until it settles

Branch on statusDescription and error, not the numeric status enum. The enum is Ok = 0, Error = 1, InProgress = 2, but a finished refresh has been observed reporting status: 0 with descriptive text carrying the real meaning - so the text plus error is the reliable signal. The SDKs’ wait_for_refresh already encodes this.

3. Browse what’s available

Large schemas paginate like any other list (offset/top, up to 1000 per page) - see paging large catalogs. The SDKs and CLI page for you.

4. Select

Selecting replaces the entire selection - it isn’t additive. To add one object, send the existing selected ids plus the new one, or you’ll silently deselect everything else.
Selecting triggers another refresh, so wait for refresh-status again before assuming the new objects are queryable:

Adding to an existing selection

A useful side effect

A completed refresh is the strongest health signal a connection can give you - stronger than check, which can return an inconclusive empty 200. A refresh that finishes proves the credential actually authenticated against the provider. If you only run one verification after creating a connection, make it this one.

The whole thing in one command