Quickstart
This quick start guide illustrates an end-to-end example of setting up a Polytomic sync.
Prerequisites
This guide makes use of cURL, a command line program for making HTTP requests. MacOS and many Linux distributions have cURL pre-installed, and it is also available for download on Windows and many other operating systems. This guide also demonstrates using Polytomic’s native clients.
Setup
Generate an API key in the 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 generate in the step above.
Make a request to the identity endpoint:
cURL
Python
Typescript
Go
1. Create a HubSpot connection
The following request will create a Hubspot connection. The configuration for each type of connection can be found at the connection configuration docs page.
cURL
Python
Typescript
Go
Since Hubspot connections uses OAuth to authenticate, we’ll need to follow the link returned in the auth_url
parameter in the response
Redirection
By default, the API expects the auth_url
to be open in a new browser window. If you’d like to modify the redirect behavior, there is an optional redirect_url
parameter that can be added to the request body.
2. Create a PostgreSQL connection
The PostgreSQL server must be network-accessible from Polytomic.
cURL
Python
Typescript
Go
Source objects may not be immediately readable after creating a connection; Polytomic may take a few moments to cache source schemas after creating a connections.
3. Create a bulk sync
This will create a bulk sync of all Hubspot objects into Postgres: