Cinchy Platform Documentation
Cinchy v5.7
Cinchy v5.7
  • Data Collaboration Overview
  • Release notes
    • Release notes
      • 5.7 Release Notes
      • 5.6 Release Notes
      • 5.5 Release Notes
      • 5.4 Release Notes
      • 5.3 Release Notes
      • 5.2 Release Notes
      • 5.1 Release Notes
      • 5.0 Release Notes
  • Support
  • Glossary
  • FAQ
  • Deployment guide
    • Deploying Cinchy
      • Plan your deployment
        • Deployment architecture
          • Kubernetes architecture
          • IIS architecture
        • Deployment prerequisites
          • Single Sign-On (SSO) integration
            • Enable TLS 1.2
            • Configure ADFS
            • AD Group Integration
      • Kubernetes
        • Disable your Kubernetes applications
        • Change your file storage configuration
        • Configure AWS IAM for Connections
        • Use Self-Signed SSL Certs (Kubernetes)
        • Deploy the CLI (Kubernetes)
      • IIS
  • Upgrade guide
    • Upgrade Cinchy
      • Cinchy Upgrade Utility
      • Kubernetes upgrades
        • v5.1 (Kubernetes)
        • v5.2 (Kubernetes)
        • v5.3 (Kubernetes)
        • v5.4 (Kubernetes)
        • v5.5 (Kubernetes)
        • v5.6 (Kubernetes)
        • v5.7 (Kubernetes)
        • Upgrade AWS EKS Kubernetes version
        • Update the Kubernetes Image Registry
        • Upgrade Azure Kubernetes Service (AKS)
      • IIS upgrades
        • v4.21 (IIS)
        • v4.x to v5.x (IIS)
        • v5.1 (IIS)
        • v5.2 (IIS)
        • v5.3 (IIS)
        • v5.4 (IIS)
        • v5.5 (IIS)
        • v5.6 (IIS)
        • v5.7 (IIS)
      • Upgrading from v4 to v5
  • Guides for using Cinchy
    • User Guide
      • Data Browser overview
      • The Admin panel
      • User preferences
        • Personal access tokens
      • Table features
      • Data management
      • Queries
      • Version management
        • Versioning best practices
      • Commentary
    • Builder Guide
      • Best practices
      • Create tables
        • Attach files
        • Columns
        • Data controls
          • Data entitlements
          • Data erasure
          • Data compression
        • Formatting rules
        • Indexing & partitioning
        • Linking data
        • Table and column GUIDs
        • System tables
      • Delete tables
        • Restore tables, columns, and rows
      • Saved queries
      • CinchyDXD
        • Build the data experience
        • Package the data experience
        • Install the data experience
        • Update the data experience
        • Repackage the data experience
        • Reinstall the data experience
      • Multilingual support
      • Integration guides
    • Administrator Guide
    • Additional guides
      • Monitor and Log on Kubernetes
        • Grafana
        • OpenSearch dashboards
          • Set up Alerts
        • Monitor via ArgoCD
      • Maintenance
      • Cinchy Secrets Manager
      • GraphQL (Beta)
      • System properties
      • Enable Data At Rest Encryption (DARE)
      • MDQE
      • Application experiences
        • Network map
          • Custom node results
          • Custom results in the Network Map
        • Set up experiences
  • API Guide
    • API overview
      • API authentication
      • API saved queries
      • ExecuteCQL
      • Webhook ingestion
  • CQL
    • Overview
      • CQL examples
      • CQL statements overview
        • Cinchy DML statements
        • Cinchy DDL statements
      • Cinchy supported functions
        • Cinchy functions
        • Cinchy system values
        • Cinchy User Defined Functions (UDFs)
          • Table-valued functions
          • Scalar-valued functions
        • Conversion functions
        • Date and Time types and functions
          • Return System Date and Time values
          • Return Date and Time parts
          • Return Date and Time values from their parts
          • Return Date and Time difference values
          • Modify Date and Time values
          • Validate Date and Time values
        • Logical functions
        • Math functions
        • String functions
        • Geometry and Geography data type and functions
          • OGC methods on Geometry & Geography instances
          • Extended methods on Geometry & Geography instances
        • Full Text Search functions
        • Connections functions
        • JSON functions
    • CQL functions master list
  • Meta-Forms
    • Introduction
    • Install Meta-Forms
      • Deploy Meta-Forms (Kubernetes)
      • Deploy Meta-Forms (IIS)
    • Forms data types
    • Meta-Forms Builder Guide
      • Create a dynamic meta-form with tables
      • Create a dynamic meta-form example with Form Designer
      • Add links to a form
      • Rich text editing in forms
  • Data syncs
    • Get started with data syncs
    • IIS installation
      • Prerequisites
      • Install Connections
      • Install the Worker/Listener
      • Install the CLI and the Maintenance CLI
    • Build data syncs
      • Data sync types
      • Design patterns
      • Sync actions
      • Columns and mappings
        • Calculated column examples
      • Advanced settings
        • Filters
        • Variables
        • Auth requests
        • Request headers
        • Post sync scripts
        • Pagination
      • Batch data sync example
      • Real-time sync example
      • Schedule a data sync
      • Connection functions
    • CLI commands list
    • Troubleshooting
    • Data sync sources
      • Cinchy Event Broker/CDC
        • Cinchy Event Broker/CDC XML config example
      • Cinchy Table
        • Cinchy Table XML config example
      • Cinchy Query
        • Cinchy Query XML config example
      • Copper
      • DB2 (query and table)
      • Dynamics 2015
      • Dynamics
      • DynamoDB
      • File-based sources
        • Binary file
        • Delimited file
        • Excel
        • Fixed width file
        • Parquet
      • Kafka Topic
        • Kafka Topic example config
        • Apache AVRO data format
      • LDAP
      • MongoDB collection
        • MongoDB collection source example
      • Mongo event
      • MongoDB collection (Cinchy event)
      • MS SQL Server (query and table)
      • ODBC Query
      • Oracle (query and table)
      • Polling event
        • Polling event example config
      • REST API
      • REST API (Cinchy event)
      • SAP SuccessFactors
      • Salesforce Object (Bulk API)
      • Salesforce platform event
      • Salesforce push topic
      • Snowflake
        • Snowflake source example config
      • SOAP 1.2 web service
    • Data sync destinations
      • Cinchy Table
      • DB2 table
      • Dynamics
      • Kafka Topic
      • MongoDB collection
      • MS SQL Server table
      • Oracle table
      • REST API
      • Salesforce
      • Snowflake table
      • SOAP 1.2 web service
    • Real-time sync stream sources
      • The Listener Config table
      • Cinchy Event Broker/CDC
      • Data Polling
      • Kafka Topic
      • MongoDB
      • Salesforce Push Topic
      • Salesforce Platform Event
  • Other Resources
    • Angular SDK
    • JavaScript SQK
Powered by GitBook
On this page
  • Overview
  • Info tab
  • Source tab
  • Best practices
  • Retrieve nested fields
  • JSON array handling
  • Path to Iterate
  • Next steps
  • Resources
  • Auth Request
  • Request Headers
  • Body
  • Pagination
  • Retry Configuration

Was this helpful?

Export as PDF
  1. Data syncs
  2. Data sync sources

REST API

PreviousPolling event example configNextREST API (Cinchy event)

Last updated 1 year ago

Was this helpful?

Overview

A REST API is an application programming interface that conforms to the constraints of REST (representational state transfer) architectural style and allows for interaction with RESTful web services.

REST APIs work by fielding requests for a resource and returning all relevant information about the resource, translated into a format that clients can easily interpret (this format is determined by the API receiving requests). Clients can also modify items on the server and even add new items to the server through a REST API.

The REST API source support batch syncs.

Info tab

You can find the parameters in the Info tab below (Image 1).

Values

Parameter
Description
Example

Title

Mandatory. Input a name for your data sync

REST API Sync

Variables

Permissions

Data syncs are role based access systems where you can give specific groups read, write, execute, and/or all of the above with admin access. Inputting at least an Admin Group is mandatory.

Source tab

Mandatory and optional parameters for the Source tab are outlined below (Image 2).

Parameter
Description
Example

Source

Mandatory. Select your source from the drop down menu.

REST API

HTTP Method

Mandatory.

This will be either GET or POST.

API Response Format

Mandatory. Use this field to specify a response format of the endpoint. Currently, the Connections UI only supports JSON responses.

JSON

Records Root JSONPath

$.data, $, $.ResponseObject

Path to Iterate

The path to select an array of records for capturing elements inside. A record is created for each element which you can use as the input in a source schema. The path is relative to the root JSONPath.

API Endpoint URL

Mandatory. API endpoint, including URL parameters like API key

https://www.quandl.com/api/v3/datatables/CLS/IDHP?fx_business_date=2024-01-01&api_key=@API_KEY

Next Page URL JSONPath

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

Parameter
Description
Example

Name

Mandatory. The name of your column as it appears in the source.

Name

Alias

Optional. You may choose to use an alias on your column so that it has a different name in the data sync.

Data Type

Mandatory. The data type of the column values.

Text

Description

Optional. You may choose to add a description to your column.

Select Show Advanced for more options for the Schema section.

Parameter
Description
Example

Mandatory

- If both 'Mandatory' and 'Validated': empty rows rejected. - If only 'Mandatory': rows synced but marked as failed with 'Mandatory Rule Violation'.

Validate Data

- If both 'Mandatory' and 'Validated': empty rows rejected. - If only 'Validated': all rows synced.

Trim Whitespace

Optional for text data. Choose to trim whitespace.

Max Length

Optional for text data. Set max length; exceeding values get rejected.

You can choose to add in a Transformation > String Replacement by inputting the following:

Parameter
Description
Example

Pattern

Mandatory when using a Transformation. The pattern for your string replacement.

Replacement

What you want to replace your pattern with.

Note that you can have more than one String Replacement

More options are available to you under the "Add a Section" drop down.

Note that adding a Pagination Block is mandatory.

Best practices

Retrieve nested fields

To get fields in a nested array, you can either set the nested array as the root, or you can use Path to Iterate to expand the array.

Examples

Here is a sample JSON response:

  {
  "groupId": 111,
  "users": [{
      "userID": 1,
      "name": "Jack"
  },
  {
      "userID": 2,
      "name": "Jill"
  }
  ]
}

Records Root JSONPath: $.users Schema:

  • $.userId for ID

  • $.name for Name

You can't reference "groupId" as it's one level above the specified root scope.

JSON array handling

Use $.data in Records Root JSONPath if the API returns a top-level JSON array.

Examples

Here is a sample JSON response:

[
  {
  "name": "John Doe",
  "age": 21,
},
{"name": "Jane Doe",
  "age": 21
}
]

Records Root JSONPath: $.data

Schema:

  • $.name for Name

  • $.age for Age

Path to Iterate

Use Path to Iterate to expand and target nested keys within the array. This only applies if the records within an array are objects.

If the record within the path to iterate is an array, each item within the array gets placed under an "item" key in a new JSON object.

Example

For example, here is a sample JSON response:

{
  "name": "John",
  "transactions": [{ "transactionId": 1 }, { "transactionId": 2 }]
}

In this example, we want to iterate over the "transactions" array and capture the records for "transactionid" and assign them to the "Transaction ID" column, and then add the parent "name" key to a Name column .

Records Root JSONPath: $ Path to iterate: $.transactions

Schema:

  • $.name for Name

  • $.transactions.id for Transaction ID

Next steps

  • To run a batch sync, select Jobs > Start Job

Resources

Auth Request

Request Headers

Body

You are able to use this section to add body content.

Pagination

Retry Configuration

Retry Configuration automatically retries HTTP Requests on failure based on a defined set of conditions. This 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

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

  1. 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 isn't 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.

;;

Optional. Review our documentation on for more information about this field.

Mandatory. Specify the JSON path for the results. The root of a JSON object is $. If the top-element of the response is an array, Cinchy places the array under a "data" key in a new JSON object. See for more info.

The section is where you define which source columns you want to sync in your connection. You can repeat the values for multiple columns.

You can learn more about these sections in

Configure your

Define your

Add in your , if required.

For more information, see the page about .

For more information, see the page about .

A pagination block is mandatory. 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}. For example "Content-Type=application/json".

Destination
Sync Actions.
Post Sync Scripts
auth requests
request headers
this online tool
Appendix A - Other Sections.
Review the documentation here
Variables here
Best practices
Schema
Image 1: The Info Tab
Image 2: The Source Tab