v5.0 - v5.5 Data Sync Documentation
  • Overview
  • Release Notes
    • V4.5
    • V4.6
    • v4.7
    • v4.8
    • v4.9
    • v4.10
    • v4.12
    • v4.13
  • v4 Connections Installation Guide
    • v5 Connections and CLI Installation Guide
  • v4 Worker/Listener Installation Guide
    • v5 Worker/Listener Installation Guide
  • Upgrades & Config Changes
  • Builder Guide
    • Overview
    • Types of Data Syncs
    • Subscribing to Event Streams
      • Supported Stream Sources
        • Amazon Simple Queue Service (SQS)
        • Cinchy Change Data Capture
        • Data Polling
        • Kafka Topic
        • MongoDB
        • Salesforce
          • Push Topic
          • Platform Event
    • Configuring a Data Sync
      • Connections Experience & XML Config Reference
        • Info
          • Parameters
            • String Escape
        • Source Config Reference
          • Schema Columns
            • Calculated Column Examples
          • Auth Requests
          • Request Headers
          • Pagination
          • Source Filter
        • Target Destination Config Reference
          • Column Mappings
          • Target Destination Filter
        • Sync Behaviour
        • Post Sync
        • Permissions
        • Jobs
        • Connections Usage Example
      • Data Validation
      • Transformations
        • StringReplacement
      • Supported Data Sources
        • File Based Source
          • Binary File
            • Binary File Data Source Example
          • Delimited File
            • Delimited File Data Source XML Example
          • Fixed Width File
          • Excel
            • Excel Source XML Example
        • Cinchy Event Broker/CDC
          • Cinchy Event Broker/CDC XML Config Example
        • Cinchy Table
          • Cinchy Table XML Config Example
        • Cinchy Query
          • Cinchy Query Data Source Example
        • Copper
        • DB2
        • Dynamics 2015
        • Dynamics
        • DynamoDB
        • Kafka Topic
          • Apache AVRO Data Format
          • Kafka Topic Source Example
        • LDAP
        • MongoDB Collection
          • MongoDB Collection Source XML Example
        • MongoDB Collection (Cinchy Event Triggered)
        • MS SQL Server Query
        • MS SQL Server Table
        • ODBC Table
        • ODBC Query
        • Oracle Table
        • Oracle Query
        • Parquet
        • Polling Event
          • Polling Event Example
        • REST API (Cinchy Event Triggered)
        • REST API
          • REST API XML Example
        • SAP SuccessFactors
        • Salesforce Object (Bulk API)
        • Salesforce Platform Event
        • Salesforce Push Topic
        • Snowflake
          • Snowflake Source XML Example
        • SOAP 1.2 Web Service
      • Supported Sync Targets
        • Cinchy Table
        • DB2 Table
        • Dynamics
        • Kafka Topic
        • MongoDB Collection (Column Based)
        • MS SQL Server Table
        • Oracle Table
        • REST API
        • Salesforce
        • Salesforce Object
        • Snowflake Table
          • Snowflake Table Target XML Example
        • SOAP 1.2 Web Service
    • Common Design Patterns
    • Testing a Data Sync
    • Promoting a Data Sync
    • Scheduling a Data Sync
    • CLI Command List
    • Connections Functions
    • Monitoring
  • Cinchy Platform Documentation
Powered by GitBook
On this page
  • 1. Basic Parameters
  • 2. Schema
  • 3. Other Sections
  • 3.1 Auth Request
  • 3.2 Request Headers
  • 3.3 Body
  • 3.4 Pagination
  • 4. Retry Configuration

Was this helpful?

  1. Builder Guide
  2. Configuring a Data Sync
  3. Supported Data Sources

REST API

PreviousREST API (Cinchy Event Triggered)NextREST API XML Example

Last updated 2 years ago

Was this helpful?

1. Basic Parameters

To connect a REST API as a Data Source, fill in the following parameters (Image 1):

Parameter

Value

HTTP Method

GET or POST

API Response Format

Specify a response format of the endpoint

Records Root JSONPath

Specify the JSON path for the results. This path will depend on the format of your response. Example: "$.payload" If the JSON response top-element is an object, $ will refer to the top-element of the response.

If the JSON response top-element is an array, the CLI code will wrap the array in an object. The object will contain the array under member name.

Path to Iterate

Specify the path to Iterate.

API Endpoint URL

API endpoint, including URL parameters like API key

Next Page URL JSON Path

Specify the path for the next page URL. This is only relevant for APIs that use cursor pagination

2. Schema

3. Other Sections

3.1 Auth Request

3.2 Request Headers

Cinchy v5.5 added an Authorization header type for REST API data syncs in Connections. An authorization request header can be used to provide credentials that authenticate a user with a server, allowing access to a protected resource. Selecting this header defines the Header Value as a password field.

3.3 Body

You are able to use this section to add body content (Image 6):

3.4 Pagination

4. Retry Configuration

Cinchy v5.5 introduced the Retry Configuration for REST API targets. This will automatically retry HTTP Requests on failure based on a defined set of conditions. This capability provides a mechanism to recover from transient errors such as network disruptions or temporary service outages.

Note: the maximum number of retries is capped at 10.

To set up a retry specification:

  1. Under the REST API source tab, select API Specification > Retry Configuration

2. Select your Delay Strategy.

  • Linear Backoff: Defines a delay of approximately n seconds where n = current retry attempt.

  • Exponential Backoff: A strategy where every new retry attempt is delayed exponentially by 2^n seconds, where n = current retry attempt.

    • Example: you defined Max Attempts = 3. Your first retry is going to be in 2^1 = 2, second: 2^2 = 4, third: 2^3 = 8 sec.

3. Input your Max Attempts. The maximum number of retries allowed is 10.

4. Define your Retry Conditions. You must define the conditions under which a retry should be attempted. For the Retry to trigger, at least one of the "Retry Conditions" has to evaluate to true.

Retry conditions are only evaluated if the response code is not 2xx Success.

Each Retry Condition contains one or more "Attribute Match" sections. This defines a Regex to evaluate against a section of the HTTP response. The following are the three areas of the HTTP response that can be inspected:

  • Response Code

  • Header

  • Body

If there are multiple "Attribute Match" blocks within a Retry Condition, all have to match for the retry condition to evaluate to true.

Add in your applicable columns (Image 2). for information on the column types available.

You can add in other sections by selecting the "Add a Section" drop down, and selecting from the list (Image 3).

You can add in an Auth Request (Image 4) by

You can add in Request Headers (Image 5) by

A pagination block is mandatory (Image 7). for more on pagination blocks.

Note that the Regex value should be entered as a regular expression. The Regex engine is .NET and expressions can be tested by using . In the below example, the Regex is designed to match any HTTP 5xx Server Error Codes, using a Regex value of "5[0-9][0-9]". For Headers, the format of the Header string which the Regex is applied against is {Header Name}={Header Value}, e.g. "Content-Type=application/json".

Review the documentation here
reviewing the documentation here.
reviewing the documentation here.
Review the documentation here
this online tool
Note that a pagination block is mandatory.
Image 1: Parameters. (Click to enlarge)
Image 2: Schema Columns
Image 3: Other Sections
Image 4: Adding an Auth Request
Image 5: Adding Request Headers
Image 6: Adding in Body Content
Image 7: Selecting your type of pagination