Quickstart
This quickstart guide illustrates an end-to-end example of setting up a Polytomic sync from HubSpot to a PostgreSQL database.
Setup
Generate an API key in your user settings panel. For more information, see the authentication section.
Making API requests
Set the API token as an environment variable:
Replace YOUR-API-TOKEN with the token you just generated.
Make a request to the identity endpoint:
cURL
Python
Typescript
Go
1. Create a HubSpot Connection
The following request creates a HubSpot Connection. See the connection configuration reference for the fields each Connection type accepts.
cURL
Python
Typescript
Go
HubSpot Connections authenticate with OAuth. Open the URL returned in the auth_url field of the response to complete the flow.
OAuth redirection
By default, the API expects auth_url to open in a new browser window.
Set the optional redirect_url parameter in the request body to change
the redirect target.
2. Create a PostgreSQL Connection
The PostgreSQL server must be network-accessible from Polytomic.
cURL
Python
Typescript
Go
Polytomic may take a few moments to cache source schemas after a new Connection is created.
3. Create a Bulk Sync
The following request creates a Bulk Sync that replicates every HubSpot object into Postgres:
