Quickstart
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.
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:
1. Create a Connection
The following request will create a MySQL connection. The configuration for each type of connection can be found at the connection configuration page in our documentation.
OAuth Connections
OAuth connections require completing the connection authentication process in the browser. An example of creating an OAuth connection can be found in the recipes section of the docs.
2. Create a Model
Next we’ll create a model of a “customers” table using the MySQL connection we just created.
Connections can be enumerated using the source endpoint. This next call will show us all available tables on the connection we just created:
The response will look like:
Sources
Each source level can be drilled down by using query parameters. e.g. ?table=company.accounts
. In this case; however, tables requires_one_of property is null so we don’t need to drill down.
Finally, we can create a model using the company.customers table like we mentioned above:
Important: Make sure to replace YOUR-CONNECTION-ID
with the returned connection ID.
3. Create a sync
Next we’ll create a sync using the customer model we created above. We’ll also create an additional connection that we will use as the target.
Create a target
Here, we’ll create a Snowflake connection as our target.
Enumerate target
In the same way sources can be enumerated, so can targets.
The response will look like:
Next, we can drill down using the requires_one_of
field recursively. For example:
The response will look like:
Notice, the schema also requires a table. We can enumerate those by adding to the query parameters.
The response will look like:
Query target fields
The last step in enumerating a target for a sync is querying the available fields. To do this, we can POST a fields query on the target resource.
This response will show the available syncs modes as well as the fields and their associated metadata. For example:
Setup sync mapping
Finally, we can set up a mapping of fields from the model we created above and the target as seen below: