Skip to main content
Everything importable from vectorshift:

Connecting

connect

Passing credentials= does an instant form-based create and returns a ConnectionRequest that is already ACTIVE. Otherwise (form, OAuth, or hybrid) it opens a hosted connect page and returns a request carrying a connect_url; drive it to completion with .wait(). Parameters
IntegrationType | str
required
The integration type. Accepts an IntegrationType, a display name ("Slack"), or a route name ("slack"). Unknown values raise UnknownIntegrationType.
Optional[dict]
default:"None"
Form credentials for a credential-capable type. When present, required fields are validated client-side and the integration is created instantly. Omit to enter them / consent in the hosted page.
Optional[str]
default:"None"
A custom name for this integration instance.
bool
default:"True"
Open connect_url in the default browser. Set False on headless hosts and hand the user req.connect_url yourself.
Optional[str]
default:"None"
Space-separated OAuth scopes to request (OAuth types only).
bool
default:"False"
Return a long-lived shareable connect link without waiting. Combine with link_expires_in.
Shareable-link TTL in seconds.
bool
default:"False"
Require the person completing the connection to be a member of your org.
Optional[str]
default:"None"
Reconnect an existing integration in place instead of creating a new one. Prefer reauth.
Returns — a ConnectionRequest.

reauth

Reconnect this integration in place to refresh expired or revoked auth, keeping the same object_id. Opens the hosted page; .wait() resolves when done.

Managing

fetch

Fetch by id or name — at least one is required, else ValueError.

list

List integrations visible to the API key’s org, optionally filtered by type (route name, e.g. "slack").

get_status

Fetch the current health status — "done", "loading", or "unhealthy" (see IntegrationStatus).

sync / resync

Trigger a global metadata resync of every vectorstore that uses this integration. Fire-and-forget; only supported for revamped integration types. See the KB resync example for the KB-aware kb.resync_integration(id) wrapper.

refresh

Re-fetch this integration’s fields from the server, mutating it in place and returning self.

delete

Disconnect and delete the integration.

to_dict

The serialized reference shape (object_id + object_type) a Pipeline node / Agent tool stores. The fluent builder and tool classes accept the Integration object directly — pipeline.add(name="…").integration_slack(integration=integ, …) — so you rarely call to_dict() yourself; reach for it only when building a node config by hand.

Sessions & catalogue

from_session

Rebuild a ConnectionRequest from a persisted session_id — reconcile a delegated / share=True attempt after the original process exited.

revoke_session

Kill an outstanding connect-session; subsequent opens of its link expire.

types

The authoritative catalogue of supported types.

required_fields

Required credential field names for a credential-capable type (empty tuple for OAuth-only types).

Integration

Attributes on a fetched instance:
str
The unique id. Use to_dict() / this value to reference the integration elsewhere.
Optional[str]
Display / account name.
Optional[str]
Route name, e.g. "slack".
Optional[str]
Health status — see IntegrationStatus.
Optional[str]
Creation timestamp.
Optional[list[str]]
OAuth scopes granted.
Optional[list[str]]
Actions this connection permits.
Optional[bool]
Convenience flag for a degraded connection.

ConnectionRequest

One in-flight connection attempt. OAuth requests start at INITIATED with a connect_url; form requests are born ACTIVE with the Integration already attached, so wait() returns instantly. Attributes
str
The connect-session id (aliased as .id). Persist it to reconcile later via from_session.
IntegrationType
The type being connected.
ConnectionStatus
Current session status.
Optional[str]
The URL the user opens to consent / enter credentials.

wait

Poll until the session is ACTIVE and return the live Integration. Raises ConnectionFailed / ConnectionExpired on a terminal bad status, and ConnectionTimeout if timeout elapses first (the attempt stays live server-side — re-open connect_url or re-poll).

get_status

A single non-blocking poll; updates and returns req.status.

get_result

Return the Integration if the session is already ACTIVE; raises ConnectionFailed if not yet active. Use after a get_status() confirms ACTIVE, when you don’t want to block in wait().

Enums

IntegrationType

A StrEnum whose value is the display name. Members carry:
str (property)
URL-safe id the backend uses (e.g. IntegrationType.SLACK.route_name == "slack").
bool (property)
True for types that connect via credentials only (no OAuth).
AuthMode (property)
AuthMode.FORM when is_form_only, else AuthMode.OAUTH.
classmethod
Resolve a route name back to a member; unknown routes raise UnknownIntegrationType.
Passing a route name where a display name is expected also resolves (IntegrationType("slack") works).

AuthMode

OAUTH · FORM.

ConnectionStatus

The lifecycle of a ConnectionRequest: INITIATED · PENDING · ACTIVE · FAILED · EXPIRED.

IntegrationStatus

The health of a configured integration: LOADING · DONE · UNHEALTHY.

Type catalogue

76 supported types. route_name is what you pass to connect(...) / the CLI. Auth is OAuth (browser consent), Form (credentials only — see fields below), or OAuth + form (hybrid: connect via the hosted page or by passing credentials=).

Credential fields

Types you can connect by passing credentials=. Required fields are validated client-side (MissingCredentials); optional fields tune the connection.

Errors

All inherit from IntegrationError (itself a VectorshiftError).
exception
A lookup returned no result.
exception
A type / route name is not in the catalogue. Carries .value.
exception
A form connect is missing required fields. Carries .type and .missing_fields. Raised client-side before any network call.
exception
The provider denied access or the backend errored. Carries .reason.
exception
The connect-session TTL elapsed before completion.
exception
wait() exceeded its timeout. Not a failure — the attempt is still live; re-open .connect_url or re-poll. Carries .connect_url, .last_status, .timeout. Also a TimeoutError.
See Errors for the full SDK exception hierarchy.

What’s next

CLI reference

The vectorshift command line.

Integration tools

Per-service agent tool actions.

Integration nodes

Per-service pipeline node actions.