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:

GET /v4/sources
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 will 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_
  • Definition: 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.

  • Required for: All API requests, except for Create an account

  • Obtained by: Refer to the Obtain an API access token section

  • Expiration: None

Partner ID oc_
  • Definition: The unique ID for your partner application, obtained after an interest form is submitted to and approved by Stitch.

  • Required for: Requests to the Create an account endpoint

  • Obtained by: Submitting an interest form and being approved by Stitch as a partner

  • Expiration: None

Partner secret oc_
  • Definition: The key associated with your partner application, obtained after an interest form is submitted to and approved by Stitch.

  • Required for: Requests to the Create an account endpoint

  • Obtained by: Submitting an interest form and being approved by Stitch as a partner

  • Expiration: None

Ephemeral token Not applicable
  • Definition: A token passed to the Connect JavaScript client to create a session in the Stitch web application and log a user into a Stitch client account.

  • Required for: Creating a temporary Stitch session using the Connect JavaScript client

  • Obtained by: A successful request to the Create a session endpoint

  • Expiration: One hour after generation

Session token Not applicable
  • Definition: A token used to create a temporary Stitch session for the user for whom the exchanged ephemeral token was created.

  • Required for: Creating a temporary Stitch session using the Connect JavaScript client

  • Obtained by: Exchanging a valid ephemeral token in a Connect JavaScript function

  • Expiration: Upon session termination or after 12 hours, whichever is first


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:

  • The URI requested is invalid
  • The requested resource, such as a specific source, doesn’t exist
  • Method is not allowed by the endpoint
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:

GET /v4/{stitch_client_id}/extractions
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:

Example of pagination and shifting records to different pages

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.


OBJECT

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"
}

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.

Resource list
Request method

POST

Resource URL

/v3/accounts

Authorization

Required. The request body must contain your partner credentials (partner_id, partner_secret).

Request header

The request header must contain the following:

  • Content-Type: Must specify JSON, e.g. application/json

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:

  • us-east-1

  • eu-central-1

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.

POST /v3/accounts
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"
}'
Response for POST /v3/accounts
{
  "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.

{
  "code":"ExistingUser",
  "message":"This email address is already associated with an active user."
}
400

Request body contains malformed data.

{
  "code":"BadRequest",
  "message":"Invalid form data.",
  "errors":{}
}
400

Missing or invalid partner_id.

{
  "code": "BadRequest",
  "message": "Invalid form data.",
  "errors": {
    "partner_id": "required"
  }
}
400

Missing or invalid partner_secret.

{
  "code": "BadRequest",
  "message": "Invalid form data.",
  "errors": {
    "partner_secret": "required"
  }
}


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.


OBJECT

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>"
}

POST

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

POST /v3/sessions/ephemeral
curl -X "POST" "https://api.stitchdata.com/v3/sessions/ephemeral" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for POST /v3/sessions/ephemeral
{
  "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.


OBJECT

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 type. For example: s3 or snowflake.

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

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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 type of destination to retrieve, such as s3 or redshift.

Returns

If successful, the API will return a status of 200 OK and a Destination Report Card object corresponding to type.

GET /v4/destination-types/{destination_type}
curl "https://api.stitchdata.com/v4/destination-types/redshift" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v4/destination-types/{destination_type}
{
  "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

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

GET /v4/destination-types
curl "https://api.stitchdata.com/v4/destination-types" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v4/destination-types
[
  {
    "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.

PUT Update a destination

Updates an existing destination. Modifications to the type attribute are not supported.

GET List destinations

Lists the destination currently in use for a Stitch account. Only a single data warehouse is supported per Stitch client account.

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.


OBJECT

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 type of destination.

Note: When included in responses, this object will contain the current values for the destination’s form properties. If an optional property (is_required: false) has not been provided, it will not be present in this object.

report_card
OBJECT (DESTINATION REPORT CARD)

The Report Card object corresponding to the destination’s type. For example: postgres or redshift.

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:

  • azure_sqldw

  • bigquery_v2

  • databricks_delta

  • panoply

  • postgres

  • redshift

  • s3

  • snowflake

updated_at
TIMESTAMP

The time at which the destination object was last updated.

Example object
{
  "properties": {
    "database": "demni2mf59dt10",
    "encryption_type": "none",
    "host": "<HOST>",
    "port": "5432",
    "ssl": "true",
    "status": "1",
    "username": "stitch"
  },
  "updated_at": "2019-05-24T18:04:08Z",
  "name": "Default Warehouse",
  "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 properties in v4 of the Destinations endpoint.

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:

  • azure_sqldw

  • bigquery_v2

  • databricks_delta

  • panoply

  • postgres

  • redshift

  • s3

  • snowflake

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"
  }
}

POST

Create a destination

Creates a new destination. Only a single destination is supported per Stitch client account.

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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:

  • azure_sqldw

  • bigquery_v2

  • databricks_delta

  • panoply

  • postgres

  • redshift

  • s3

  • snowflake

properties
OBJECT
REQUIRED

A Connection property object corresponding to the value of type.

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.

POST /v4/destinations
curl -X "POST" "https://api.stitchdata.com/v4/destinations" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json' \
     -d \
'{
  "type":"postgres",
  "properties": {
    "host":"",
    "port":"5432",
    "username":"stitch",
    "database":"demni2mf59dt10",
    "password":"",
    "ssl":false
    }
 }'
Response for POST /v4/destinations
{
  "properties": {
    "database": "demni2mf59dt10",
    "encryption_type": "none",
    "host": "<HOST>",
    "port": "5432",
    "ssl": "true",
    "status": "1",
    "username": "stitch"
  },
  "updated_at": "2019-05-24T18:04:08Z",
  "name": "Default Warehouse",
  "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

an account can have at most one destination

400

Missing or prohibited arguments

POST body may only include a type and map of properties

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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:

  • azure_sqldw

  • bigquery_v2

  • databricks_delta

  • panoply

  • postgres

  • redshift

  • s3

  • snowflake

connection
OBJECT
REQUIRED

A Connection property object corresponding to the value of type.

Returns

If successful, the API will return a status of 200 OK and a Destination object.

POST /v3/destinations
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
    }
 }'
Response for POST /v3/destinations
{
  "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

an account can have at most one destination

400

Missing or prohibited arguments

body must be a map with type = redshift, postgres, or snowflake. required-keys = type, connection


PUT

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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 type.

Returns

If successful, the API will return a status of 200 OK and a Destination object with a report_card property.

PUT /v4/destinations/{destination_id}
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"
    }
}'
Response for PUT /v4/destinations/{destination_id}
{
  "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": "Default Warehouse",
  "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 type are unsupported

this API endpoint does not support modifying destination type

400

Invalid destination ID

invalid connection id

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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:

  • azure_sqldw

  • bigquery_v2

  • databricks_delta

  • panoply

  • postgres

  • redshift

  • s3

  • snowflake

connection
OBJECT
REQUIRED

A Connection property object corresponding to the value of type.

Returns

If successful, the API will return a status of 200 OK and a Destination object.

PUT /v3/destinations/{destination_id}
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
      }
  }'
Response for PUT /v3/destinations/{destination_id}
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 type are unsupported

this API endpoint does not support modifying destination type

400

Invalid destination ID

invalid connection id


GET

List destinations

Lists the destination currently in use for a Stitch account. Only a single data warehouse is supported per Stitch client account.

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

Note: Stitch currently supports only one destination per account.

GET /v4/destinations
curl "https://api.stitchdata.com/v4/destinations" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v4/destinations
[
   {
      "properties":{
         "database":"demni2mf59dt10",
         "encryption_type":"none",
         "host":"<HOST>",
         "port":"5432",
         "ssl":"true",
         "status":"1",
         "username":"stitch"
      },
      "updated_at":"2019-05-24T18:04:08Z",
      "name":"Default Warehouse",
      "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":[

               ]
            }
         ]
      }
   }
]
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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

GET /v3/destinations
curl "https://api.stitchdata.com/v3/destinations" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v3/destinations
[
  {  
    "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

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

DELETE /v4/destinations/{destination_id}

curl -X DELETE https://api.stitchdata.com/v4/destinations/155582 \
     -H "Authorization: Bearer " \
     -H "Content-Type: application/json"
Response for DELETE /v4/destinations/{destination_id}
{}
Code Condition Response body
400

Invalid destination ID

Unable to locate dest (<DESTINATION_ID>) for client (<ACCOUNT_ID>) to delete

May result from an incorrect destination ID, or if the destination has already been deleted.

502

Destination ID not provided

Occurs when a destination ID argument isn’t included in the request URL. Below is an incorrectly formatted request URL:

https://api.stitchdata.com/v4/destinations/{destination_id

This is correct:

https://api.stitchdata.com/v4/destinations/{destination_id
502

Destination ID contains illegal characters

Occurs when a destination ID argument includes illegal characters, such as letters. For example:

https://api.stitchdata.com/v4/destinations/{destination_id


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.


OBJECT

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 type. For example: platform.marketo or platform.hubspot.

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
  }
}

GET

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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 type of source to retrieve, such as platform.hubspot or platform.marketo.

Returns

If successful, the API will return a status of 200 OK and a Source Report Card object corresponding to type.

GET /v4/source-types/{source_type}
curl "https://api.stitchdata.com/v4/source-types/platform.hubspot" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v4/source-types/{source_type}
{
  "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
  }
}

GET

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:

  • Authorization: Must specify Bearer Auth, e.g. Bearer: <ACCESS_TOKEN>

  • Content-Type: Must specify JSON, e.g. application/json

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.

GET /v4/source-types
curl "https://api.stitchdata.com/v4/source-types" \
     -H 'Authorization: Bearer [ACCESS_TOKEN]' \
     -H 'Content-Type: application/json'
Response for GET /v4/source-types