Introduction

The Stitch Connect API enables you to seamlessly integrate Stitch’s data pipeline functionality into your own platform. 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 and access Stitch client accounts
  • Create and update destinations
  • Create and update data sources
  • Select streams and fields from data sources for replication

Check out the tutorials and resources to learn how to leverage Stitch functionality in your applications.

Accessing the API

To use the API, you’ll need partner credentials. These are necessary for authenticating successfully.

To request access, please complete and submit this form.

Terminology

Stitch client account

An individual account for the Stitch web application.

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.

Structure sync

The first step in the replication process, this process will detect 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.

Quick Start

Step 1: Register as an API client

Request access by completing this form. Once approved, you’ll receive a partner_id and partner_key for authenticating your API calls.

Step 2: Obtain an access token

After you receive your partner_id and partner_key, you’ll need to obtain an access token. Calls to the API are authenticated with an access token associated with a Stitch account. Your application can get an access token in one of two ways:

Either method will provide your application with an access token and a Stitch client ID. This information should be stored somewhere safe and passed into the header of every API request for the Stitch client’s account. The token will never expire, but the user may revoke access at any time.

Keep in mind that Stitch client accounts are both owned and managed by the users themselves. For more information on authenticating with the API, refer to the Authentication guide.

Step 3: Create a destination

If you’re providing a destination for the Stitch client’s account, we recommend connecting the destination immediately after the account is created. This ensures that Stitch will have a place to load replicated data as soon as data sources are added.

The first step to creating a destination is providing the attributes required for the destination’s configuration, or form. These attributes are passed in the body of your request as the properties argument, along with the destination’s type:

curl -X POST https://api.stitchdata.com/v4/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"redshift",
          "properties": {
            "host": "<HOST>",
            "port": 5439,
            "username": "<USERNAME>",
            "database": "<DATABASE>",
            "password": "<PASSWORD>",
            "ssl": false
            }
         }"

Refer to the Destination Form Properties object to retrieve the attributes required for the properties argument for each destination type. Note: Each destination has its own unique configuration and set of form attributes.

Step 4: Create a source

Source creation is performed through a sequence of connection steps. The required steps and the order of those steps are unique to the source type and are defined in its Report Card object. All source creation, however, begins at the form step.

In the example below, we’ll use the Source Types endpoint to retrieve the source form properties for HubSpot, which has a type of platform.hubspot.

Step 4.1: Get the source's Report Card

Using the Source Types endpoint, retrieve the report card for platform.hubspot:

curl -X GET https://api.stitchdata.com/v4/source-types/platform.hubspot
     -H 'Authorization: Bearer <ACCESS_TOKEN>'

The response, or the report card for platform.hubspot, will include HubSpot’s Source Form Properties. These are the parameters that are required to complete a source’s form step.

Step 4.2: Locate required form properties in the Report Card

Use the response from the previous step to locate the required properties for the form step.

Note: You do not have to provide system-provided properties to create a source.

{  
   "type":"platform.hubspot",
   "current_step":1
   "steps":[  
      {  
         "type":"form",                                 /* form step */
         "properties":[
            {  
               "name":"image_version",                  /* system-provided property */
               "required_to_be_fully_configured":true,
               "provided":false,
               "is_credential":false,
               "system_provided":true
            },
            {  
               "name":"frequency_in_minutes",           /* required property */
               "required_to_be_fully_configured":true,
               "provided":false,
               "is_credential":false,
               "system_provided":false
            },
            {  
               "name":"start_date",                     /* required property */
               "required_to_be_fully_configured":true,
               "provided":false,
               "is_credential":false,
               "system_provided":false
            }
         ]
      },
      {  
         "type":"oauth",
         "properties":[...]
      },
      {  
         "type":"discover_schema",
         "properties":[ ]
      },
      {  
         "type":"field_selection",
         "properties":[ ]
      },
      {  
         "type":"fully_configured",
         "properties":[ ]
      }
   ]
}

For platform.hubspot, the frequency_in_minutes and start_date properties must be provided to complete the form step.

Step 4.3: Create the source

Now that the required properties for HubSpot have been retrieved, we can create the HubSpot source:

  curl -X POST https://api.stitchdata.com/v4/sources
       -H "Authorization: Bearer <ACCESS_TOKEN>" 
       -H "Content-Type: application/json"
       -d "{  
               "type":"platform.hubspot",
               "display_name":"HubSpot",
               "properties":{  
                  "start_date":"2018-01-01T00:00:00Z",
                  "frequency_in_minutes":"30"
               }
            }"

If successful, the API will return a 200 OK status and a Source object with a report_card property:

{
   "properties":{
      "frequency_in_minutes":"30",
      "image_version":"1.latest",
      "start_date":"2018-01-01T00:00:00Z"
   },
   "updated_at":"2018-02-06T16:25:06Z",
   "check_job_name":null,
   "name":"hubspot",
   "type":"platform.hubspot",
   "deleted_at":null,
   "system_paused_at":null,
   "stitch_client_id":<ACCOUNT_ID>,
   "paused_at":null,
   "id":45612,
   "display_name":"HubSpot",
   "created_at":"2018-02-06T16:25:06Z",
   "report_card":{
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[
         {
            "type":"form",
            "properties":[
               {
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {
            "type":"oauth",
            "properties":[
               {
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"redirect_uri",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string",
                     "format":"uri"
                  }
               },
               {
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               }
            ]
         },
         {
            "type":"discover_schema",
            "properties":[

            ]
         },
         {
            "type":"field_selection",
            "properties":[

            ]
         },
         {
            "type":"fully_configured",
            "properties":[

            ]
         }
      ]
   }
}

After a source’s form is created, the report_card object within the source should be used to complete its configuration.

Step 4.4: Identify the current step

The Source Report Card object provides information about the steps required to configure the connection, their sequence, and the progress towards completing the steps.

Looking at the report card for our HubSpot source, we can see that we’re now on step 2 of configuration, which is the oauth step:

{
   "report_card":{
      "type":"platform.hubspot",
      "current_step":2,                                           /* Current step */
      "steps":[
         {
            "type":"form",
            "properties":[ ... ]
         },
         {
            "type":"oauth",
            "properties":[
               {
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"redirect_uri",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string",
                     "format":"uri"
                  }
               },
               {
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               }
            ]
         },
         {
            "type":"discover_schema",
            "properties":[ ]
         },
         {
            "type":"field_selection",
            "properties":[ ]
         },
         {
            "type":"fully_configured",
            "properties":[ ]
         }
      ]
   }
}

Step 5: Use the Connect JavaScript Client to complete source configuration

To initiate the OAuth flow, use the authorizeSource function in the Connect JavaScript Client. This function expects an options argument containing the source’s id:

Stitch.authorizeSource({
    "id": 45612
}).then((result) => {
    console.log(`Integration created, type=${result.type}, id=${result.id}`);
}).catch((error) => {
    console.log("Integration not created.", error);
});

This function will send the user to Stitch, where they will be prompted to sign into their Stitch account and grant access to HubSpot.

After the user grants access, Stitch will automatically prompt the user to complete the remaining steps to configure the source, including selecting table and field for replication.

Authentication

Authenticate your calls to the API by providing an access token in your requests. Each access token is associated with a single Stitch client account. Access tokens do not expire, but they may be revoked by the user at any time.

Additionally, each request’s permissions are limited to that Stitch client account.

In the examples in this documentation, we use bearer auth:

curl -X GET https://api.stitchdata.com/v4/sources
     -H "Authorization: Bearer <ACCESS_TOKEN>"

Before you can make requests, you must complete this form. Once approved, you’ll receive the credentials required to authenticate your API calls.

All requests must be made over HTTPS or they will fail. API requests that don’t contain authentication will also fail.

Generate access tokens

Access tokens are obtained by performing an OAuth2 handshake with an existing Stitch client account or by creating a new account via the API.

New Stitch clients

As an API client, you can create a new Stitch client account with the Create Account endpoint:

curl -X POST https://api.stitchdata.com/v3/accounts
     -H "Content-Type: application/json"
     -d "{
          "email": "stitch-api-test@stitchdata.com",
          "last_name": "Product Team",
          "partner_id": "<PARTNER_ID>",
          "first_name": "Stitch",
          "partner_secret": "<PARTNER_SECRET>",
          "company": "Stitch Product Team"
        }"

When successful, this endpoint returns a status of 200 OK and an access token:

{
  "access_token":"<ACCESS_TOKEN>"
}

The created account is owned and managed by the user it is created for, and that user will be able to login to the Stitch web interface and receive emails from Stitch.

Existing Stitch clients, using OAuth2

You can connect to a user’s existing Stitch client account by having the user complete a standard OAuth flow. Before generating OAuth tokens, registering your application with Stitch.

Then, follow these steps to complete the OAuth flow:

Step 1: Send the user to Stitch

To initiate the authorization flow, the user will click a link to Stitch that includes your application’s API client ID. This is the partner_id you obtained when you registered your application:

https://app.stitchdata.com/oauth/authorization?client_id={CLIENT_ID}

While only your client_id (partner_id) is required, the URL may also include the following parameters:

client_id
REQUIRED

Your application’s client ID. This is the partner_id that is obtained when your API access request is approved.

redirect_uri
OPTIONAL

The callback URL for your application, which will be used in Step 3.

Note: If provided in Step 1 as a URL parameter, then the value must match one of the redirect URIs provided with your application’s registration.

If not provided in Step 1 as a URL parameter, Stitch will fallback to the first redirect_uri associated with your API client.

email
OPTIONAL

The email address of the Stitch client owner. If provided, this value will be used to pre-populate the signup form.

first_name
OPTIONAL

The user’s first name. If provided, this value will be used to pre-populate the signup form.

last_name
OPTIONAL

The user’s last name. If provided, this value will be used to pre-populate the signup form.

company
OPTIONAL

The name of the company or organization to associate with the Stitch client account. If provided, this value will be used to pre-populate the signup form.

If the user isn’t already logged into their Stitch client account, they will be prompted to do so or create a new account, if need be.

Once logged in, the user will be shown a screen explaining that your application has requested access to their Stitch account. They will be prompted to accept or reject this request.

Step 3: Callback to your application

When the user accepts or denies the request, they will be re-directed to the callback URL you provided when you registered your application with Stitch.

If the user denies the request, Stitch will include error details:

https://yourapplication.com/callback?error=access_denied

If the user accepts the request, the callback will include a temporary authorization code to be used in the next step:

https://yourapplication.com/callback?code=AUTHORIZATION_CODE
Step 4: Exchange tokens

Lastly, when your application receives the user’s request to the callback URL, it should make a request to the Stitch OAuth URL to exchange the temporary authorization code for a permanent access token:

curl https://api.stitchdata.com/oauth/token 
     -d client_secret=<CLIENT_SECRET>
     -d code=<AUTHORIZATION_CODE>
     -d grant_type=authorization_code

Note: Each temporary authorization code can only be used once and will expire five minutes after creation.

If successful, Stitch will respond with the following:

{
  "token_type": "bearer",
  "access_token": <ACCESS_TOKEN>,
  "stitch_account_id": <STITCH_ACCOUNT_ID>
}

Your application should store the access_token and stitch_account_id somewhere secure, and use them to make calls to the API:

curl GET https://api.stitchdata.com/v4/sources
     -H 'Authorization: Bearer <ACCESS_TOKEN>'

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.

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
Version Endpoints
v4 (latest)
v3
SOURCE TYPE
Version Endpoints
v4 (latest)
DESTINATION TYPE
Version Endpoints
v4 (latest)
SOURCE
Version Endpoints
v4 (latest)
CONNECTION CHECK
Version Endpoints
v4 (latest)
STREAM
Version Endpoints
v4 (latest)

Core Objects

Accounts

OBJECT Account Object

An object representing a Stitch client account.

POST Create an account

Creates a new Stitch client account and receives an API access token in return.

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.


POST

Create an account

Creates a new Stitch client account and receives an API access token in return.

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

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

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.

Returns

If successful, the API will return a status of 200 OK and an access_token property containing an API access token for the Stitch client’s account will be returned.

Otherwise, an error will be returned. For example: If a Stitch client account associated with the user already exists, the request will return This email address is already associated with an active user. See the Errors tab below for additional possibilities.

curl -X POST https://api.stitchdata.com/v3/accounts
     -H "Content-Type: application/json"
     -d "{
          "email": "stitch-api-test@stitchdata.com",
          "last_name": "Product Team",
          "partner_id": "<PARTNER_ID>",
          "first_name": "Stitch",
          "partner_secret": "<PARTNER_SECRET>",
          "company": "Stitch Product Team"
        }"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
  "access_token":"<ACCESS_TOKEN>"
}
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":{}
}


Sessions

OBJECT Session Object

This object represents a browser session in the Stitch web application.

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.


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.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Returns

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

curl -X POST https://api.stitchdata.com/v3/sessions/ephemeral
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
  "ephemeral_token":"<EPHEMERAL_TOKEN>"
}


Destinations

OBJECT Destination Object

An object representing a destination. Destinations are the data warehouses into which Stitch writes data.

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.

created_at
TIMESTAMP

The time at which the destination object was created.

deleted_at
TIMESTAMP

The time at which the destination object was deleted.

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 (DESTINATION FORM PROPERTIES)

Parameters for connecting to the destination, excluding any sensitive credentials.

The parameters must adhere to the type of destination.

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.

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:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

updated_at
TIMESTAMP

The time at which the destination object was last updated.

connection
OBJECT (DESTINATION FORM PROPERTIES)

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:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

updated_at
TIMESTAMP

The time at which the destination object was last updated.


POST

Create a destination

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

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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

type
STRING
REQUIRED

The destination type. Must be one of:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

properties
OBJECT
REQUIRED

A Destination Form Properties 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.

Create a PostgreSQL destination:

curl -X POST https://api.stitchdata.com/v4/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"postgres",
          "properties": {
            "host":"<HOST>",
            "port":5432,
            "username":"<USERNAME>",
            "database":"<DATABASE>",
            "password":"<PASSWORD>",
            "ssl":false
            }
         }"

PostgreSQL destination response:

{
  "properties": {
    "database": "<DATABASE>",
    "host": "<HOST>",
    "port": "5432",
    "username": "<USERNAME>"
  },
  "updated_at": "2019-01-09T22:16:23Z",
  "check_job_name": null,
  "name": "Default Warehouse",
  "type": "postgres",
  "deleted_at": null,
  "system_paused_at": null,
  "stitch_client_id": <CLIENT_ID>,
  "paused_at": null,
  "id": <DESTINATION_ID>,
  "created_at": "2019-01-09T22:16:23Z",
  "report_card": {
    "type": "postgres",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "database",
            "is_required": true,
            "provided": true,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "encryption_host",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "encryption_port",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "encryption_type",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(ssh|none)$"
            }
          },
          {
            "name": "encryption_username",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "is_required": true,
            "provided": true,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "password",
            "is_required": true,
            "provided": true,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": true,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "ssl",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sslrootcert",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "is_required": true,
            "provided": true,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          }
        ]
      },
      {
        "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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

type
STRING
REQUIRED

The destination type. Must be one of:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

connection
OBJECT
REQUIRED

A Destination Form Properties object corresponding to the value of type.

Returns

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

Create an Amazon S3 destination:

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

Create an Amazon Redshift destination:

curl -X POST https://api.stitchdata.com/v3/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"redshift",
          "connection": {
            "host":"<HOST>",
            "port":5439,
            "username":"<USERNAME>",
            "database":"<DATABASE>",
            "password":"<PASSWORD>",
            "ssl":false
            }
         }"

Create a PostgreSQL destination:

curl -X POST https://api.stitchdata.com/v3/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"postgres",
          "connection": {
            "host":"<HOST>",
            "port":5432,
            "username":"<USERNAME>",
            "database":"<DATABASE>",
            "password":"<PASSWORD>",
            "ssl":false
            }
         }"

Create a Snowflake destination:

curl -X POST https://api.stitchdata.com/v3/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"snowflake",
          "connection": {
            "host":"<HOST>",
            "port":443,
            "user":"<USERNAME>",
            "warehouse":"<WAREHOUSE>",
            "database":"<DATABASE>",
            "password":"<PASSWORD>",
            "role":"<OPTIONAL_ROLE>",
            "ssl":false
            }
         }"

Amazon S3 destination response:

Note: There are additional steps to creating an Amazon S3 destination beyond submitting a successful request to this endpoint. Refer to the Amazon S3 Destination Form Property documentation for more info.

HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

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

Amazon Redshift destination response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

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

PostgreSQL destination response:

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-06T15:36:36Z",
  "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"
  }
}

Snowflake destination response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
  "id":"<DESTINATION_ID>",
  "type":"snowflake",
  "created_at":"2018-02-06T15:36:36Z",
  "updated_at":"2018-02-06T15:36:36Z",
  "connection": {
      "host":"<HOST>",
      "port":443,
      "user":"<USERNAME>",
      "warehouse":"<WAREHOUSE>",
      "database":"<DATABASE>",
      "password":"<PASSWORD>",
      "role":"<OPTIONAL_ROLE>",
      "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

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/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

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:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

properties
OBJECT
REQUIRED

A Destination Form Properties 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.

curl -X PUT https://api.stitchdata.com/v4/destinations/{id}
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"postgres",
          "properties": {
            "host": "<HOST>",
            "port": 5432,
            "username": "<USERNAME>",
            "database": "<DATABASE>",
            "password": "<PASSWORD>",
            "ssl": false
            }
        }"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

[
  {
    "properties": {
      "database": "<DATABASE>",
      "host": "<HOST>",
      "port": "5432",
      "username": "<USERNAME>"
    },
    "updated_at": "2019-01-10T16:46:50Z",
    "name": "Default Warehouse",
    "type": "postgres",
    "deleted_at": null,
    "system_paused_at": null,
    "stitch_client_id": <CLIENT_ID>,
    "paused_at": null,
    "id": 120603,
    "created_at": "2019-01-10T16:46:50Z",
    "report_card": {
      "type": "postgres",
      "current_step": 1,
      "steps": [
        {
          "type": "form",
          "properties": [
            {
              "name": "database",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "encryption_host",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "ipv4"
                  },
                  {
                    "type": "string",
                    "format": "ipv6"
                  },
                  {
                    "type": "string",
                    "format": "hostname"
                  }
                ]
              }
            },
            {
              "name": "encryption_port",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^\\d+$"
              }
            },
            {
              "name": "encryption_type",
              "is_required": true,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^(ssh|none)$"
              }
            },
            {
              "name": "encryption_username",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "host",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "ipv4"
                  },
                  {
                    "type": "string",
                    "format": "ipv6"
                  },
                  {
                    "type": "string",
                    "format": "hostname"
                  }
                ]
              }
            },
            {
              "name": "password",
              "is_required": true,
              "provided": true,
              "is_credential": true,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "port",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^\\d+$"
              }
            },
            {
              "name": "ssl",
              "is_required": true,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "boolean"
              }
            },
            {
              "name": "sslrootcert",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "username",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            }
          ]
        },
        {
          "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/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

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:

  • azuresql_dw

  • postgres

  • redshift

  • s3

  • snowflake

connection
OBJECT
REQUIRED

A Destination Form Properties object corresponding to the value of type.

Returns

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

curl -X PUT https://api.stitchdata.com/v3/destinations/{id}
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
          "type":"postgres",
          "connection": {
            "host": "<HOST>",
            "port": 5432,
            "username": "<USERNAME>",
            "database": "<DATABASE>",
            "password": "<PASSWORD>",
            "ssl": false
            }
        }"
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.

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 Destination object with a report_card property.

curl -X GET https://api.stitchdata.com/v4/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

[
  {
    "properties": {
      "database": "<DATABASE>",
      "host": "<HOST>",
      "port": "5432",
      "username": "<USERNAME>"
    },
    "updated_at": "2019-01-10T16:46:50Z",
    "name": "Default Warehouse",
    "type": "postgres",
    "deleted_at": null,
    "system_paused_at": null,
    "stitch_client_id": <CLIENT_ID>,
    "paused_at": null,
    "id": 120603,
    "created_at": "2019-01-10T16:46:50Z",
    "report_card": {
      "type": "postgres",
      "current_step": 1,
      "steps": [
        {
          "type": "form",
          "properties": [
            {
              "name": "database",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "encryption_host",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "ipv4"
                  },
                  {
                    "type": "string",
                    "format": "ipv6"
                  },
                  {
                    "type": "string",
                    "format": "hostname"
                  }
                ]
              }
            },
            {
              "name": "encryption_port",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^\\d+$"
              }
            },
            {
              "name": "encryption_type",
              "is_required": true,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^(ssh|none)$"
              }
            },
            {
              "name": "encryption_username",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "host",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "ipv4"
                  },
                  {
                    "type": "string",
                    "format": "ipv6"
                  },
                  {
                    "type": "string",
                    "format": "hostname"
                  }
                ]
              }
            },
            {
              "name": "password",
              "is_required": true,
              "provided": true,
              "is_credential": true,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "port",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string",
                "pattern": "^\\d+$"
              }
            },
            {
              "name": "ssl",
              "is_required": true,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "boolean"
              }
            },
            {
              "name": "sslrootcert",
              "is_required": false,
              "provided": false,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            },
            {
              "name": "username",
              "is_required": true,
              "provided": true,
              "is_credential": false,
              "system_provided": false,
              "json_schema": {
                "type": "string"
              }
            }
          ]
        },
        {
          "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.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Returns

If successful, the API will return a status of 200 OK and an array (of length zero or one) of Destination objects.

curl -X GET https://api.stitchdata.com/v3/destinations
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

[
  {  
    "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/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the destination to be deleted.

Returns

If successful, the API will return a status of 200 OK and an empty body.

curl -X DELETE https://api.stitchdata.com/v4/destinations/86741
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
{}
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/

This is correct:

https://api.stitchdata.com/v4/destinations/86741
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/abc


Source Types

OBJECT Source Type Object

The Source Type object contains the information needed to configure a data source.

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.


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

To retrieve information about a specific data source, use the Get a Source endpoint.

Resource List
Request Method

GET

Resource URL

/v4/source-types/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

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.

curl -X GET https://api.stitchdata.com/v4/source-types/platform.hubspot
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{  
   "type":"platform.hubspot",
   "current_step":1,
   "steps":[  
      {  
         "type":"form",
         "properties":[  
            {  
               "name":"image_version",
               "is_required":true,
               "provided":false,
               "is_credential":false,
               "system_provided":true,
               "json_schema":null
            },
            {  
               "name":"frequency_in_minutes",
               "is_required":true,
               "provided":false,
               "is_credential":false,
               "system_provided":false,
               "json_schema":{  
                  "type":"string",
                  "pattern":"^\\d+$"
               }
            },
            {  
               "name":"start_date",
               "is_required":true,
               "provided":false,
               "is_credential":false,
               "system_provided":false,
               "json_schema":{  
                  "type":"string",
                  "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
               }
            }
         ]
      },
      {  
         "type":"oauth",
         "properties":[  
            {  
               "name":"client_id",
               "is_required":true,
               "provided":false,
               "is_credential":true,
               "system_provided":true,
               "json_schema":{  
                  "type":"string"
               }
            },
            {  
               "name":"client_secret",
               "is_required":true,
               "provided":false,
               "is_credential":true,
               "system_provided":true,
               "json_schema":{  
                  "type":"string"
               }
            },
            {  
               "name":"redirect_uri",
               "is_required":true,
               "provided":false,
               "is_credential":true,
               "system_provided":true,
               "json_schema":{  
                  "type":"string",
                  "format":"uri"
               }
            },
            {  
               "name":"refresh_token",
               "is_required":true,
               "provided":false,
               "is_credential":true,
               "system_provided":true,
               "json_schema":{  
                  "type":"string"
               }
            }
         ]
      },
      {  
         "type":"discover_schema",
         "properties":[  ]
      },
      {  
         "type":"field_selection",
         "properties":[  ]
      },
      {  
         "type":"fully_configured",
         "properties":[  ]
      }
   ]
}

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.

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.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Returns

If successful, the API will return a status of 200 OK and an array of Source Report Card objects, one for each supported source type.

curl -X GET https://api.stitchdata.com/v4/source-types
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

[  
   {  
      "type":"platform.hubspot",                                /* HubSpot source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"oauth",
            "properties":[  
               {  
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"redirect_uri",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string",
                     "format":"uri"
                  }
               },
               {  
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  ]
         },
         {  
            "type":"field_selection",
            "properties":[  ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   },
   {  
      "type":"platform.marketo",                                /* Marketo source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"endpoint",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "format":"uri"
                  }
               },
               {  
                  "name":"identity",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "format":"uri"
                  }
               },
               {  
                  "name":"max_daily_calls",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   },
   {  
      "type":"platform.zuora",                                  /* Zuora source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"european",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {  
                  "name":"password",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"sandbox",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               },
               {  
                  "name":"username",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  ]
         },
         {  
            "type":"field_selection",
            "properties":[  ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   },
   {  
      "type":"platform.salesforce",                             /* Salesforce source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"api_type",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^(REST|BULK)$"
                  }
               },
               {  
                  "name":"is_sandbox",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {  
                  "name":"quota_percent_per_run",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"quota_percent_total",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"select_fields_by_default",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"oauth",
            "properties":[  
               {  
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"instance_url",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "format":"uri"
                  }
               },
               {  
                  "name":"orgid",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  ]
         },
         {  
            "type":"field_selection",
            "properties":[  ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   },
   {  
      "type":"platform.yotpo",                                  /* Yotpo source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"api_key",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"api_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  ]
         },
         {  
            "type":"field_selection",
            "properties":[  ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   },
   {  
      "type":"platform.sendgrid",                               /* SendGrid source */
      "current_step":1,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"api_key",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  ]
         },
         {  
            "type":"field_selection",
            "properties":[  ]
         },
         {  
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   }
]


Destination Types

OBJECT Destination Type Object

The Destination Type object contains the information needed to configure a destination.

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.


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.

Resource List
Request Method

GET

Resource URL

/v4/destination-types/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

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.

curl -X GET https://api.stitchdata.com/v4/destination-types/snowflake
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

"type": "snowflake",
"current_step": 1,
"steps": [
    {
        "type": "form",
        "properties": [
            {
                "name": "database",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "host",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "anyOf": [
                        {
                            "type": "string",
                            "format": "ipv4"
                        },
                        {
                            "type": "string",
                            "format": "ipv6"
                        },
                        {
                            "type": "string",
                            "format": "hostname"
                        }
                    ]
                }
            },
            {
                "name": "password",
                "is_required": true,
                "provided": false,
                "is_credential": true,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "port",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string",
                    "pattern": "^\\d+$"
                }
            },
            {
                "name": "role",
                "is_required": false,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "username",
                "is_required": true,
                "provided": false,
                "is_credential": true,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "warehouse",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            }
        ]
    },
    {
        "type": "fully_configured",
        "properties": []
    }
],
"details": {
    "pricing_tier": "standard",
    "pipeline_state": "released",
    "protocol": "snowflake",
    "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.

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.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Returns

If successful, the API will return a status of 200 OK and an array of Destination Report Card objects, one for each supported destination type.

curl -X GET https://api.stitchdata.com/v4/destination-types
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
[
  {
    "type": "azure_sqldw",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "host",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "username",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "azure_storage_account_token",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "azure_storage_sas_url",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "database",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "encryption_type",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(ssh|none)$"
            }
          },
          {
            "name": "encryption_host",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "encryption_port",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "encryption_username",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "standard",
      "pipeline_state": "beta",
      "protocol": "azure_sqldw",
      "access": true
    }
  },
  {
    "type": "redshift",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "database",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "encryption_host",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "encryption_port",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "encryption_type",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(ssh|none)$"
            }
          },
          {
            "name": "encryption_username",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "password",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "username",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "standard",
      "pipeline_state": "released",
      "protocol": "redshift",
      "access": true
    }
  },
  {
    "type": "postgres",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "database",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "encryption_host",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "encryption_port",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "encryption_type",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(ssh|none)$"
            }
          },
          {
            "name": "encryption_username",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "password",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "ssl",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sslrootcert",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "standard",
      "pipeline_state": "released",
      "protocol": "postgres",
      "access": true
    }
  },
  {
    "type": "snowflake",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "database",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "password",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "role",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "warehouse",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "standard",
      "pipeline_state": "released",
      "protocol": "snowflake",
      "access": true
    }
  },
  {
    "type": "s3",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "csv_delimiter",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "csv_force_quote",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(true|false)$"
            }
          },
          {
            "name": "output_file_format",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(csv|jsonl)$"
            }
          },
          {
            "name": "s3_bucket",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "s3_key_format_string",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "sentinel_key",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^stitch-challenge-file-.*$"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "standard",
      "pipeline_state": "released",
      "protocol": "s3",
      "access": true
    }
  },
  {
    "type": "storagegrid",
    "current_step": 1,
    "steps": [
      {
        "type": "form",
        "properties": [
          {
            "name": "access_key_id",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "csv_delimiter",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "csv_force_quote",
            "is_required": false,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(true|false)$"
            }
          },
          {
            "name": "endpoint",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4"
                },
                {
                  "type": "string",
                  "format": "ipv6"
                },
                {
                  "type": "string",
                  "format": "hostname"
                }
              ]
            }
          },
          {
            "name": "output_file_format",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^(csv|jsonl)$"
            }
          },
          {
            "name": "port",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "s3_bucket",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "s3_key_format_string",
            "is_required": true,
            "provided": false,
            "is_credential": false,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "secret_access_key",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string"
            }
          },
          {
            "name": "sentinel_key",
            "is_required": true,
            "provided": false,
            "is_credential": true,
            "system_provided": false,
            "json_schema": {
              "type": "string",
              "pattern": "^stitch-challenge-file-.*$"
            }
          }
        ]
      },
      {
        "type": "fully_configured",
        "properties": []
      }
    ],
    "details": {
      "pricing_tier": "default",
      "pipeline_state": "alpha",
      "protocol": "storagegrid",
      "access": false
    }
  }
]


Sources

OBJECT Source Object

An object representing a data source. Sources are the databases, APIs, and other data applications that Stitch replicates data from. Sources can be retrieved in a list or individually by ID.

POST Create a source

Creates a source object, which is the first step in setting up a new data source.

PUT Update a source

Updates an existing data source.

GET Retrieve a source

Retrieves a previously created data source by its unique identifier.

GET List all sources

Lists the sources for an account, including active, paused, and deleted sources.

DELETE Delete a source

Deletes an existing data source.


OBJECT

The Source Object

An object representing a data source. Sources are the databases, APIs, and other data applications that Stitch replicates data from. Sources can be retrieved in a list or individually by ID.

id
INTEGER

The unique identifier for this source.

created_at
TIMESTAMP

The time at which the source object was created.

deleted_at
TIMESTAMP

The time at which the source object was deleted.

display_name
STRING

The display name of the source connection.

name
STRING

The name of the source connection, dynamically generated from display_name. The name corresponds to the destination schema name that the data from this source will be loaded into.

Names must:

  • Contain only lowercase alphanumerics and underscores
  • Be unique within each Stitch client account
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 (PROPERTIES)

A source Properties object corresponding to the value of type.

report_card
OBJECT (SOURCE REPORT CARD)

A description of the source’s configuration state.

stitch_client_id
INTEGER

The ID of the Stitch client account.

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

updated_at
TIMESTAMP

The time at which the object was last updated.


POST

Create a source

Creates a source object, which is the first step in setting up a new data source. After the source object is created, additional configuration steps must be completed.

The configuration process is unique for each type of source. The report_card object’s steps attribute will assist you in guiding the user to the Connect JavaScript Client to complete the appropriate step.

Resource List
Request Method

POST

Resource URL

/v4/sources

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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

display_name
STRING
REQUIRED

A descriptive name for the source. This will be used to dynamically generate the name corresponding to the schema name or dataset name that the data from this source will be loaded into.

type
STRING
REQUIRED

The source type. For example: platform.marketo or platform.hubspot.

properties
OBJECT
OPTIONAL

A source Properties object corresponding to the value of type.

Returns

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

The report_card property contains the Source Report Card object for the source’s configuration status.

curl -X POST https://api.stitchdata.com/v4/sources
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
             "type":"platform.hubspot",
             "display_name":"HubSpot",
             "properties":{
                "start_date":"2017-01-01T00:00:00Z",
                "frequency_in_minutes":"30"
             }
          }"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
   "properties":{
      "frequency_in_minutes":"30",
      "image_version":"1.latest",
      "start_date":"2017-01-01T00:00:00Z"
   },
   "updated_at":"2018-02-06T16:25:06Z",
   "check_job_name":null,
   "name":"hubspot",
   "type":"platform.hubspot",
   "deleted_at":null,
   "system_paused_at":null,
   "stitch_client_id":<ACCOUNT_ID>,
   "paused_at":null,
   "id":<SOURCE_ID>,
   "display_name":"HubSpot",
   "created_at":"2018-02-06T16:25:06Z",
   "report_card":{
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[
         {
            "type":"form",
            "properties":[
               {
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {
            "type":"oauth",
            "properties":[
               {
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"redirect_uri",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string",
                     "format":"uri"
                  }
               },
               {
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{
                     "type":"string"
                  }
               }
            ]
         },
         {
            "type":"discover_schema",
            "properties":[ ]
         },
         {
            "type":"field_selection",
            "properties":[ ]
         },
         {
            "type":"fully_configured",
            "properties":[ ]
         }
      ]
   }
}
Code Condition Response Body
400

Source’s display_name is already in use

"a source of name <NAME> already exists"

400

Prohibited arguments

"POST body may only include a type, a display_name and map of string properties"

400

Invalid properties data

An array of the property names containing invalid data:

{
   "bad_properties":[
      "start_date",
      "frequency_in_minutes"
   ],
   ...
}

May result from incorrect formatting, incorrect typing (all property values must be strings), or a property has a value that is an empty string.


PUT

Update a source

Updates an existing data source.

Resource List
Request Method

PUT

Resource URL

/v4/sources/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source to be updated.

display_name
STRING
OPTIONAL

A descriptive name for the source. This will be used to dynamically generate the name corresponding to the schema name or dataset name that the data from this source will be loaded into.

properties
OBJECT
OPTIONAL

A source Properties object corresponding to the value of type.

Returns

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

curl -X PUT https://api.stitchdata.com/v4/sources/86741
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
             "display_name":"Salesforce",
             "properties":{
                "frequency_in_minutes":"60"
             }
         }"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
   "properties":{
      "frequency_in_minutes":"60",
      "image_version":"1.latest",
      "start_date":"2017-01-01T00:00:00Z"
   },
   "updated_at":"2018-02-06T17:37:14Z",
   "check_job_name":null,
   "name":"salesforce",
   "type":"platform.salesforce",
   "deleted_at":null,
   "system_paused_at":null,
   "stitch_client_id":<ACCOUNT_ID>,
   "paused_at":null,
   "id":<SOURCE_ID>,
   "display_name":"Salesforce",
   "created_at":"2018-02-06T17:36:02Z",
   "report_card":{
      "type":"platform.salesforce",
      "current_step":1,
      "steps":[
         {
            "type":"form",
            "properties":[
               {
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"api_type",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(REST|BULK)$"
                  }
               },
               {
                  "name":"is_sandbox",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {
                  "name":"quota_percent_per_run",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"quota_percent_total",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"select_fields_by_default",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {
            "type":"oauth",
            "properties":[
               {
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"instance_url",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "format":"uri"
                  }
               },
               {
                  "name":"orgid",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               }
            ]
         },
         {
            "type":"discover_schema",
            "properties":[  ]
         },
         {
            "type":"field_selection",
            "properties":[  ]
         },
         {
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   }
}
Code Condition Response Body
400

Invalid source ID

"unable to locate source(<SOURCE_ID>) for client (<ACCOUNT_ID>) to update"

400

Prohibited arguments

"PUT body many only include the keys: display_name and properties"

400

Invalid properties data

An array of the property names containing invalid data:

{
   "bad_properties":[
      "start_date",
      "frequency_in_minutes"
   ],
   ...
}

May result from incorrect formatting, incorrect typing (all property values must be strings), or a property has a value that is an empty string.


GET

Retrieve a source

Retrieves a previously created data source by its unique identifier.

Resource List
Request Method

GET

Resource URL

/v4/sources/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the data source to be retrieved.

Returns

If successful and a valid identifier was provided, the API will return a status of 200 OK and a single Source Object.

curl -X GET https://api.stitchdata.com/v4/sources/86741
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{  
   "properties":{  
      "frequency_in_minutes":"30",
      "image_version":"1.latest",
      "start_date":"2017-01-01T00:00:00Z"
   },
   "updated_at":"2018-02-06T18:04:59Z",
   "name":"hubspot",
   "type":"platform.hubspot",
   "deleted_at":"2018-02-06T18:04:58Z",
   "system_paused_at":null,
   "stitch_client_id":<ACCOUNT_ID>,
   "paused_at":null,
   "id":<SOURCE_ID>,
   "display_name":"HubSpot",
   "created_at":"2018-02-06T16:25:06Z",
   "report_card":{  
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {  
            "type":"oauth",
            "properties":[  
               {  
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               },
               {  
                  "name":"redirect_uri",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string",
                     "format":"uri"
                  }
               },
               {  
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":true,
                  "json_schema":{  
                     "type":"string"
                  }
               }
            ]
         },
         {  
            "type":"discover_schema",
            "properties":[  

            ]
         },
         {
            "type":"field_selection",
            "properties":[ ]
         },
         {
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   }
}

GET

List all sources

Lists the sources for an account, including active, paused, and deleted sources.

Resource List
Request Method

GET

Resource URL

/v4/sources

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.

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 Objects, including paused and deleted sources.

curl -X GET https://api.stitchdata.com/v4/sources
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

[
   {
      "properties":{
         "frequency_in_minutes":"30",
         "image_version":"1.latest",
         "start_date":"2017-01-01T00:00:00Z"
      },
      "updated_at":"2018-02-06T18:04:59Z",
      "name":"hubspot_api_test",
      "type":"platform.hubspot",
      "deleted_at":"2018-02-06T18:04:58Z",
      "system_paused_at":null,
      "stitch_client_id":<ACCOUNT_ID>,
      "paused_at":null,
      "id":<SOURCE_ID>,
      "display_name":"HubSpot",
      "created_at":"2018-02-06T16:25:06Z",
      "report_card":{
         "type":"platform.hubspot",
         "current_step":2,
         "steps":[
            {
               "type":"form",
               "properties":[ ... ]
            },
            {
               "type":"oauth",
               "properties":[ ... ]
            },
            {
               "type":"discover_schema",
               "properties":[  ]
            },
            {
               "type":"field_selection",
               "properties":[  ]
            },
            {
               "type":"fully_configured",
               "properties":[  ]
            }
         ]
      }
   },
   {  
      "properties":{
         "frequency_in_minutes":"30",
         "image_version":"1.latest",
         "start_date":"2017-01-01T00:00:00Z"
      },
      "updated_at":"2018-02-06T18:12:41Z",
      "name":"hubspot",
      "type":"platform.hubspot",
      "deleted_at":null,
      "system_paused_at":null,
      "stitch_client_id":<ACCOUNT_ID>,
      "paused_at":null,
      "id":<SOURCE_ID>,
      "display_name":"HubSpot",
      "created_at":"2018-02-06T18:12:41Z",
      "report_card":{
         "type":"platform.hubspot",
         "current_step":2,
         "steps":[  
            {
               "type":"form",
               "properties":[ ... ]
            },
            {
               "type":"oauth",
               "properties":[ ... ]
            },
            {
               "type":"discover_schema",
               "properties":[  ]
            },
            {
               "type":"field_selection",
               "properties":[  ]
            },
            {
               "type":"fully_configured",
               "properties":[  ]
            }
         ]
      }
   },
   {  
      "properties":{
         "frequency_in_minutes":"30",
         "image_version":"1.latest",
         "start_date":"2017-01-01T00:00:00Z"
      },
      "updated_at":"2018-02-06T18:10:44Z",
      "name":"salesforce_api_test",
      "type":"platform.salesforce",
      "deleted_at":"2018-02-06T18:05:06Z",
      "system_paused_at":null,
      "stitch_client_id":<ACCOUNT_ID>,
      "paused_at":null,
      "id":<SOURCE_ID>,
      "display_name":"Salesforce",
      "created_at":"2018-02-06T17:36:02Z",
      "report_card":{
         "type":"platform.salesforce",
         "current_step":1,
         "steps":[
            {  
               "type":"form",
               "properties":[ ... ]
            },
            {  
               "type":"oauth",
               "properties":[ ... ]
            },
            {  
               "type":"discover_schema",
               "properties":[  ]
            },
            {  
               "type":"field_selection",
               "properties":[  ]
            },
            {  
               "type":"fully_configured",
               "properties":[  ]
            }
         ]
      }
   },
   {  
      "properties":{
         "frequency_in_minutes":"30",
         "image_version":"1.latest",
         "start_date":"2017-01-01T00:00:00Z"
      },
      "updated_at":"2018-02-06T18:05:30Z",
      "name":"salesforce_api_test",
      "type":"platform.salesforce",
      "deleted_at":null,
      "system_paused_at":null,
      "stitch_client_id":<ACCOUNT_ID>,
      "paused_at":null,
      "id":<SOURCE_ID>,
      "display_name":"Salesforce",
      "created_at":"2018-02-06T18:05:30Z",
      "report_card":{
         "type":"platform.salesforce",
         "current_step":1,
         "steps":[
            {
               "type":"form",
               "properties":[ ... ]
            },
            {
               "type":"oauth",
               "properties":[ ... ]
            },
            {
               "type":"discover_schema",
               "properties":[  ]
            },
            {
               "type":"field_selection",
               "properties":[  ]
            },
            {
               "type":"fully_configured",
               "properties":[  ]
            }
         ]
      }
   }
]

DELETE

Delete a source

Deletes an existing data source.

Resource List
Request Method

DELETE

Resource URL

/v4/sources/{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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source to be deleted.

Returns

If successful, the API will return a status of 200 OK and a Source object with a report_card property. The deleted_at attribute will be populated.

curl -X DELETE https://api.stitchdata.com/v4/sources/86741
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{}"
HTTP/1.1 200 OK
Content-Type: application/json;charset=ISO-8859-1

{
   "properties":{
      "frequency_in_minutes":"60",
      "image_version":"1.latest",
      "start_date":"2017-01-01T00:00:00Z"
   },
   "updated_at":"2018-02-06T17:37:14Z",
   "check_job_name":null,
   "name":"salesforce",
   "type":"platform.salesforce",
   "deleted_at":"2019-01-09T17:28:57Z",
   "system_paused_at":null,
   "stitch_client_id":<ACCOUNT_ID>,
   "paused_at":null,
   "id":<SOURCE_ID>,
   "display_name":"Salesforce",
   "created_at":"2018-02-06T17:36:02Z",
   "report_card":{
      "type":"platform.salesforce",
      "current_step":1,
      "steps":[
         {
            "type":"form",
            "properties":[
               {
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"api_type",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(REST|BULK)$"
                  }
               },
               {
                  "name":"is_sandbox",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {
                  "name":"quota_percent_per_run",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"quota_percent_total",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {
                  "name":"select_fields_by_default",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^(true|false)$"
                  }
               },
               {
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         },
         {
            "type":"oauth",
            "properties":[
               {
                  "name":"client_id",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"client_secret",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"instance_url",
                  "is_required":true,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string",
                     "format":"uri"
                  }
               },
               {
                  "name":"orgid",
                  "is_required":false,
                  "provided":false,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               },
               {
                  "name":"refresh_token",
                  "is_required":true,
                  "provided":false,
                  "is_credential":true,
                  "system_provided":false,
                  "json_schema":{
                     "type":"string"
                  }
               }
            ]
         },
         {
            "type":"discover_schema",
            "properties":[  ]
         },
         {
            "type":"field_selection",
            "properties":[  ]
         },
         {
            "type":"fully_configured",
            "properties":[  ]
         }
      ]
   }
}
Code Condition Response Body
400

Prohibited arguments

"DELETE body must be empty"

400

Invalid source ID

"Unable to locate source(<SOURCE_ID>) for client (<ACCOUNT_ID>) to delete"



Connection Checks

OBJECT Connection Check Object

A Connection Check object shows the results from a test of a connection’s parameters. This is a test performed by Stitch that checks the configuration of a source’s connection parameters. The nature of the test varies by connection type.

GET Retrieve a source's last connection check

Retrieves the last connection check for a source by the source’s unique identifier.


OBJECT

The Connection Check Object

A Connection Check object shows the results from a test of a connection’s parameters. This is a test performed by Stitch that checks the configuration of a source’s connection parameters. The nature of the test varies by connection type.

name
STRING

The name of the connection check job.

mode
STRING

This value will always be check.

status
STRING

The status of the connection check job. Possible values are:

  • running
  • succeeded
  • failed
start_time
TIMESTAMP

The date and time the connection check job started.

completion_time
TIMESTAMP

The date and time the connection check job was completed.

error
BOOLEAN

Indicates if the connection check job resulted in an error. This will be true if any of the exit_status properties are non-zero.

check_exit_status
INTEGER

The exit status of the connection check job. Possible values are:

  • null - The connection check job is still running
  • 0 - The connection check job was successful
  • 1 - The connection check job was unsuccessful
discovery_exit_status
INTEGER

The exit status of the discovery portion of the connection check job. Possible values are:

  • null - Job is still running
  • 0 - Job was successful
  • Any non-zero value - Discovery failed
discovery_error_message
STRING

Exception message raised when discovery failed during the connection check job. If successful, this will be null.

tap_exit_status
INTEGER

The exit status of the tap. Possible values are:

  • null - Tap is still running
  • 0 - Tap was successful
  • Any non-zero value - Tap failed
tap_error_message
STRING

Exception message raised when extraction failed during the job. If successful, this will be null.

target_exit_status
INTEGER

The exit status of the target portion of the connection check job. Possible values are:

  • null - Target is still running
  • 0 - Target was successful
  • Any non-zero value - Target failed
target_error_message
STRING

This value will always be null.


GET

Retrieve a source's last connection check

Retrieves the last connection check for a source by the source’s unique identifier.

Resource List
Request Method

GET

Resource URL

/v4/sources/{source_id}/last-connection-check

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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

source_id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source.

Returns

If successful, the API will return a status of 200 OK and a single Connection Check object.

curl -X GET https://api.stitchdata.com/v4/sources/86741/last-connection-check
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"

In progress connection check:

{
  "target_exit_status": null,
  "tap_error_message": null,
  "check_exit_status": null,
  "name":"116078.120645.check.7bc049a4-18cf-11e9-a502-0e61abdd375a",
  "start_time":"2018-10-08T18:12:34Z",
  "mode":"check",
  "tap_exit_status": null,
  "target_error_message":null,
  "discovery_exit_status": null,
  “status”: “running”,
  "completion_time": null,
  "error":false,
  "discovery_error_message":null
}

Successful connection check:

{
  "target_exit_status": null,
  "tap_error_message": null,
  "check_exit_status": 0,
  "name": "116078.122635.check.c5e705e2-1b62-11e9-b0e4-0e61abdd375a",
  "start_time": "2019-01-18T20:51:05Z",
  "mode": "check",
  "tap_exit_status": null,
  "target_error_message": null,
  "discovery_exit_status": 0,
  "status": "succeeded",
  "completion_time": "2019-01-18T20:51:07Z",
  "error": false,
  "discovery_error_message": null
}

Failed connection check:

{
  "target_exit_status": null,
  "tap_error_message": null,
  "check_exit_status": null,
  "name":"116078.120645.check.7bc049a4-18cf-11e9-a502-0e61abdd375a",
  "start_time":"2018-10-08T18:12:34Z",
  "mode":"check",
  "tap_exit_status": null,
  "target_error_message":null,
  "discovery_exit_status": null,
  “status”: “running”,
  "completion_time": null,
  "error":false,
  "discovery_error_message":null
}


Streams

OBJECT Stream Object

An object representing a table in a data source.

GET List streams for a source

Lists the available streams for a source.

GET Retrieve a stream's schema

Retrieves the schema for a source’s stream by the source and stream’s unique identifiers.

PUT Update a stream's metadata

Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property.


OBJECT

The Stream Object

An object representing a table in a data source.

stream_id
INTEGER

The stream ID.

selected
BOOLEAN

Indicates if the stream is selected for replication. Possible values are:

  • null - Only present if a stream has never been selected. Otherwise, this value will be true if selected, and false if de-selected.
  • true - The stream is selected and data will be replicated for all selected fields
  • false - The stream is not selected and data for this stream will not be replicated
stream_name
STRING

The name of the stream. This value may not be unique. For example: A database with multiple schemas can have the same stream name in multiple schemas.

tap_stream_id
STRING

The unique version of the stream name.

For database sources, this value will be the database name, schema name, and table name, combined.

metadata
OBJECT (STREAM LEVEL METADATA)

Details about the stream including its selection status, replication details, and key properties.


GET

List streams for a source

Lists the available streams for a source.

Resource List
Request Method

GET

Resource URL

/v4/sources/{source_id}/streams

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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

source_id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source containing the streams.

Returns

If successful, the API will return a status of 200 OK and an array of Stream objects, one for each available stream in the source.

curl -X GET https://api.stitchdata.com/v4/sources/120643/streams
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"

Database source:

[
  {
    "selected": null,
    "stream_id": 2289176,
    "tap_stream_id": "demni2mf59dt10-heroku-orders",
    "stream_name": "orders",
    "metadata": {
      "database-name": "demni2mf59dt10",
      "selected": null,
      "is-view": false,
      "row-count": 447,
      "schema-name": "heroku",
      "table-key-properties": [
        "id"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2343457,
    "tap_stream_id": "demni2mf59dt10-public-customers",
    "stream_name": "customers",
    "metadata": {
      "database-name": "demni2mf59dt10",
      "selected": null,
      "is-view": false,
      "row-count": 0,
      "schema-name": "public",
      "table-key-properties": [
        "id"
      ]
    }
  },
  {
    "selected": true,
    "stream_id": 2288740,
    "tap_stream_id": "demni2mf59dt10-public-zapier_table",
    "stream_name": "addresses",
    "metadata": {
      "database-name": "demni2mf59dt10",
      "selected": true,
      "is-view": false,
      "replication-method": "FULL_TABLE",
      "row-count": 0,
      "schema-name": "public",
      "table-key-properties": [
        "id"
      ]
    }
  },
  {
    "selected": false,
    "stream_id": 2375830,
    "tap_stream_id": "demni2mf59dt10-public-customer_view",
    "stream_name": "customer_view",
    "metadata": {
      "database-name": "demni2mf59dt10",
      "selected": false,
      "is-view": true,
      "replication-key": "id",
      "replication-method": "INCREMENTAL",
      "row-count": 0,
      "schema-name": "public",
      "table-key-properties": [],
      "view-key-properties": [
        "id"
      ]
    }
  }
]

SaaS source:

[
  {
    "selected": true,
    "stream_id": 2288757,
    "tap_stream_id": "abandoned_checkouts",
    "stream_name": "abandoned_checkouts",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": true,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": true,
    "stream_id": 2288759,
    "tap_stream_id": "collects",
    "stream_name": "collects",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": true,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288758,
    "tap_stream_id": "custom_collections",
    "stream_name": "custom_collections",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288756,
    "tap_stream_id": "customers",
    "stream_name": "customers",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288754,
    "tap_stream_id": "metafields",
    "stream_name": "metafields",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288751,
    "tap_stream_id": "order_refunds",
    "stream_name": "order_refunds",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "created_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288753,
    "tap_stream_id": "orders",
    "stream_name": "orders",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288755,
    "tap_stream_id": "products",
    "stream_name": "products",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "updated_at"
      ]
    }
  },
  {
    "selected": null,
    "stream_id": 2288752,
    "tap_stream_id": "transactions",
    "stream_name": "transactions",
    "metadata": {
      "forced-replication-method": "INCREMENTAL",
      "selected": null,
      "table-key-properties": [
        "id"
      ],
      "valid-replication-keys": [
        "created_at"
      ]
    }
  }
]

GET

Retrieve a stream's schema

Retrieves the schema for a source’s stream by the source and stream’s unique identifiers.

Resource List
Request Method

GET

Resource URL

/v4/sources/{source_id}/streams/{stream_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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

source_id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source containing the stream.

stream_id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the stream to be retrieved.

Returns

If successful and valid identifiers were provided, the API will return a status of 200 OK and a single Stream Schema Object.

curl -X GET https://api.stitchdata.com/v4/sources/120643/streams/2339248
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
{
  "schema": "{\"properties\":{\"position\":{\"type\":[\"null\",\"integer\"]},\"created_at\":{\"type\":[\"null\",\"string\"],\"format\":\"date-time\"},\"sort_value\":{\"type\":[\"null\",\"string\"]},\"collection_id\":{\"type\":[\"null\",\"integer\"]},\"id\":{\"type\":[\"null\",\"integer\"]},\"product_id\":{\"type\":[\"null\",\"integer\"]},\"updated_at\":{\"type\":[\"null\",\"string\"],\"format\":\"date-time\"},\"featured\":{\"type\":[\"null\",\"boolean\"]}},\"type\":\"object\"}",
  "metadata": [
    {
      "breadcrumb": [],
      "metadata": {
        "forced-replication-method": "INCREMENTAL",
        "selected": true,
        "table-key-properties": [
          "id"
        ],
        "valid-replication-keys": [
          "updated_at"
        ]
      }
    },
    {
      "breadcrumb": [
        "properties",
        "collection_id"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": true
      }
    },
    {
      "breadcrumb": [
        "properties",
        "created_at"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "featured"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "id"
      ],
      "metadata": {
        "inclusion": "automatic",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "position"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "product_id"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "sort_value"
      ],
      "metadata": {
        "inclusion": "available",
        "selected": false
      }
    },
    {
      "breadcrumb": [
        "properties",
        "updated_at"
      ],
      "metadata": {
        "inclusion": "automatic",
        "selected": false
      }
    }
  ],
  "non-discoverable-metadata-keys": [
    "selected",
    "replication-method",
    "replication-key",
    "view-key-properties"
  ]
}
Code Condition Response Body
400

Invalid stream ID

invalid stream-id: <STREAM_ID>

400

Invalid source ID

invalid stream-id: <STREAM_ID>


PUT

Update a stream's metadata

Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property.

Refer to the Select streams and fields guide for instructions on selecting streams and fields.

Resource List
Request Method

PUT

Resource URL

/v4/sources/{source_id}/streams/metadata

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.

Request Body

The request body must be valid JSON and contain the required arguments.

Response Format

Whether the request succeeds or fails, the API will return JSON.

Arguments

This endpoint accepts the following parameters:

source_id
PATH PARAMETER
REQUIRED

A path parameter corresponding to the unique ID of the source containing the stream(s).

streams
ARRAY
REQUIRED

An array of Stream objects, with each object corresponding to a stream to be updated.

Each object is required to have the following properties:

tap_stream_id
STRING
REQUIRED

The tap_stream_id of the stream to be updated.

metadata
ARRAY
REQUIRED

An array of Metadata objects with each object corresponding to a field in the stream to be updated. More than one field may be included in a single request.

Each object is required to have the following properties:

breadcrumb
ARRAY
REQUIRED

An array of strings describing a path into the schema:

  • To refer to the stream itself, this value should be [], or an empty array. The associated metadata object should include modifable Stream-level Metadata object properties.

  • To refer to a specific field, the value should be ["properties", "<FIELD_NAME>"], where <FIELD_NAME> represents the name of an included field. For example: ["properties", "first_name"] refers to a field named first_name. The associated metadata object should include modifable Field-level Metadata object properties.

Note: To select fields, the stream must also be selected. To select a stream, one metadata object for the stream should have a breadcrumb that is an empty array ([]). this is only required to initially select the stream. See the Request tab below for an example.

metadata
OBJECT
REQUIRED

The properties in the stream’s Stream Schema object non-discoverable-metadata-keys property:

Returns

If successful, the API will return a status of 200 OK and a JSON body of:

{
  "status": 200
}

Selecting a single stream:

curl -X PUT https://api.stitchdata.com/v4/sources/120645/streams/metadata
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
           "streams": [
             {
               "tap_stream_id": "custom_collections",
               "metadata": [
                 {
                   "breadcrumb": [],
                   "metadata": {
                     "selected": "true"
                   }
                 }
               ]
             }
           ]
         }"

Selecting a single stream and multiple fields:

curl -X PUT https://api.stitchdata.com/v4/sources/120645/streams/metadata
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
           "streams": [
             {
               "tap_stream_id": "custom_collections",
               "metadata": [
                 {
                   "breadcrumb": [],
                   "metadata": {
                     "selected": true
                   }
                 },
                 {
                   "breadcrumb": [
                     "properties",
                     "title"
                   ],
                   "metadata": {
                     "selected": true
                   }
                 },
                 {
                   "breadcrumb": [
                     "properties",
                     "published_at"
                   ],
                   "metadata": {
                     "selected": true
                   }
                 }
               ]
             }
           ]
         }"

Selecting multiple streams and fields:

curl -X PUT https://api.stitchdata.com/v4/sources/120645/streams/metadata
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
           "streams": [
              {
                "tap_stream_id": "custom_collections",
                "metadata": [
                  {
                    "breadcrumb": [],
                    "metadata": {
                      "selected": true
                    }
                  },
                  {
                    "breadcrumb": [
                      "properties",
                      "title"
                    ],
                    "metadata": {
                      "selected": true
                    }
                  },
                  {
                    "breadcrumb": [
                      "properties",
                      "published_at"
                    ],
                    "metadata": {
                      "selected": true
                    }
                  }
                ]
              },
              {
                "tap_stream_id": "customers",
                "metadata": [
                  {
                    "breadcrumb": [],
                    "metadata": {
                      "selected": true
                    }
                  },
                  {
                    "breadcrumb": [
                      "properties",
                      "first_name"
                    ],
                    "metadata": {
                      "selected": true
                    }
                  },
                  {
                    "breadcrumb": [
                      "properties",
                      "last_name"
                    ],
                    "metadata": {
                      "selected": true
                    }
                  }
                ]
              }
            ]
          }'

Selecting a database table and defining replication:

curl -X PUT https://api.stitchdata.com/v4/sources/120645/streams/metadata
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
           "streams": [
             {
               "tap_stream_id": "demni2mf59dt10-public-customers",
               "metadata": [
                 {
                   "breadcrumb": [],
                   "metadata": {
                     "selected": true,
                     "replication-method": "INCREMENTAL",
                     "replication-key": "updated_at"
                   }
                 },
                 {
                   "breadcrumb": [
                     "properties",
                     "name"
                   ],
                   "metadata": {
                     "selected": true
                   }
                 },
                 {
                   "breadcrumb": [
                     "properties",
                     "has_magic"
                   ],
                   "metadata": {
                     "selected": true
                   }
                 }
               ]
             }
           ]
         }"

Selecting a database view and defining replication:

curl -X PUT https://api.stitchdata.com/v4/sources/120645/streams/metadata
     -H "Authorization: Bearer <ACCESS_TOKEN>" 
     -H "Content-Type: application/json"
     -d "{
           "streams": [
               {
                 "tap_stream_id": "demni2mf59dt10-public-customer_view",
                 "metadata": [
                   {
                     "breadcrumb": [],
                     "metadata": {
                       "replication-key": "updated_at",
                       "view-key-properties": [
                         "id"
                       ],
                       "replication-method": "INCREMENTAL",
                       "selected": true
                     }
                   },
                   {
                     "breadcrumb": [
                       "properties",
                       "name"
                     ],
                     "metadata": {
                       "selected": true
                     }
                   },
                   {
                     "breadcrumb": [
                       "properties",
                       "has_magic"
                     ],
                     "metadata": {
                       "selected": true
                     }
                   }
                 ]
               }
             ]
           }"

Applicable to all requests:

{
  "status": 200
}
Code Condition Response Body
400

Missing tap_stream_id

{  
   "invalid_fields":"invalid tap-stream-ids:  [nil]"
}
400

Invalid tap_stream_id

{  
   "invalid_fields":"invalid tap-stream-ids:  [<INVALID_TAP_STREAM_ID>]"
}
400

Request body includes read-only properties

{
  "invalid_fields": "only non-discoverable metadata can be produced by the UI: #{\"<PROPERTY_NAME>\"}"
}
400

Request body includes unsupported fields

{
  "invalid_fields": "Unsupported fields cannot be selected by default"}"
}
400

Request body is missing streams, breadcrumb, and/or metadata properties

"body must contain a 'streams' property with a list of metadatas by tap_stream_id"

Data Structures

OBJECT Connection Step

Contained in a Source or Destination Report Card object, the Connection Steps object contains the steps necessary to configure a data source or destination.

OBJECT Details

Contained in a Destination Report Card object, the Details object contains information about a destination type’s availability within Stitch.

Note: This object will only be returned when using a GET method.

OBJECT Metadata

A Metadata object describes a stream’s schema and the current state of its configuration in Stitch, including its selection status, field inclusion list, Primary Keys, and Replication Method.

Refer to the Select streams and fields guide for instructions on selecting streams and fields.

OBJECT Properties

A Properties object contains the properties necessary to complete a connection step. Returned within a Source or Destination object, these properties provide information about the configuration status of the connection.

OBJECT Destination Report Card

A Destination Report Card object contains information about a destination’s connection configuration.

OBJECT Source Report Card

A Source Report Card object contains information about a source’s connection configuration.

OBJECT Stream Schema

A Stream Schema object contains information needed to select a stream and its fields for replication.


OBJECT

The Connection Step Object

Contained in a Source or Destination Report Card object, the Connection Steps object contains the steps necessary to configure a data source or destination.

type
STRING

The type of step. Possible values are:

  • form - The first step in every source’s creation.
  • oauth - If required, the OAuth step for the source’s creation.
  • profile - If required, the profile selection step. For example: Selecting a Facebook Ads profile.
  • discover_schema - The step in which Stitch performs a structure sync to detect the tables and attributes available in the source.
  • field_selection - The step in which tables and columns are selected for replication.
  • fully_configured - Achieved when the source has a successful connection and field_selection is complete.
properties
ARRAY

An array of Properties objects.

Example Object

{  
   "report_card":{  
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[  
         {  
            "type":"form",
            "properties":[]
         },
         {  
            "type":"oauth",
            "properties":[]
         },
         {  
            "type":"discover_schema",
            "properties":[]
         },
         {  
            "type":"field_selection",
            "properties":[]
         },
         {  
            "type":"fully_configured",
            "properties":[]
         }
      ]
   }
}

OBJECT

The Details Object

Contained in a Destination Report Card object, the Details object contains information about a destination type’s availability within Stitch.

Note: This object will only be returned when using a GET method.

access
BOOLEAN

If true, the connection can be used for the Stitch client account being accessed.

pricing_tier
STRING

Indicates the type of Stitch plan required to use the connection. Possible values are:

  • standard - Any Stitch plan can use the connection.
  • premium - A paid Stitch plan is required to use the connection.
  • enterprise - An Enterprise Stitch plan is required to use the connection.
pipeline_state
STRING

The connection type’s release status in Stitch. Possible values are:

  • alpha - The connection is in development.
  • beta - The connection is in open or closed beta.
  • released - The connection is in general release.
  • deprecated - The connection has been deprecated.
protocol
STRING

The type of the connection. For example: snowflake or redshift

Example Object

{
  "type": "snowflake",
  "current_step": 1,
  "steps": [
    {
      "type": "form",
      "properties": []
    },
    {
      "type": "fully_configured",
      "properties": []
    }
  ],
  "details": {
    "pricing_tier": "standard",
    "pipeline_state": "released",
    "protocol": "snowflake",
    "access": true
  }
}

OBJECT

The Metadata Object

A Metadata object describes a stream’s schema and the current state of its configuration in Stitch, including its selection status, field inclusion list, Primary Keys, and Replication Method.

Refer to the Select streams and fields guide for instructions on selecting streams and fields.

breadcrumbs
ARRAY

An array of strings describing a path into the schema. For example:

  • A value of [] refers to the entire schema, or stream
  • A value of ["properties", "<FIELD_NAME>"] refers to the properties.<FIELD_NAME> portion of the schema. For example: ["properties", "id"] would refer to a field named id
metadata
OBJECT

An object containing metadata associated with the breadcrumb. The type of metadata object depends on the breadcrumb:

Example Object

{
   "metadata":[
      {
         "breadcrumb":[],
         "metadata":{
            "database-name":"demni2mf59dt10",
            "is-view":false,
            "row-count":90849,
            "schema-name":"products",
            "table-key-properties":[
               "id"
            ]
         }
      },
      {
         "breadcrumb":[
            "properties",
            "collection_id"
         ],
         "metadata":{
            "inclusion":"available",
            "selected-by-default":true,
            "sql-datatype":"bigint"
         }
      },
      {
         "breadcrumb":[
            "properties",
            "id"
         ],
         "metadata":{
            "inclusion":"automatic",
            "selected-by-default":true,
            "sql-datatype":"bigint"
         }
      },
      {
         "breadcrumb":[
            "properties",
            "updated_at"
         ],
         "metadata":{
            "inclusion":"available",
            "selected-by-default":true,
            "sql-datatype":"timestamp with time zone"
         }
      }
   ]
}
{
   "metadata":[
      {
         "breadcrumb":[],
         "metadata":{
            "forced-replication-method":"INCREMENTAL",
            "selected":true,
            "table-key-properties":[
               "id"
            ],
            "valid-replication-keys":[
               "updated_at"
            ]
         }
      },
      {
         "breadcrumb":[
            "properties",
            "collection_id"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":true
         }
      },
      {
         "breadcrumb":[
            "properties",
            "created_at"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "featured"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "id"
         ],
         "metadata":{
            "inclusion":"automatic",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "position"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "product_id"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "sort_value"
         ],
         "metadata":{
            "inclusion":"available",
            "selected":false
         }
      },
      {
         "breadcrumb":[
            "properties",
            "updated_at"
         ],
         "metadata":{
            "inclusion":"automatic",
            "selected":false
         }
      }
   ]
}
SUB-OBJECT

The Field-level Metadata Object

Contained in a Metadata object, the Field-level metadata object contains information about a field’s inclusion in a stream’s field selection list.

Refer to the Field selection and compatibility rules guide for info about selection and compatibility rules.

inclusion
STRING

Indicates when a field will be included. Possible values are:

  • automatic - The field is included all the time, regardless of selected-by-default and selected values
  • available - The field is available for selection. The field will be included if selected-by-default or selected is true.
  • unsupported - The field is unsupported and will not be included, regardless of selected-by-default and selected values

If a field is unsupported, the unsupported-description attribute may provide additonal information.

selected
BOOLEAN

Indicates whether a field should be included in a stream’s field selection list. This value will be present only if the stream containing the field is selected (selected: true).

  • null - The value has not been set
  • true - The field is selected
  • false - The field is not selected
selected-by-default
BOOLEAN

Indicates if a field will be selected by default. Possible values are:

  • null - The value has not been set
  • true - The field is selected by default and is included regardless of the selected value
  • false - The field is not selected by default. The field will be included if the selected value is true.
sql-datatype
STRING

For database sources only. The data type of a column from a database.

fieldExclusions
ARRAY

A list of arrays, each array containing an array of strings that correspond to fields that are incompatible when the current field is selected.

For example: If the metadata for a DeviceOS field contains a fieldExclusion of ["properties":"ImpressionLostToBidPercent"], then the DeviceOS and ImpressionLostToBidPercent fields cannot be selected together in the stream.

Refer to the example tabs below for an example of this property.

unsupported-description
STRING

The reason a field is unsupported (inclusion: unsupported). Note: This is not available for all sources.

Example Object

{
  "metadata": {
    "sql-datatype": "double precision",
    "selected-by-default": true,
    "inclusion": "available"
  }
{
  "metadata": {
    "selected": false,
    "inclusion": "available"
  }
{
  "breadcrumb": [
    "properties",
    "DeviceOS"
  ],
  "metadata": {
    "fieldExclusions": [
      [
        "properties",
        "ExactMatchImpressionSharePercent"
      ],
      [
        "properties",
        "ImpressionLostToAdRelevancePercent"
      ],
      [
        "properties",
        "ImpressionLostToBidPercent"
      ],
      [
        "properties",
        "ImpressionLostToBudgetPercent"
      ],
      [
        "properties",
        "ImpressionLostToExpectedCtrPercent"
      ],
      [
        "properties",
        "ImpressionLostToRankPercent"
      ],
      [
        "properties",
        "ImpressionSharePercent"
      ]
    ],
    "inclusion": "available"
  }
}
{
  "metadata": {
    "unsupported-description": "this field is unsupported by the Bulk API.",
    "selected": false,
    "inclusion": "unsupported"
  }
SUB-OBJECT

The Stream-level Metadata Object

Contained in Metadata and Stream objects, the Stream-level Metadata object contains information about a stream’s configuration in Stitch. This includes information about its selection status, Replication Method, Replication Keys, and key properties.

database-name
STRING

For database sources only. The name of the database containing the stream.

forced-replication-method
STRING

Indicates which Replication Method is required for the stream. Possible values are:

is-view
BOOLEAN

For database sources only. Indicates if the stream is a database view.

replication-key
STRING

Indicates the field being used as the stream’s Replication Key.

replication-method
STRING

The Replication Method the stream uses to replicate data. Accepted values are:

row-count
INTEGER

For database sources only. The number of rows (records) in the stream.

schema-name
STRING

For database sources only. The name of the schema containing the stream.

selected
BOOLEAN

Indicates whether a stream should be set to replicate. Accepted values are:

  • true - The stream is selected and data for selected fields will be replicated
  • false - The stream is not selected and no data will be replicated
table-key-properties
ARRAY

An array of strings listing the fields that make up the key properties of the table. These are the table’s defined Primary Keys.

valid-replication-keys
ARRAY

An array of strings indicating the fields valid for use as Replication Keys in Key-based Incremental Replication (replication-method: INCREMENTAL).

Note: For SaaS sources, the fields listed in this array are pre-defined by Stitch and will be used as the Replication Keys for the stream. They cannot be modified.

view-key-properties
ARRAY

For database sources only. An array of strings listing the fields that make up the key properties of the view.

Example Object

{
  "metadata": {
    "database-name": "demni2mf59dt10",
    "selected": true,
    "is-view": false,
    "replication-method": "FULL_TABLE",
    "row-count": 13,
    "schema-name": "public",
    "table-key-properties": [
      "id"
    ]
  }
}
{
  "metadata": {
    "database-name": "demni2mf59dt10",
    "selected": true,
    "replication-method":"INCREMENTAL",
    "replication-key":"updated_at",
    "is-view": true,
    "row-count": 156,
    "schema-name": "heroku",
    "view-key-properties": [
      "customer_id"
    ]
  }
}
{
  "metadata": {
    "forced-replication-method": "INCREMENTAL",
    "selected": true,
    "table-key-properties": [
      "id"
    ],
    "valid-replication-keys": [
      "updated_at"
    ]
  }
}

OBJECT

The Properties Object

A Properties object contains the properties necessary to complete a connection step. Returned within a Source or Destination object, these properties provide information about the configuration status of the connection.

name
STRING

The name of the property.

required_to_be_fully_configured
BOOLEAN

If true, the property is required for complete configuration.

provided
BOOLEAN

If true, the property has been provided.

is_credential
BOOLEAN

If true, the property is a credential or otherwise sensitive data.

system_provided
BOOLEAN

If true, the system provides this property.

tap_mutable
BOOLEAN

This is an internal field and is for Stitch use only.

json_schema
ARRAY

Note: Data will only be returned for this array if system_provided: false.

An array containing:

  • type - A string indicating the expected data type of the property’s value. For example: boolean
  • pattern - A string indicating the expected pattern of the property’s value. For example: ^\\d+$
  • anyOf - A series of arrays containing key-value pairs for the type and format combinations Stitch will accept as the property’s value. For example:

      "anyOf": [
          {
              "type": "string",
              "format": "ipv4"
          },
          {
              "type": "string",
              "format": "ipv6"
          },
          {
              "type": "string",
              "format": "hostname"
          }
      ]
    

Example Object

{
  "report_card":{  
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[  
         {  
            "type":"form",
            "properties":[  
               {  
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },
               {  
                  "name":"frequency_in_minutes",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d+$"
                  }
               },
               {  
                  "name":"start_date",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":false,
                  "json_schema":{  
                     "type":"string",
                     "pattern":"^\\d{4}-\\d{2}-\\d{2}T00:00:00Z$"
                  }
               }
            ]
         }
      ]
   }
}

OBJECT

The Destination Report Card Object

A Destination Report Card object contains information about a destination’s connection configuration.

current_step
INTEGER

The index (in the steps array) of the current step needed to configure the destination.

details
OBJECT (DETAILS)

A Details object contains information about a destination type’s availablity within Stitch.

steps
ARRAY

A sequential list of Connection Step objects required to complete configuration for the connection type.

type
STRING

The destination connection type. Ex: postgres or redshift

Example Object

"type": "snowflake",
"current_step": 1,
"steps": [
    {
        "type": "form",
        "properties": [
            {
                "name": "database",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "host",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "anyOf": [
                        {
                            "type": "string",
                            "format": "ipv4"
                        },
                        {
                            "type": "string",
                            "format": "ipv6"
                        },
                        {
                            "type": "string",
                            "format": "hostname"
                        }
                    ]
                }
            },
            {
                "name": "password",
                "is_required": true,
                "provided": false,
                "is_credential": true,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "port",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string",
                    "pattern": "^\\d+$"
                }
            },
            {
                "name": "role",
                "is_required": false,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "username",
                "is_required": true,
                "provided": false,
                "is_credential": true,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            },
            {
                "name": "warehouse",
                "is_required": true,
                "provided": false,
                "is_credential": false,
                "system_provided": false,
                "json_schema": {
                    "type": "string"
                }
            }
        ]
    },
    {
        "type": "fully_configured",
        "properties": []
    }
],
"details": {
    "pricing_tier": "standard",
    "pipeline_state": "released",
    "protocol": "snowflake",
    "access": true
}

OBJECT

The Source Report Card Object

A Source Report Card object contains information about a source’s connection configuration.

current_step
INTEGER

The index (in the steps array) of the current step needed to configure the data source.

steps
ARRAY

A sequential list of Connection Step objects required to complete configuration for the connection type.

type
STRING

The connection type. Ex: platform.mysql or platform.hubspot

Example Object

{
  "type": "platform.mysql",
  "current_step": 1,
  "steps": [
    {
      "type": "form",
      "properties": [
        {
          "name": "image_version",
          "is_required": true,
          "provided": false,
          "is_credential": false,
          "system_provided": true,
          "tap_mutable": false,
          "json_schema": null
        },
        {
          "name": "frequency_in_minutes",
          "is_required": true,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^1$|^30$|^60$|^360$|^720$|^1440$"
          }
        },
        {
          "name": "anchor_time",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "format": "date-time"
          }
        },
        {
          "name": "database",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string"
          }
        },
        {
          "name": "filter_dbs",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string"
          }
        },
        {
          "name": "host",
          "is_required": true,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "format": "uri"
          }
        },
        {
          "name": "password",
          "is_required": true,
          "provided": false,
          "is_credential": true,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string"
          }
        },
        {
          "name": "port",
          "is_required": true,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^\\d+"
          }
        },
        {
          "name": "server_id",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^\\d+$"
          }
        },
        {
          "name": "ssh",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^(true|false)"
          }
        },
        {
          "name": "ssh_host",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "format": "uri"
          }
        },
        {
          "name": "ssh_port",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^\\d+"
          }
        },
        {
          "name": "ssh_user",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string"
          }
        },
        {
          "name": "ssl",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^(true|false)"
          }
        },
        {
          "name": "user",
          "is_required": true,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string"
          }
        },
        {
          "name": "use_log_based_replication",
          "is_required": false,
          "provided": false,
          "is_credential": false,
          "system_provided": false,
          "tap_mutable": false,
          "json_schema": {
            "type": "string",
            "pattern": "^(true|false)$"
          }
        }
      ]
    },
    {
      "type": "discover_schema",
      "properties": []
    },
    {
      "type": "field_selection",
      "properties": []
    },
    {
      "type": "fully_configured",
      "properties": []
    }
  ]
}
{
   "report_card":{
      "type":"platform.hubspot",
      "current_step":2,
      "steps":[
         {
            "type":"form",
            "properties":[
               {
                  "name":"image_version",
                  "is_required":true,
                  "provided":true,
                  "is_credential":false,
                  "system_provided":true,
                  "json_schema":null
               },