Stitch Connect:
Embedded ETL for developers
Connect enables developers to integrate dozens of data sources into their applications with a single toolkit.
Connect enables developers to integrate dozens of data sources into their applications with a single toolkit.
Integrating with third-party software applications and internal databases provides valuable data, but creates a maintenance burden and distracts development teams from focusing on improving their core product. Connect simplifies that by providing:
Create accounts, connect to data sources, and specify destinations, either directly from the Connect API or using a JavaScript library.
We take care of scheduling, auto-scaling, API version management, warehouse load optimization, and credential management.
Interested in seeing how Connect could work with your application?
Get in touchWork with the API directly, or use the JavaScript client to create and access Stitch client accounts, extract data, and load data into warehouses.
api-a-1
For example, this is how you would create a Stitch client using the Connect API:
1
2
3
4
5
6
7
8
9
10
11
curl -X POST https://api.stitchdata.com/v3/accounts
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json"
-d "{
"email": "stitch-api-test@stitchdata.com",
"last_name": "Product Team",
"partner_id": "<PARTNER_ID>",
"first_name": "Stitch",
"partner_secret": "<PARTNER_SECRET>",
"company": "Stitch Product Team"
}"
This is how you would authorize an integration with OAuth using the JS Client:
1
2
3
4
5
6
7
8
9
Stitch.authorizeSource({
"id": 45612,
"ephemeral_token": "<EPHEMERAL_TOKEN>"
}).then((result) => {
console.log(`Integration created, type=${result.type},
id=${result.id}`);
}).catch((error) => {
console.log("Integration not created.", error);
});
1
2
3
4
5
6
7
8
9
10
11
curl -X POST https://api.stitchdata.com/v3/accounts
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json"
-d "{
"email": "stitch-api-test@stitchdata.com",
"last_name": "Product Team",
"partner_id": "<PARTNER_ID>",
"first_name": "Stitch",
"partner_secret": "<PARTNER_SECRET>",
"company": "Stitch Product Team"
}"
1
2
3
4
5
6
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1
{
"access_token":"<ACCESS_TOKEN>"
}
1
2
3
4
5
6
7
8
9
10
11
curl -X POST https://api.stitchdata.com/v4/sources
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json"
-d "{
"type":"platform.hubspot",
"display_name":"HubSpot",
"properties":{
"start_date":"2017-01-01T00:00:00Z",
"frequency_in_minutes":"30"
}
}"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1
{
"properties":{
"frequency_in_minutes":"30",
"image_version":"1.latest",
"start_date":"2017-01-01T00:00:00Z"
},
"updated_at":"2018-02-06T16:25:06Z",
"check_job_name":null,
"name":"hubspot",
"type":"platform.hubspot",
"deleted_at":null,
"system_paused_at":null,
"stitch_client_id":<ACCOUNT_ID>,
"paused_at":null,
"id":<SOURCE_ID>,
"display_name":"HubSpot",
"created_at":"2018-02-06T16:25:06Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl -X PUT https://api.stitchdata.com/v3/destinations/{id}
-H "Authorization: Bearer <ACCESS_TOKEN>"
-H "Content-Type: application/json"
-d "{
"type":"postgres",
"connection": {
"host": "<HOST>",
"port": 5432,
"username": "<USERNAME>",
"database": "<DATABASE>",
"password": "<PASSWORD>",
"ssl": false
}
}"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1
{
"id":"<DESTINATION_ID>",
"type":"postgres",
"created_at":"2018-02-06T15:36:36Z",
"updated_at":"2018-02-06T18:55:43Z",
"connection": {
"host":"<HOST>",
"port":5432,
"username":"<USERNAME>",
"database":"<DATABASE>",
"password":"<PASSWORD>",
"ssl":false
},
"last_check":{
"error": false,
"started_at":"2018-02-06T16:15:19Z",
"completed_at":"2018-02-06T16:16:21Z"
}
}
1
2
3
4
5
6
7
8
9
Stitch.authorizeSource({
"id": 45612,
"ephemeral_token": "<EPHEMERAL_TOKEN>"
}).then((result) => {
console.log(`Integration created, type=${result.type},
id=${result.id}`);
}).catch((error) => {
console.log("Integration not created.", error);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
Stitch.selectStreamsForSource({
"id": 123,
"default_streams": {
"campaigns": true,
"companies": true
},
"ephemeral_token": "<EPHEMERAL_TOKEN>"
}).then((result) => {
console.log(`Integration created, type=${result.type},
id=${result.id}`);
}).catch((error) => {
console.log("Integration not created.", error);
});
1
2
3
4
5
6
7
8
9
Stitch.displayDiscoveryOutputForSource({
"id": 123,
"discovery_job_name": "987-123-4567891234-checks"
}).then((result) => {
console.log(`Integration created, type=${result.type},
id=${result.id}`);
}).catch((error) => {
console.log("Integration not created.", error);
});
For technical details on the Stitch API, visit our docs. Interested in seeing how it could work with your application?
Contact our sales team today.
Set up in minutesUnlimited data volume during trial