Skip to content

Latest commit

 

History

History
7097 lines (4904 loc) · 79.4 KB

reference.md

File metadata and controls

7097 lines (4904 loc) · 79.4 KB

Reference

BulkSync

client.bulk_sync.list(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.list(
    active=True,
)

⚙️ Parameters

active: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.create(...)

🔌 Usage

from polytomic import BulkSchedule
from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.create(
    destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="My Bulk Sync",
    schedule=BulkSchedule(
        frequency="manual",
    ),
    source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

destination_connection_id: str

name: str

schedule: BulkSchedule

source_connection_id: str

active: typing.Optional[bool]

automatically_add_new_fields: typing.Optional[BulkDiscover]

automatically_add_new_objects: typing.Optional[BulkDiscover]

data_cutoff_timestamp: typing.Optional[dt.datetime]

destination_configuration: typing.Optional[typing.Dict[str, typing.Any]]

disable_record_timestamps: typing.Optional[bool]

discover: typing.Optional[bool] — DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead

mode: typing.Optional[SyncMode]

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

schemas: typing.Optional[typing.Sequence[V2CreateBulkSyncRequestSchemasItem]] — List of schemas to sync; if omitted, all schemas will be selected for syncing.

source_configuration: typing.Optional[typing.Dict[str, typing.Any]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    refresh_schemas=True,
)

⚙️ Parameters

id: str

refresh_schemas: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.update(...)

📝 Description

📘 Updating schemas

Schema updates can be performed using the Update Bulk Sync Schemas endpoint.

🔌 Usage

from polytomic import BulkSchedule
from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    destination_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="My Bulk Sync",
    schedule=BulkSchedule(
        frequency="manual",
    ),
    source_connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

destination_connection_id: str

name: str

schedule: BulkSchedule

source_connection_id: str

active: typing.Optional[bool]

automatically_add_new_fields: typing.Optional[BulkDiscover]

automatically_add_new_objects: typing.Optional[BulkDiscover]

data_cutoff_timestamp: typing.Optional[dt.datetime]

destination_configuration: typing.Optional[typing.Dict[str, typing.Any]]

disable_record_timestamps: typing.Optional[bool]

discover: typing.Optional[bool] — DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead

mode: typing.Optional[SyncMode]

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

schemas: typing.Optional[typing.Sequence[V2UpdateBulkSyncRequestSchemasItem]] — List of schemas to sync; if omitted, all schemas will be selected for syncing.

source_configuration: typing.Optional[typing.Dict[str, typing.Any]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    refresh_schemas=True,
)

⚙️ Parameters

id: str

refresh_schemas: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.activate(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.activate(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    active=True,
)

⚙️ Parameters

id: str

active: bool

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.start(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.start(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

resync: typing.Optional[bool]

schemas: typing.Optional[typing.Sequence[str]]

test: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.get_status(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.get_status(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.get_source(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.get_source(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    include_fields=True,
)

⚙️ Parameters

id: str

include_fields: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.get_destination(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.get_destination(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

BulkSync Executions

client.bulk_sync.executions.list_status(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.executions.list_status(
    all_=True,
    active=True,
)

⚙️ Parameters

all_: typing.Optional[bool] — Return the execution status of all syncs in the organization

active: typing.Optional[bool] — Return the execution status of all active syncs in the organization

sync_id: typing.Optional[typing.Union[str, typing.Sequence[str]]] — Return the execution status of the specified sync; this may be supplied multiple times.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.executions.list(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.executions.list(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.executions.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.executions.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    exec_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

exec_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.executions.get_logs(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.executions.get_logs(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

sync_id: str

execution_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.executions.export_logs(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.executions.export_logs(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    execution_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

sync_id: str

execution_id: str

notify: typing.Optional[bool] — Send a notification to the user when the logs are ready for download.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

BulkSync Schemas

client.bulk_sync.schemas.list(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.schemas.list(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

filters: typing.Optional[typing.Dict[str, typing.Optional[str]]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.schemas.patch(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.schemas.patch(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

schemas: typing.Optional[typing.Sequence[BulkSchema]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.schemas.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.schemas.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    schema_id="Contact",
)

⚙️ Parameters

id: str

schema_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.bulk_sync.schemas.update(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.bulk_sync.schemas.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    schema_id="contact",
)

⚙️ Parameters

id: str

schema_id: str

data_cutoff_timestamp: typing.Optional[dt.datetime]

disable_data_cutoff: typing.Optional[bool]

enabled: typing.Optional[bool]

fields: typing.Optional[typing.Sequence[BulkField]]

filters: typing.Optional[typing.Sequence[BulkFilter]]

partition_key: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Connections

client.connections.get_types()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.get_types()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.list()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.create(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.create(
    configuration={
        "database": "example",
        "hostname": "postgres.example.com",
        "password": "password",
        "port": 5432,
        "username": "user",
    },
    name="My Postgres Connection",
    type="postgresql",
)

⚙️ Parameters

configuration: typing.Dict[str, typing.Any]

name: str

type: str

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

redirect_url: typing.Optional[str] — URL to redirect to after completing OAuth flow.

validate: typing.Optional[bool] — Validate connection configuration.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.connect(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.connect(
    name="Salesforce Connection",
    redirect_url="redirect_url",
)

⚙️ Parameters

name: str

redirect_url: str

connection: typing.Optional[str]

organization_id: typing.Optional[str]

type: typing.Optional[str]

whitelist: typing.Optional[typing.Sequence[str]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.update(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    configuration={
        "database": "example",
        "hostname": "postgres.example.com",
        "password": "password",
        "port": 5432,
        "username": "user",
    },
    name="My Postgres Connection",
)

⚙️ Parameters

id: str

configuration: typing.Dict[str, typing.Any]

name: str

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

reconnect: typing.Optional[bool]

type: typing.Optional[str]

validate: typing.Optional[bool] — Validate connection configuration.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    force=True,
)

⚙️ Parameters

id: str

force: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.connections.get_parameter_values(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.connections.get_parameter_values(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

QueryRunner

client.query_runner.run_query(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.query_runner.run_query(
    connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    query="SELECT * FROM table",
)

⚙️ Parameters

connection_id: str

query: typing.Optional[str] — The query to execute against the connection.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.query_runner.get_query(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.query_runner.get_query(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

page: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Models

client.models.get_enrichment_source(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.get_enrichment_source(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.post(...)

📝 Description

For a given connection and enrichment configuration, provides the valid sets of input fields.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.post(
    connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

connection_id: str

configuration: typing.Optional[V2EnricherConfiguration]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.preview(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.preview(
    configuration={"table": "public.users"},
    connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="Users",
)

⚙️ Parameters

configuration: typing.Dict[str, typing.Any]

connection_id: str

name: str

async_: typing.Optional[bool]

additional_fields: typing.Optional[typing.Sequence[ModelModelFieldRequest]]

enricher: typing.Optional[Enrichment]

fields: typing.Optional[typing.Sequence[str]]

identifier: typing.Optional[str]

labels: typing.Optional[typing.Sequence[str]]

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

relations: typing.Optional[typing.Sequence[ModelRelation]]

tracking_columns: typing.Optional[typing.Sequence[str]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.list()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.create(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.create(
    configuration={"table": "public.users"},
    connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="Users",
)

⚙️ Parameters

configuration: typing.Dict[str, typing.Any]

connection_id: str

name: str

async_: typing.Optional[bool]

additional_fields: typing.Optional[typing.Sequence[ModelModelFieldRequest]]

enricher: typing.Optional[Enrichment]

fields: typing.Optional[typing.Sequence[str]]

identifier: typing.Optional[str]

labels: typing.Optional[typing.Sequence[str]]

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

relations: typing.Optional[typing.Sequence[ModelRelation]]

tracking_columns: typing.Optional[typing.Sequence[str]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

async_: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.update(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    async_=False,
    configuration={"table": "public.users"},
    connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="Users",
)

⚙️ Parameters

id: str

configuration: typing.Dict[str, typing.Any]

connection_id: str

name: str

async_: typing.Optional[bool]

additional_fields: typing.Optional[typing.Sequence[ModelModelFieldRequest]]

enricher: typing.Optional[Enrichment]

fields: typing.Optional[typing.Sequence[str]]

identifier: typing.Optional[str]

labels: typing.Optional[typing.Sequence[str]]

organization_id: typing.Optional[str]

policies: typing.Optional[typing.Sequence[str]]

refresh: typing.Optional[bool]

relations: typing.Optional[typing.Sequence[ModelRelation]]

tracking_columns: typing.Optional[typing.Sequence[str]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

async_: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.models.sample(...)

📝 Description

Returns sample records from the model. The first ten records that the source provides will be returned after being enriched (if applicable). Synchronous requests must complete within 10s. If either querying or enrichment exceeds 10s, please use the async option.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.models.sample(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

async_: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

ModelSync

client.model_sync.get_source(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_source(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_source_fields(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_source_fields(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

params: typing.Optional[typing.Dict[str, typing.Optional[typing.Sequence[str]]]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_target(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_target(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

type: typing.Optional[str]

search: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_target_fields(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_target_fields(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    target="database.table",
    refresh=False,
)

⚙️ Parameters

id: str

target: str

refresh: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_target_objects(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_target_objects(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.list(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.list(
    active=True,
    target_connection_id="0b155265-c537-44c9-9359-a3ceb468a4da",
)

⚙️ Parameters

active: typing.Optional[bool]

mode: typing.Optional[SyncMode]

target_connection_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.create(...)

🔌 Usage

from polytomic import ModelSyncField, Schedule, Target
from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.create(
    fields=[
        ModelSyncField(
            target="name",
        )
    ],
    mode="create",
    name="Users Sync",
    schedule=Schedule(),
    target=Target(
        connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
        object="Users",
    ),
)

⚙️ Parameters

fields: typing.Sequence[ModelSyncField] — Fields to sync from source to target.

mode: str

name: str

schedule: Schedule

target: Target

active: typing.Optional[bool]

enricher: typing.Optional[Enrichment]

filter_logic: typing.Optional[str]

filters: typing.Optional[typing.Sequence[Filter]]

identity: typing.Optional[Identity]

organization_id: typing.Optional[str]

override_fields: typing.Optional[typing.Sequence[ModelSyncField]] — Values to set in the target unconditionally.

overrides: typing.Optional[typing.Sequence[Override]] — Conditional value replacement for fields.

policies: typing.Optional[typing.Sequence[str]]

sync_all_records: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_schedule_options()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_schedule_options()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.update(...)

🔌 Usage

from polytomic import ModelSyncField, Schedule, Target
from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    fields=[
        ModelSyncField(
            target="name",
        )
    ],
    mode="create",
    name="Users Sync",
    schedule=Schedule(),
    target=Target(
        connection_id="248df4b7-aa70-47b8-a036-33ac447e668d",
        object="Users",
    ),
)

⚙️ Parameters

id: str

fields: typing.Sequence[ModelSyncField] — Fields to sync from source to target.

mode: str

name: str

schedule: Schedule

target: Target

active: typing.Optional[bool]

enricher: typing.Optional[Enrichment]

filter_logic: typing.Optional[str]

filters: typing.Optional[typing.Sequence[Filter]]

identity: typing.Optional[Identity]

organization_id: typing.Optional[str]

override_fields: typing.Optional[typing.Sequence[ModelSyncField]] — Values to set in the target unconditionally.

overrides: typing.Optional[typing.Sequence[Override]] — Conditional value replacement for fields.

policies: typing.Optional[typing.Sequence[str]]

sync_all_records: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.activate(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.activate(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    active=True,
)

⚙️ Parameters

id: str

active: bool

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.start(...)

📝 Description

🚧 Force full resync

Use caution when setting the resync parameter to true. This will force a full resync of the data from the source system. This can be a time-consuming operation and may impact the performance of the source system. It is recommended to only use this option when necessary.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.start(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

identities: typing.Optional[typing.Sequence[str]]

resync: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.get_status(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.get_status(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Schemas

client.schemas.refresh(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.schemas.refresh(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.schemas.get_status(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.schemas.get_status(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.schemas.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.schemas.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    schema_id="public.users",
)

⚙️ Parameters

id: str

schema_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.schemas.get_records(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.schemas.get_records(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    schema_id="public.users",
)

⚙️ Parameters

id: str

schema_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Events

client.events.list(...)

🔌 Usage

import datetime

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.events.list(
    organization_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    starting_after=datetime.datetime.fromisoformat(
        "2020-01-01 00:00:00+00:00",
    ),
    ending_before=datetime.datetime.fromisoformat(
        "2020-01-01 00:00:00+00:00",
    ),
)

⚙️ Parameters

organization_id: typing.Optional[str]

type: typing.Optional[str]

starting_after: typing.Optional[dt.datetime]

ending_before: typing.Optional[dt.datetime]

limit: typing.Optional[int]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.events.get_types()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.events.get_types()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Jobs

client.jobs.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.jobs.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    type="createmodel",
)

⚙️ Parameters

id: str

type: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Identity

client.identity.get()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.identity.get()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Organization

client.organization.list()

📝 Description

🚧 Requires partner key

Organization endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.organization.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.organization.create(...)

📝 Description

🚧 Requires partner key

Organization endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.organization.create(
    name="My Organization",
)

⚙️ Parameters

name: str

client_id: typing.Optional[str]

client_secret: typing.Optional[str]

issuer: typing.Optional[str]

sso_domain: typing.Optional[str]

sso_org_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.organization.get(...)

📝 Description

🚧 Requires partner key

Organization endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.organization.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.organization.update(...)

📝 Description

🚧 Requires partner key

Organization endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.organization.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="My Organization",
)

⚙️ Parameters

id: str

name: str

client_id: typing.Optional[str]

client_secret: typing.Optional[str]

issuer: typing.Optional[str]

sso_domain: typing.Optional[str]

sso_org_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.organization.remove(...)

📝 Description

🚧 Requires partner key

Organization endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.organization.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Users

client.users.list(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.list(
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

org_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.create(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.create(
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    email="mail@example.com",
)

⚙️ Parameters

org_id: str

email: str

role: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.get(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

org_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.update(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    email="mail@example.com",
)

⚙️ Parameters

id: str

org_id: str

email: str

role: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.remove(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

org_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.create_api_key(...)

📝 Description

🚧 Requires partner key

User endpoints are only accessible using partner keys

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.users.create_api_key(
    org_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    force=True,
)

⚙️ Parameters

org_id: str

id: str

force: typing.Optional[bool]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Permissions Policies

client.permissions.policies.list()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.policies.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.policies.create(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.policies.create(
    name="Custom",
)

⚙️ Parameters

name: str

organization_id: typing.Optional[str]

policy_actions: typing.Optional[typing.Sequence[PolicyAction]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.policies.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.policies.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.policies.update(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.policies.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="Custom",
)

⚙️ Parameters

id: str

name: str

organization_id: typing.Optional[str]

policy_actions: typing.Optional[typing.Sequence[PolicyAction]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.policies.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.policies.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Permissions Roles

client.permissions.roles.list()

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.roles.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.roles.create(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.roles.create(
    name="Custom",
)

⚙️ Parameters

name: str

organization_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.roles.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.roles.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.roles.update(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.roles.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    name="Custom",
)

⚙️ Parameters

id: str

name: str

organization_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.permissions.roles.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.permissions.roles.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

ModelSync Executions

client.model_sync.executions.list(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.executions.list(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

sync_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.executions.get(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.executions.get(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

sync_id: str

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.executions.get_log_urls(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.executions.get_log_urls(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    type="records",
)

⚙️ Parameters

sync_id: str

id: str

type: V2ExecutionLogType

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.model_sync.executions.get_logs(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.model_sync.executions.get_logs(
    sync_id="248df4b7-aa70-47b8-a036-33ac447e668d",
    id="0ecd09c1-b901-4d27-9053-f0367c427254",
    type="records",
    filename="path/to/file.json",
)

⚙️ Parameters

sync_id: str

id: str

type: V2ExecutionLogType

filename: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Webhooks

client.webhooks.list()

📝 Description

Webooks can be set up using the webhook API endpoints. Currently, only one webhook may be created per organization. The webhook will be called for events in that organization.

Consult the Events documentation for more information.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.webhooks.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.create(...)

📝 Description

Webooks can be set up using the webhook API endpoints. Currently, only one webhook may be created per organization. The webhook will be called for events in that organization.

Consult the Events documentation for more information.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.webhooks.create(
    endpoint="https://example.com/webhook",
    secret="secret",
)

⚙️ Parameters

endpoint: str

secret: str

organization_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.get(...)

📝 Description

Webooks can be set up using the webhook API endpoints. Currently, only one webhook may be created per organization. The webhook will be called for events in that organization.

Consult the Events documentation for more information.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.webhooks.get(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.update(...)

📝 Description

Webooks can be set up using the webhook API endpoints. Currently, only one webhook may be created per organization. The webhook will be called for events in that organization.

Consult the Events documentation for more information.

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.webhooks.update(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
    endpoint="https://example.com/webhook",
    secret="secret",
)

⚙️ Parameters

id: str

endpoint: str

secret: str

organization_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.remove(...)

🔌 Usage

from polytomic.client import Polytomic

client = Polytomic(
    version="YOUR_VERSION",
    token="YOUR_TOKEN",
)
client.webhooks.remove(
    id="248df4b7-aa70-47b8-a036-33ac447e668d",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.