API access is an upgraded feature
For more info about Stitch Advanced, contact the Stitch Sales team.
Introduction
The Stitch Connect API enables users to programmatically access and manage their Stitch accounts, or Stitch partners to seamlessly integrate Stitch’s data pipleine functionality into their own platforms.
This API is a RESTful, resource-oriented API that allows you to programmatically provision Stitch accounts, create and modify data sources, and configure destination connections.
Each endpoint uses standard HTTP verbs like GET and POST, and will return standard HTTP response codes to indicate request status or errors.
We built the API to accept and return JSON in all responses, including errors.
API functionality
Using the API, you can:
-
Create Stitch client accounts (Partners only)
-
Access Stitch client accounts
-
Retrieve configuration info for destinations
-
Create, update, and delete destinations
-
Retrieve configuration info for data sources
-
Create, update, pause, unpause, and delete data sources
-
Retrieve connection check results for a data source
-
Select and configure streams and fields from data sources for replication
-
Start and stop replication jobs
-
Retrieve status info about recent extraction jobs
-
Retrieve status info about recent data loading attempts
-
Create, pause, unpause, and delete notification settings for a Stitch client account
Tutorials and resources
Check out the tutorials and resources to learn more about using Stitch Connect.
Accessing the API
To use the API, you’ll need to obtain an API access token. This is necessary for authenticating successfully. Refer to the Authentication section for more info.
Terminology
Partner ID |
The unique ID for your partner application, obtained after an interest form is submitted to and approved by Stitch. |
Partner key |
The key associated with your partner application, obtained after an interest form is submitted to and approved by Stitch. |
Partner |
An organization that utilizes Stitch Connect to programmatically create and/or manage Stitch client accounts on behalf of their users. |
Stitch client account |
An individual account for the Stitch web application. |
Client account access token |
An API access token associated with a single Stitch client account. This token must be passed into the header of every request made to the API for the Stitch client account. |
Ephemeral token |
A token that is passed to the Connect JavaScript Client to create a session. Ephemeral tokens expire one hour after generation. When specified as an argument in a Connect JavaScript function, the ephemeral token is exchanged for a session token, creating a temporary Stitch session for the user. The session expires once terminated or 12 hours after its creation. |
Destination |
Destination is the Stitch word for ‘data warehouse.’ A data warehouse is a central repository for data accumulated from a variety of sources. |
Session |
A browser session in the Stitch web application. |
Source |
A database, API, or other data application that Stitch replicates data from. Outside of Connect, known as an ‘integration’. |
Stream |
A table in a data source. |
Connection check |
A test performed by Stitch that checks the configuration of a source’s connection parameters. |
Replication job |
The three-step process by which Stitch replicates data. A replication job includes three distinct steps: Extraction, preparation, and loading. |
Structure sync |
The first step in the replication process, this process takes place during the Extraction phase of a replication job. A structure sync detects the tables and columns available in the source, along with any changes to the structure of those tables and columns. This is also referred to as discovery. |
Authentication
Authenticate your calls to the API by providing an access token in your requests. Each access token is associated with a single Stitch client account. Access tokens do not expire, but they may be revoked by the user at any time.
Additionally, each request’s permissions are limited to that Stitch client account.
In the examples in this documentation, we use bearer auth:
curl "https://api.stitchdata.com
/v4/sources" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
All requests must be made over HTTPS or they will fail. API requests that don’t contain authentication will also fail.
Obtain an API access token
How you obtain an access token depends on the type of user you are:
Individual Stitch user
You will be using the API to programmatically control your own Stitch client account. You can create, revoke, and delete API access tokens on the Account Settings page of your Stitch client account.
Stitch partner
You’ll be performing actions in Stitch client accounts on behalf of users who authorize your API client. You’ll need to register as an API client and refer to the Partner API Authentication guide for instructions.
Credential reference
This section contains a list of the different credentials refered to throughout the Connect documentation.
Name | Prefix | Details |
API access token | ac_ |
|
Partner ID | oc_ |
|
Partner secret | oc_ |
|
Ephemeral token | Not applicable |
|
Session token | Not applicable |
|
Response codes
The API will attempt to return HTTP status codes for every request.
Code | Text | Description |
200 |
OK |
Success! |
400 |
Bad Request |
The request is invalid, contains malformed data, or otherwise cannot be served. The reasons for invalid requests can vary by endpoint. An accompanying message will provide detail about the reason for failure. |
401 |
Unauthorized |
The request doesn’t have a valid API access token. Verify your token is correct and re-try the request. |
404 |
Not Found |
Potential causes:
|
500 |
Internal Server Error |
The API is experiencing problems. Try again later. |
502 |
Bad Gateway |
The API is experiencing problems. Try again later. |
Error message format
The API will return error messages in JSON format. Some error messages may be returned as strings:
an account can have at most one destination
While others may be JSON objects:
{
"code":"ExistingUser",
"message":"This email address is already associated with an active user."
}
Error message text
The text in error messages will vary by root cause and endpoint.
Each endpoint section contains a rollup of the errors specific to that endpoint. Refer to the documentation for the endpoint for specifics on errors, their possible causes, and the messages the API will return.
Rate limits
A rate limit defines the maximum number of requests, over a period of time, that can be made to the Connect API.
Rate limits are enforced for endpoints that can return large amounts of data or may require polling to identify updates. To ensure all API consumers receive the same high quality experience, Stitch employs rate limits to ensure API stability and availability.
Rate limit application
Stitch imposes a limit on the number of requests that can be made for a given client ID over a period of time. The number of requests and the time period over which requests can be made varies by resource type.
Endpoints are grouped based on resource type. Usage counting towards the rate limit for a resource type is aggregated across requests made to all endpoints in the resource type group.
For example: The Extractions and Loads endpoints are part of the Jobs resource. Requests made to any extraction- or load-based endpoint counts towards the rate limit usage for the Jobs resource type.
Rate limit types
The resource type for an endpoint determines how many API requests can be made for a given time period. Refer to the table below for details about resource types and the endpoints that are subject to rate limits.
Note: Only endpoints subject to rate limiting are listed in the table. If an endpoint isn’t listed, rate limiting is not currently applicable for that endpoint.
Resource type | API requests | Time period | Affected endpoints |
Jobs |
30 | 10 minutes |
Avoid rate limiting violations
Currently, Stitch takes a DTRT (Do The Right Thing) approach to enforcing rate limits. There isn’t functionality built into the API to programmatically enforce rate limits, but this may change in the future. We’re trusting everyone to be good API consumers.
If a client repeatedly exceeds rate limits, Stitch may block that client from accessing rate limited endpoints.
To avoid rate limit violations, we recommend making requests only for the data you need, only when you need it. Additionally, distribute requests to ensure you stay within the maximum number of requests during the allowed time period for the endpoint.
Pagination
Some endpoints in the API return lists of objects such as extraction jobs, loading records, and so on. As lists can be quite large depending on the number of sources in a client account, several API endpoints will return paginated results.
Per page record limits
Pages are currently limited to 100 records per page.
Result sorting and ordering
Paginated results are sorted and ordered. The data used to sort and order records varies by endpoint.
Refer to the Endpoints with pagination for a list of endpoints with pagination and how results are returned.
Pagination data
Endpoints with paginated results have page
, total
, and links
properties in their responses:
{
"page": 1,
"total": 37,
"links": {}
}
If the result set doesn’t exceed the per page maximum, the links
property will be empty, like in the previous example.
If the result set exceeds the per page maximum, the links
property will have next
and previous
properties. These values are URLs to the next and previous pages of results, respectively:
{
"page": 2,
"total": 237,
"links": {
"next": "/v4/116078/extractions?page=3",
"previous": "/v4/116078/extractions?page=1"
}
}
The next
and previous
values can be used as path parameters to make subsequent requests and retrieve additional pages of results. If there aren’t any pages before or after the current page, the links
object won’t have a previous
or next
property, respectively.
For example: If page: 2
and next: /v4/116078/extractions?page=3
, make a request to the endpoint using this URL to retrieve page 3 of the results:
curl "https://api.stitchdata.com
/v4/{stitch_client_id/extractions?page=3" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
To retrieve all pages, continue paging until the response no longer contains a next
property:
{
"page": 3,
"total": 237,
"links": {
"previous": "/v4/116078/extractions?page=2"
}
}
Limitations
A request made for a specific page returns only the results for that page, not the entire result set.
To determine which records display on each page, Stitch divides the total record count by the per page maximum. Keep in mind that if the total number of records changes, records may shift between pages. This means that some records may appear multiple times or be skipped all together while iterating over the entire list.
As a result, multiple requests will be required to retrieve all the data from a paginated endpoint. When making subsequent requests, keep in mind that some endpoints are subject to rate limiting.
Consider the following example:
Endpoints with pagination
Note: Only endpoints with pagination are listed in this section. If an endpoint isn’t listed, pagination is not currently applicable for that endpoint.
Endpoint | Ordered by | Sorting |
GET /v4/{stitch_client_id}/extractions | source_id | Ascending (0-9) |
GET /v4/{stitch_client_id}/loads | stream_name | Ascending (A-Z) |
Versioning
The API is currently versioned by object. The table below lists the core objects, all available versions, and the endpoints available for each version.
ACCOUNT | |
Version | Endpoints |
v3 (latest) | |
SESSION | |
Version | Endpoints |
v3 (latest) | |
DESTINATION TYPE | |
Version | Endpoints |
v4 (latest) | |
DESTINATION | |
Version | Endpoints |
v4 (latest) | |
v3 | |
SOURCE TYPE | |
Version | Endpoints |
v4 (latest) | |
SOURCE | |
Version | Endpoints |
v4 (latest) | |
CONNECTION CHECK | |
Version | Endpoints |
v4 (latest) | |
STREAM | |
Version | Endpoints |
v4 (latest) | |
REPLICATION JOB | |
Version | Endpoints |
v4 (latest) | |
EXTRACTION | |
Version | Endpoints |
v4 (latest) | |
LOAD | |
Version | Endpoints |
v4 (latest) | |
NOTIFICATION | |
Version | Endpoints |
v1 (latest) |
|
Core objects
Accounts
Endpoints
POST | Create an account |
Creates a new Stitch client account and receives an API access token in return. Note: This endpoint is available only to Stitch Partners. Before creating a Stitch account, you’ll need to request access to the API and obtain partner credentials by submitting this form to our team. |
The Account object
An object representing a Stitch client account.
company
STRING |
A name for the Stitch client. This is typically the name of the company using the Stitch client account. |
email
STRING |
The email address of the user signing up for a Stitch client account. Upon successful account creation, Stitch will send an email to this address with instructions for completing the setup. |
first_name
STRING |
The first name of the user signing up for a Stitch client account. |
last_name
STRING |
The last name of the user signing up for a Stitch client account. |
partner_id
STRING |
The unique ID for your API client, obtained when you register to use the API. |
partner_secret
STRING |
The secret for your API client, obtained when you registered to use the API. |
region
STRING |
The account’s data pipeline region, which determines where defines the region where Stitch-hosted data centers will process the account’s replicated data. |
Example object
{
"partner_id": "<PARTNER_ID>",
"partner_secret": "<PARTNER_SECRET>",
"first_name": "Stitch",
"last_name": "Product Team",
"company": "Stitch Product Team",
"region": "us-east-1",
"email": "stitch-api-test@stitchdata.com"
}
Create an account
Creates a new Stitch client account and receives an API access token in return.
Note: This endpoint is available only to Stitch Partners. Before creating a Stitch account, you’ll need to request access to the API and obtain partner credentials by submitting this form to our team.
Resource list
Request method |
POST |
Resource URL |
/v3/accounts |
Authorization |
Required. The request body must contain your partner credentials ( |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
company
STRING REQUIRED |
A name for the Stitch client. This is typically the name of the company using the Stitch client account. |
email
STRING REQUIRED |
The email address of the user signing up for a Stitch client account. Upon successful account creation, Stitch will send an email to this address with instructions for completing the setup. |
first_name
STRING REQUIRED |
The first name of the user signing up for a Stitch client account. |
last_name
STRING REQUIRED |
The last name of the user signing up for a Stitch client account. |
partner_id
STRING REQUIRED |
The unique ID for your API client, obtained when you register to use the API. |
partner_secret
STRING REQUIRED |
The secret for your API client, obtained when you registered to use the API. |
region
STRING REQUIRED |
The account’s data pipeline region, which determines where defines the region where Stitch-hosted data centers will process your account’s replicated data. Note: This can’t be changed after the account is created. Accepted values are:
|
Returns
If successful, the API will return a status of 200 OK
and an object with access_token
and stitch_account_id
properties.
Otherwise, an error will be returned. For example: If a Stitch client account associated with the user already exists, the request will return This email address is already associated with an active user.
See the Errors tab below for additional possibilities.
curl -X "POST" "https://api.stitchdata.com
/v3/accounts" \
-H 'Content-Type: application/json' \
-d \
'{
"partner_id": "",
"partner_secret": "",
"first_name": "Stitch",
"last_name": "Product Team",
"company": "Stitch Product Team",
"region": "us-east-1",
"email": "stitch-api-test@stitchdata.com"
}'
{
"access_token": "at_<ACCESS_TOKEN>",
"stitch_account_id": 136715
}
Code | Condition | Response body |
400 |
A Stitch account is already associated with the provided email address. |
|
400 |
Request body contains malformed data. |
|
400 |
Missing or invalid |
|
400 |
Missing or invalid |
|
Sessions
Endpoints
POST | Create a session |
Generates an ephemeral token to create a session in the Stitch web application. Ephemeral tokens expire after one hour. |
The Session object
This object represents a browser session in the Stitch web application.
ephemeral_token
STRING |
A token that is passed to the Connect JavaScript Client to create a session. |
Example object
{
"ephemeral_token":"<EPHEMERAL_TOKEN>"
}
Create a session
Generates an ephemeral token to create a session in the Stitch web application. Ephemeral tokens expire after one hour.
Ephemeral tokens are used to create a session with the Connect JavaScript client. The session will be for the user for whom the API access token was created.
After the ephemeral token is used to create a session, the created session will expire once terminated or after 12 hours.
Resource list
Request method |
POST |
Resource URL |
/v3/sessions/ephemeral |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Returns
If successful, the API will return a status of 200 OK
and a Session object.
curl -X "POST" "https://api.stitchdata.com
/v3/sessions/ephemeral" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
{
"ephemeral_token":"<EPHEMERAL_TOKEN>"
}
Destination Types
Endpoints
GET | Get a destination type |
Retrieves general information about the configuration required for a destination type. |
GET | List all destination types |
Retrieves general information about the configuration required for all supported destination types. |
The Destination Type object
The Destination Type object contains the information needed to configure a destination.
report_card
OBJECT (DESTINATION REPORT CARD) |
The Destination Report Card object corresponding to the destination’s |
Example object
{
"type": "redshift",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": false
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "redshift",
"access": true
}
}
Get a destination type
Retrieves general information about the configuration required for a destination type.
Note: This endpoint doesn’t retrieve information about the specific configuration of a destination in a single account. Instead, it will return general configuration information for the specified destination type
.
To retrieve specific information about the destination for an account, use the List Destinations endpoint.
Refer to the Destination and source API availability reference for info on the destinations that are available in the API.
Resource list
Request method |
GET |
Resource URL |
/v4/destination-types/{destination_type} |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Arguments
This endpoint accepts the following parameters:
destination_type
STRING REQUIRED |
A path parameter indicating the |
Returns
If successful, the API will return a status of 200 OK
and a Destination Report Card object corresponding to type
.
curl "https://api.stitchdata.com
/v4/destination-types/redshift" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
{
"type": "redshift",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": false
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "redshift",
"access": true
}
}
List all destination types
Retrieves general information about the configuration required for all supported destination types.
Note: This endpoint doesn’t retrieve information about the specific configuration of a destination in a single account. Instead, it will return general configuration information for all supported destination types.
To retrieve specific information about the destination for an account, use the List Destinations endpoint.
Refer to the Destination and source API availability reference for info on the destinations that are available in the API.
Resource list
Request method |
GET |
Resource URL |
/v4/destination-types |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Returns
If successful, the API will return a status of 200 OK
and an array of Destination Report Card objects, one for each supported destination type
.
curl "https://api.stitchdata.com
/v4/destination-types" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
[
{
"type": "azure_sqldw",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "azure_storage_account_token",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "azure_storage_sas_url",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"format": "uri"
},
"provided": false
},
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": false
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "beta",
"protocol": "azure_sqldw",
"access": true
}
},
{
"type": "redshift",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": false
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "redshift",
"access": true
}
},
{
"type": "postgres",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": false
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "ssl",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "boolean"
},
"provided": false
},
{
"name": "sslrootcert",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "postgres",
"access": true
}
},
{
"type": "snowflake",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "role",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "warehouse",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "snowflake",
"access": true
}
},
{
"type": "s3",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "csv_delimiter",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "csv_force_quote",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false
},
{
"name": "output_file_format",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(csv|jsonl)$"
},
"provided": false
},
{
"name": "s3_bucket",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "s3_key_format_string",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "sentinel_key",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string",
"pattern": "^stitch-challenge-file-.*$"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"protocol": "s3",
"access": true
}
},
{
"type": "storagegrid",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "access_key_id",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "csv_delimiter",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "csv_force_quote",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false
},
{
"name": "endpoint",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "output_file_format",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(csv|jsonl)$"
},
"provided": false
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "s3_bucket",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "s3_key_format_string",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "secret_access_key",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "sentinel_key",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string",
"pattern": "^stitch-challenge-file-.*$"
},
"provided": false
}
]
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "enterprise",
"pipeline_state": "alpha",
"protocol": "storagegrid",
"access": false
}
}
]
Destinations
Endpoints
POST | Create a destination |
Creates a new destination. Only a single destination is supported per Stitch client account on a Standard plan. |
PUT | Update a destination |
Updates an existing destination. Modifications to the |
GET | List destinations |
Lists the destinations currently in use for a Stitch account. Only a single destination is supported per Stitch client account on a Standard plan. |
DELETE | Delete a destination |
Deletes an existing destination. Note: Stitch requires a destination to replicate data. Replication will be paused until a new destination is created and has a successful connection. |
The Destination object
An object representing a destination. Destinations are the data warehouses into which Stitch writes data.
Object properties
created_at
TIMESTAMP |
The time at which the destination object was created. |
deleted_at
TIMESTAMP |
The time at which the destination object was deleted. |
display_name
STRING |
The display name of the destination. |
id
INTEGER |
A unique identifier for this destination. |
name
STRING |
The name for the destination. |
paused_at
TIMESTAMP |
If the connection was paused by the user, the time the pause began. Otherwise, or if the connection is active, this will be null. |
properties
OBJECT (CONNECTION PROPERTY) |
Parameters for connecting to the destination, excluding any sensitive credentials. The parameters must adhere to the Note: When included in responses, this object will contain the current values for the destination’s form properties. If an optional property ( |
report_card
OBJECT (DESTINATION REPORT CARD) |
The Report Card object corresponding to the destination’s |
stitch_client_id
INTEGER |
The ID of the Stitch client account associated with the destination. |
system_paused_at
TIMESTAMP |
If the connection was paused by the system, the time the pause began. Otherwise, or if the connection is active, this will be null. |
type
STRING |
The destination type. Must be one of:
|
updated_at
TIMESTAMP |
The time at which the destination object was last updated. |
Example object
{
"description": "Postgres database for the staging environment.",
"properties": {
"database": "demni2mf59dt10",
"encryption_type": "none",
"host": "<HOST>",
"port": "5432",
"ssl": "true",
"status": "1",
"username": "stitch"
},
"updated_at": "2019-05-24T18:04:08Z",
"name": "Staging",
"type": "postgres",
"deleted_at": null,
"system_paused_at": null,
"stitch_client_id": 116078,
"paused_at": null,
"id": 155582,
"display_name": null,
"created_at": "2019-05-24T18:03:50Z",
"report_card": {
"type": "postgres",
"current_step": 2,
"current_step_type": "fully_configured",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": true
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": true
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": true
},
{
"name": "ssl",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "boolean"
},
"provided": true
},
{
"name": "sslrootcert",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
}
]
},
{
"type": "fully_configured",
"properties": []
}
]
}
}
Object properties
connection
OBJECT (CONNECTION PROPERTY) |
Parameters for connecting to the destination, excluding any sensitive credentials. The parameters must adhere to the type of destination. Note: This has been renamed to |
created_at
TIMESTAMP |
The time at which the destination object was created. |
id
INTEGER |
A unique identifier for this destination. |
last_check
TIMESTAMP |
The time the last connection check to the destination completed. Note: This field has been deprecated in v4 of the Destinations endpoint. |
type
STRING |
The destination type. Must be one of:
|
updated_at
TIMESTAMP |
The time at which the destination object was last updated. |
Example object
{
"id":"<DESTINATION_ID>",
"type":"s3",
"created_at":"2018-02-06T15:36:36Z",
"updated_at":"2018-02-06T15:36:36Z",
"connection": {
"s3_bucket":"com-stitch-test-bucket",
"output_file_format":"csv",
"s3_key_format_string":"[integration_name]/[table_name]/[table_version]_[timestamp_loaded].csv",
"csv_delimiter":",",
"csv_force_quote":true,
"sentinel_key":"stitch-challenge-file-af295ad1-7a4b-4881-89dc-c9be27de13a5"
},
"last_check":{
"error":false,
"started_at":"2018-02-06T16:15:19Z",
"completed_at":"2018-02-06T16:16:21Z"
}
}
Create a destination
Creates a new destination. Only a single destination is supported per Stitch client account on a Standard plan.
Refer to the Destination and source API availability reference for info on the destinations that are available in the API.
Resource list
Request method |
POST |
Resource URL |
/v4/destinations |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
type
STRING REQUIRED |
The destination type. Must be one of:
|
properties
OBJECT REQUIRED |
A Connection property object corresponding to the value of |
ignore_unmapped_sources
BOOLEAN OPTIONAL |
Not providing this key or passing |
name
STRING OPTIONAL |
A descriptive name for the destination. This field is optional, but it is recommended to use it. If no name is provided, one will be generated using the destination type. |
description
STRING OPTIONAL |
A description for the destination. |
Returns
If successful, the API will return a status of 200 OK
and a Destination object with a report_card
property.
The report_card
property contains the Destination Report Card object for the destination’s configuration status.
curl -X "POST" "https://api.stitchdata.com
/v4/destinations" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d \
'{
"type":"postgres",
"name": "Staging",
"description": "Postgres database for the staging environment.",
"properties": {
"host":"",
"port":"5432",
"username":"stitch",
"database":"demni2mf59dt10",
"password":"",
"ssl":false
}
}'
{
"description": "Postgres database for the staging environment.",
"properties": {
"database": "demni2mf59dt10",
"encryption_type": "none",
"host": "<HOST>",
"port": "5432",
"ssl": "true",
"status": "1",
"username": "stitch"
},
"updated_at": "2019-05-24T18:04:08Z",
"name": "Staging",
"type": "postgres",
"deleted_at": null,
"system_paused_at": null,
"stitch_client_id": 116078,
"paused_at": null,
"id": 155582,
"display_name": null,
"created_at": "2019-05-24T18:03:50Z",
"report_card": {
"type": "postgres",
"current_step": 2,
"current_step_type": "fully_configured",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": true
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": true
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": true
},
{
"name": "ssl",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "boolean"
},
"provided": true
},
{
"name": "sslrootcert",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
}
]
},
{
"type": "fully_configured",
"properties": []
}
]
}
}
Code | Condition | Response body |
400 |
Accounts can have one destination |
|
400 |
Missing or prohibited arguments |
|
Outdated endpoint version
This isn’t the most current version of the Destinations endpoint and will be deprecated in the future. Use the v4 version instead.
Resource list
Request method |
POST |
Resource URL |
/v3/destinations |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
type
STRING REQUIRED |
The destination type. Must be one of:
|
connection
OBJECT REQUIRED |
A Connection property object corresponding to the value of |
Returns
If successful, the API will return a status of 200 OK
and a Destination object.
curl -X "POST" "https://api.stitchdata.com
/v3/destinations" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d \
'{
"type":"s3",
"connection": {
"s3_bucket":"com-stitch-test-bucket",
"output_file_format":"csv",
"s3_key_format_string":"[integration_name]/[table_name]/[table_version]_[timestamp_loaded].csv",
"csv_delimiter":",",
"csv_force_quote":true
}
}'
{
"id":"<DESTINATION_ID>",
"type":"s3",
"created_at":"2018-02-06T15:36:36Z",
"updated_at":"2018-02-06T15:36:36Z",
"connection": {
"s3_bucket":"com-stitch-test-bucket",
"output_file_format":"csv",
"s3_key_format_string":"[integration_name]/[table_name]/[table_version]_[timestamp_loaded].csv",
"csv_delimiter":",",
"csv_force_quote":true,
"sentinel_key":"stitch-challenge-file-af295ad1-7a4b-4881-89dc-c9be27de13a5"
},
"last_check":{
"error":false,
"started_at":"2018-02-06T16:15:19Z",
"completed_at":"2018-02-06T16:16:21Z"
}
}
Code | Condition | Response body |
400 |
Accounts can have one destination |
|
400 |
Missing or prohibited arguments |
|
Update a destination
Updates an existing destination. Modifications to the type
attribute are not supported.
Resource list
Request method |
PUT |
Resource URL |
/v4/destinations/{destination_id} |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
destination_id
PATH PARAMETER REQUIRED |
A path parameter corresponding to the unique ID of the destination to be updated. |
properties
OBJECT REQUIRED |
A Connection property object corresponding to the value of |
Returns
If successful, the API will return a status of 200 OK
and a Destination object with a report_card
property.
curl -X "PUT" "https://api.stitchdata.com
/v4/destinations/155582" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d \
'{
"properties": {
"username": "stitch_admin"
}
}'
{
"description": "Postgres database for the staging environment.",
"properties": {
"database": "demni2mf59dt10",
"encryption_type": "none",
"host": "<HOST>",
"port": "5432",
"ssl": "true",
"status": "1",
"username": "stitch_admin"
},
"updated_at": "2019-05-28T15:37:37Z",
"check_job_name": "116078.155582.check.859f4746-815e-11e9-bb8e-0693226a5168",
"name": "Staging",
"type": "postgres",
"deleted_at": null,
"system_paused_at": null,
"stitch_client_id": 116078,
"paused_at": null,
"id": 155582,
"display_name": null,
"created_at": "2019-05-24T18:03:50Z",
"report_card": {
"type": "postgres",
"current_step": 2,
"current_step_type": "fully_configured",
"steps": [
{
"type": "form",
"properties": [
{
"name": "database",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "encryption_host",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": false
},
{
"name": "encryption_port",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": false
},
{
"name": "encryption_type",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(ssh|none)$"
},
"provided": true
},
{
"name": "encryption_username",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "host",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "string",
"format": "ipv4"
},
{
"type": "string",
"format": "ipv6"
},
{
"type": "string",
"format": "hostname"
}
]
},
"provided": true
},
{
"name": "password",
"is_required": true,
"is_credential": true,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
},
{
"name": "port",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d+$"
},
"provided": true
},
{
"name": "ssl",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "boolean"
},
"provided": true
},
{
"name": "sslrootcert",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": false
},
{
"name": "username",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string"
},
"provided": true
}
]
},
{
"type": "fully_configured",
"properties": []
}
]
}
}
Code | Condition | Response body |
400 |
Modifications to |
|
400 |
Invalid destination ID |
|
Outdated endpoint version
This isn’t the most current version of the Destinations endpoint and will be deprecated in the future. Use the v4 version instead.
Resource list
Request method |
PUT |
Resource URL |
/v3/destinations/{destination_id} |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
destination_id
PATH PARAMETER REQUIRED |
A path parameter corresponding to the unique ID of the destination to be updated. |
type
STRING REQUIRED |
The destination type. Must be one of:
|
connection
OBJECT REQUIRED |
A Connection property object corresponding to the value of |
Returns
If successful, the API will return a status of 200 OK
and a Destination object.
curl -X "PUT" "https://api.stitchdata.com
/v3/destinations/86741" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d \
'{
"type":"postgres",
"connection": {
"host": "",
"port": 5432,
"username": "",
"database": "",
"password": "",
"ssl": false
}
}'
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"
}
}
Code | Condition | Response body |
400 |
Modifications to |
|
400 |
Invalid destination ID |
|
List destinations
Lists the destinations currently in use for a Stitch account. Only a single destination is supported per Stitch client account on a Standard plan.
Resource list
Request method |
GET |
Resource URL |
/v4/destinations |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Returns
If successful, the API will return a status of 200 OK
and an array of Destination objects, one for each destination connected to the account.
curl "https://api.stitchdata.com
/v4/destinations" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
[
{
"description": "Postgres database for the staging environment.",
"properties":{
"database":"demni2mf59dt10",
"encryption_type":"none",
"host":"<HOST>",
"port":"5432",
"ssl":"true",
"status":"1",
"username":"stitch"
},
"updated_at":"2019-05-24T18:04:08Z",
"name":"Staging",
"type":"postgres",
"deleted_at":null,
"system_paused_at":null,
"stitch_client_id":116078,
"paused_at":null,
"id":155582,
"display_name":null,
"created_at":"2019-05-24T18:03:50Z",
"report_card":{
"type":"postgres",
"current_step":2,
"current_step_type":"fully_configured",
"steps":[
{
"type":"form",
"properties":[
{
"name":"database",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string"
},
"provided":true
},
{
"name":"encryption_host",
"is_required":false,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"anyOf":[
{
"type":"string",
"format":"ipv4"
},
{
"type":"string",
"format":"ipv6"
},
{
"type":"string",
"format":"hostname"
}
]
},
"provided":false
},
{
"name":"encryption_port",
"is_required":false,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string",
"pattern":"^\\d+$"
},
"provided":false
},
{
"name":"encryption_type",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string",
"pattern":"^(ssh|none)$"
},
"provided":true
},
{
"name":"encryption_username",
"is_required":false,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string"
},
"provided":false
},
{
"name":"host",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"anyOf":[
{
"type":"string",
"format":"ipv4"
},
{
"type":"string",
"format":"ipv6"
},
{
"type":"string",
"format":"hostname"
}
]
},
"provided":true
},
{
"name":"password",
"is_required":true,
"is_credential":true,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string"
},
"provided":true
},
{
"name":"port",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string",
"pattern":"^\\d+$"
},
"provided":true
},
{
"name":"ssl",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"boolean"
},
"provided":true
},
{
"name":"sslrootcert",
"is_required":false,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string"
},
"provided":false
},
{
"name":"username",
"is_required":true,
"is_credential":false,
"system_provided":false,
"property_type":"user_provided",
"json_schema":{
"type":"string"
},
"provided":true
}
]
},
{
"type":"fully_configured",
"properties":[
]
}
]
}
}
]
Outdated endpoint version
This isn’t the most current version of the Destinations endpoint and will be deprecated in the future. Use the v4 version instead.
Resource list
Request method |
GET |
Resource URL |
/v3/destinations |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Returns
If successful, the API will return a status of 200 OK
and an array (of length zero or one) of Destination objects.
curl "https://api.stitchdata.com
/v3/destinations" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
[
{
"id":"<DESTINATION_ID>",
"type":"redshift",
"created_at":"2018-02-06T15:36:36Z",
"updated_at":"2018-02-06T15:36:36Z",
"connection": {
"host":"<HOST>",
"port":5439,
"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"
}
}
]
Delete a destination
Deletes an existing destination.
Note: Stitch requires a destination to replicate data. Replication will be paused until a new destination is created and has a successful connection.
Resource list
Request method |
DELETE |
Resource URL |
/v4/destinations/{destination_id} |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Errors |
See the Errors tab, below. |
Arguments
This endpoint accepts the following parameters:
destination_id
PATH PARAMETER REQUIRED |
A path parameter corresponding to the unique ID of the destination to be deleted. |
Returns
If successful, the API will return a status of 200 OK
and an empty body.
curl -X DELETE https://api.stitchdata.com/v4/destinations/155582 \
-H "Authorization: Bearer " \
-H "Content-Type: application/json"
{}
Code | Condition | Response body |
400 |
Invalid destination ID |
May result from an incorrect destination ID, or if the destination has already been deleted. |
404 |
Destination ID not provided |
Occurs when a destination ID argument isn’t included in the request URL. Below is an incorrectly formatted request URL:
This is correct:
|
404 |
Destination ID contains illegal characters |
Occurs when a destination ID argument includes illegal characters, such as letters. For example:
|
Not available in this version
This method isn’t available in version 3 of the Destinations endpoint. Use the v4 version to use this method.
Source Types
Endpoints
GET | Get a source type |
Retrieves general information about the configuration required for a data source type. |
GET | List all source types |
Retrieves general information about the configuration required for all supported data source types. |
The Source Type object
The Source Type object contains the information needed to configure a data source.
report_card
OBJECT (SOURCE REPORT CARD) |
The Source Report Card object corresponding to the source’s |
Example object
{
"type": "platform.hubspot",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "anchor_time",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"format": "date-time"
},
"provided": false,
"tap_mutable": false
},
{
"name": "cron_expression",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": null,
"provided": false,
"tap_mutable": false
},
{
"name": "email_chunk_size",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string",
"pattern": "^\\d+"
}
]
},
"provided": false,
"tap_mutable": false
},
{
"name": "frequency_in_minutes",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^1$|^30$|^60$|^360$|^720$|^1440$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "image_version",
"is_required": true,
"is_credential": false,
"system_provided": true,
"property_type": "read_only",
"json_schema": null,
"provided": false,
"tap_mutable": false
},
{
"name": "include_inactives",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "require_content_scope",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "start_date",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "subscription_chunk_size",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string",
"pattern": "^\\d+"
}
]
},
"provided": false,
"tap_mutable": false
}
]
},
{
"type": "oauth",
"properties": [
{
"name": "client_id",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
},
{
"name": "client_secret",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
},
{
"name": "redirect_uri",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string",
"format": "uri"
},
"provided": false,
"tap_mutable": false
},
{
"name": "refresh_token",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
}
]
},
{
"type": "discover_schema",
"properties": []
},
{
"type": "field_selection",
"properties": []
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"default_start_date": "-30 days",
"default_scheduling_interval": 30,
"protocol": "platform.hubspot",
"access": true,
"image_version": "2.latest"
},
"upgrade_available": null
}
Get a source type
Retrieves general information about the configuration required for a data source type.
Note: This endpoint doesn’t retrieve information about the specific configuration of sources in a single account. Instead, it will return general configuration information for the specified source source_type
.
To retrieve information about a specific data source, use the Get a Source endpoint.
Refer to the Destination and source API availability reference for info on the sources that are available in the API.
Resource list
Request method |
GET |
Resource URL |
/v4/source-types/{source_type} |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Arguments
This endpoint accepts the following parameters:
source_type
STRING REQUIRED |
A path parameter indicating the |
Returns
If successful, the API will return a status of 200 OK
and a Source Report Card object corresponding to type
.
curl "https://api.stitchdata.com
/v4/source-types/platform.hubspot" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'
{
"type": "platform.hubspot",
"current_step": 1,
"current_step_type": "form",
"steps": [
{
"type": "form",
"properties": [
{
"name": "anchor_time",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"format": "date-time"
},
"provided": false,
"tap_mutable": false
},
{
"name": "cron_expression",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": null,
"provided": false,
"tap_mutable": false
},
{
"name": "email_chunk_size",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string",
"pattern": "^\\d+"
}
]
},
"provided": false,
"tap_mutable": false
},
{
"name": "frequency_in_minutes",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^1$|^30$|^60$|^360$|^720$|^1440$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "image_version",
"is_required": true,
"is_credential": false,
"system_provided": true,
"property_type": "read_only",
"json_schema": null,
"provided": false,
"tap_mutable": false
},
{
"name": "include_inactives",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "require_content_scope",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^(true|false)$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "start_date",
"is_required": true,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
},
"provided": false,
"tap_mutable": false
},
{
"name": "subscription_chunk_size",
"is_required": false,
"is_credential": false,
"system_provided": false,
"property_type": "user_provided",
"json_schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string",
"pattern": "^\\d+"
}
]
},
"provided": false,
"tap_mutable": false
}
]
},
{
"type": "oauth",
"properties": [
{
"name": "client_id",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
},
{
"name": "client_secret",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
},
{
"name": "redirect_uri",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string",
"format": "uri"
},
"provided": false,
"tap_mutable": false
},
{
"name": "refresh_token",
"is_required": true,
"is_credential": true,
"system_provided": true,
"property_type": "system_provided_by_default",
"json_schema": {
"type": "string"
},
"provided": false,
"tap_mutable": false
}
]
},
{
"type": "discover_schema",
"properties": []
},
{
"type": "field_selection",
"properties": []
},
{
"type": "fully_configured",
"properties": []
}
],
"details": {
"pricing_tier": "standard",
"pipeline_state": "released",
"default_start_date": "-30 days",
"default_scheduling_interval": 30,
"protocol": "platform.hubspot",
"access": true,
"image_version": "2.latest"
},
"upgrade_available": null
}
List all source types
Retrieves general information about the configuration required for all supported data source types.
Note: This endpoint doesn’t retrieve information about the specific configuration of sources in a single account. Instead, it will return general configuration information for all supported source types.
To retrieve specific information about all data sources for an account, use the List Sources endpoint.
Refer to the Destination and source API availability reference for info on the sources that are available in the API.
Resource list
Request method |
GET |
Resource URL |
/v4/source-types |
Authorization |
Required. The request header must contain Authorization and your access token. |
Request header |
The request header must contain the following:
See the Request tab below for an example request. |
Rate limit |
None |
Request body |
The request body must be valid JSON and contain the required arguments. |
Pagination |
None |
Response format |
Whether the request succeeds or fails, the API will return JSON. |
Returns
If successful, the API will return a status of 200 OK
and an array of Source Report Card objects, one for each supported source type
.
curl "https://api.stitchdata.com
/v4/source-types" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json'