Cinchy Platform Documentation
Cinchy v5.0 - v5.5
Cinchy v5.0 - v5.5
  • Data Collaboration Overview
  • Other Wiki Spaces
    • Cinchy Data Sync
    • Angular SDK
    • JavaScript SQK
  • Release Notes
    • Release Notes
      • 5.0 Release Notes
      • 5.1 Release Notes
      • 5.2 Release Notes
      • 5.3 Release Notes
      • 5.4 Release Notes
      • 5.5 Release Notes
      • 5.6 Release Notes
  • Getting Help
  • Frequently Asked Questions
  • Deployment Guide
    • Deployment Installation Guides
      • Deployment Planning Overview and Checklist
        • Deployment Architecture Overview
          • Kubernetes Deployment Architecture
          • IIS Deployment Architecture
        • Deployment Prerequisites
          • Single Sign-On (SSO) Integration
            • Enabling TLS 1.2
            • Configuring ADFS
            • AD Group Integration
      • Kubernetes Deployment Installation
        • Disabling your Kubernetes Applications
        • Changing your File Storage Configuration
        • Using Self-Signed SSL Certs (Kubernetes Deployments)
        • Deploying the CLI (Kubernetes)
      • IIS Deployment Platform Installation
        • Deploying Connections and the CLI (IIS)
        • Deploying the Event Listener/Worker (IIS)
    • Upgrade Guides
      • Upgrading Cinchy Versions
        • Cinchy Upgrade Utility
        • Kubernetes Upgrades
          • v5.1 (Kubernetes)
          • v5.2 (Kubernetes)
          • v5.3 (Kubernetes)
          • v5.4 (Kubernetes)
          • v5.5 (Kubernetes)
          • v5.6 (Kubernetes)
          • Updating the Kubernetes Image Registry
          • Upgrading AWS EKS Kubernetes Version
          • Upgrading AKS (Azure Kubernetes Service)
        • 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)
      • Upgrading from v4 to v5
  • Guides for Using Cinchy
    • User Guides
      • Overview of the Data Browser
      • The Admin Panel
      • User Preferences
        • Personal Access Tokens
      • Table Features
      • Data Management
      • Queries
      • Version Management
        • Versioning Best Practices
      • Commentary
    • Builder Guides
      • Best Practices
      • Creating Tables
        • Attaching Files
        • Columns
        • Data Controls
          • Data Entitlements
          • Data Erasure
          • Data Compression
        • Restoring Tables, Columns, and Rows
        • Formatting Rules
        • Indexing and Partitioning
        • Linking Data
        • Table and Column GUIDs
        • System Tables
      • Saved Queries
      • CinchyDXD Utility
        • Building the Data Experience (CinchyDXD)
        • Packaging the Data Experience (CinchyDXD)
        • Installing the Data Experience (CinchyDXD)
        • Updating the Data Experience (CinchyDXD)
        • Repackaging the Data Experience (CinchyDXD)
        • Reinstalling the Data Experience (CinchyDXD)
      • Multi-Lingual Support
      • Integration Guides
    • Administrator Guide
    • Additional Guides
      • Monitoring and Logging on Kubernetes
        • Grafana
        • Opensearch Dashboards
          • Setting up Alerts
        • Monitoring via ArgoCD
      • Maintenance
      • GraphQL (Beta)
      • System Properties
      • Enable Data At Rest Encryption
      • MDQE
      • Application Experiences
        • Network Map
          • Custom Node Results
          • Custom Results in the Network Map
        • Setting Up Experiences
  • API Guide
    • API Overview
      • API Authentication
      • API Saved Queries
      • ExecuteCQL
      • Webhook Ingestion
  • CQL
    • The Basics of CQL
      • CQL Examples
      • CQL Functions Master List
      • CQL Statements Overview
        • Cinchy DML Statements
        • Cinchy DDL Statements
      • Cinchy Supported Functions
        • Cinchy Functions
        • Cinchy System Values
        • Cinchy User Defined Functions
          • 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
        • Mathematical 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
  • Meta Forms
    • Introduction to Meta-Forms
    • Meta-Forms Deployment Installation Guide
      • Deploying Meta-Forms (Kubernetes)
      • Deploying Meta-Forms (IIS)
    • Creating a Dynamic Meta-Form (Using Tables)
    • Creating a Dynamic Meta-Form Example (Using Form Designer)
    • Forms Data Types
    • Adding Links to a Form
    • Rich Text Editing in Forms
Powered by GitBook
On this page
  • 1. Introduction
  • 2. Master List of Endpoints
  • 2.1 /admin/index
  • 2.2 /apps/modelloader
  • 2.3 /healthcheck
  • 2.4 /metaforms/healthcheck
  • 2.5 /cache/clear
  • 2.6 /API/ExecuteCQL
  • 2.7 /API/MyDomain/MyQuery
  • 2.8 /identity/connect/token
  • 2.9 /api/getstsauthorityuri
  • 2.10 /api/jobs

Was this helpful?

Export as PDF
  1. API Guide

API Overview

This page gives an overview of APIs.

PreviousSetting Up ExperiencesNextAPI Authentication

Last updated 1 year ago

Was this helpful?

1. Introduction

You can query or manipulate any data on the Cinchy Platform using the (CQL). You can then save that as a Saved Query which allows it to be accessed via an API endpoint.

You will need to first a Cinchy bearer token (see ), and then you can either access a pre-defined Saved Query via the , or perform freeform querying via the

Note that regardless of how you query or manipulate data on the platform, it is always associated back to an account.

2. Master List of Endpoints

The following is a list of common API endpoints. These follow the format of <baseurl>/endpoint

2.1 /admin/index

Description

This endpoint will bring you to a page with your logs and health check.

2.2 /apps/modelloader

Description

This endpoint will open the model loader.

2.3 /healthcheck

Description

This endpoint will bring you to a page with your platform health check.

2.4 /metaforms/healthcheck

Description

This endpoint will bring you to a page with your Meta-Forms health check.

2.5 /cache/clear

Description

This endpoint will delete your platform cache data.

Description

You can execute CQL directly without creating a Saved Query using the below endpoint:

Query Parameters:

Name
Data Type
Description

CompressJSON

boolean

Default is true. Add this parameter and set to false if you want the JSON that is returned to be expanded rather than having the schema being returned separately.

ResultFormat

string

XML JSON CSV TSV PSV PROTOBUF

Type

string

QUERY - Query (Approved Data Only) DRAFT_QUERY - Query (Include Draft Changes) SCALAR - Scalar NONQUERY - Non Query, such as an insert or delete VERSION_HISTORY_QUERY - Query (Include Version History)

ConnectionId

string

​

TransactionId

string

When one or more requests share the same TransactionId, they are considered to be within the scope of a single transaction.

Query

string

The CQL query statement to execute

Parameters

boolean

See below on format for the parameters.

SchemaOnly

integer

Defaults to false.

StartRow

integer

When implementing pagination, specify a starting offset. Combine with RowCount to set the size of the data window.

RowCount

integer

When implementing pagination, specify the number of rows to retrieve for the current page. Combine with StartRow to set the paging position.

CommandTimeout

string

Use this parameter to override the default timeout (30s) for long running queries. In seconds.

UserId

string

ID of a user with authorization to run the saved query.

Header Parameters:

Name
Data Type
Description

Authorization

string

Responses:

  • 200 (OK)

Parameters

To pass in parameters in your executeCQL, you will need to pass in sets of parameters in the following format. So if you have one parameter then you would pass in 3 query parameters beginning with Parameters[0]. , and if you have a second parameter you would include an additional 3 query parameters beginning with Parameters[1]. .

Query String Parameter Name
Content

Parameters[n].ParameterName

Name of the parameter that is in your query, including the '@'. Ex. @name

Parameters[n].XmlSerializedValue

XML Serialized version of the value of that parameter. Ex. &quot;test&quot;

Parameters[n].ValueType

Datatype of the value. Ex. System.String

GET: https://<Cinchy Web URL>/API/MyDomain/MyQuery

Description

Query Parameters

Name
Data Type
Description

WrapSingleRecordInArray

boolean

Default is true. Add this parameter and set to false if you want single record results returned as an object instead of within an array.

@param

string

If you have parameters in your query, you pass them indirectly as query parameters.

CompressJSON

boolean

Default is true. Add this parameter and set to false if you want the JSON that is returned to be expanded rather than having the schema being returned separately.

Header Parameters

Name
Data Type
Description

Authorization

string

Responses

200: The request has successfully returned the record set.

< HTTP/2 200 
< cache-control: private, s-maxage=0
< content-type: application/json; charset=utf-8
< server: Microsoft-IIS/10.0
< x-aspnetmvc-version: 5.2
< access-control-allow-origin: *
< x-aspnet-version: 4.0.30319
< x-powered-by: ASP.NET
< date: Wed, 1 Aug 2020 17:40:13 GMT
< content-length: 2985

400: The request could not be understood, the client is sending a request with incomplete data, poorly constructed data or invalid data.

Optional Validation Logic: To validate query business / control conditional logic failure can be added at the beginning of the API which can intentionally generate a 400 error code (using RAISERROR) and stopping (using RETURN) the API. If there is no RETURN the errors will accumulate and will be provided at the end of running the API.

An attribute (X-Cinchy Error) will be returned in the HTTP header with the custom RAISERROR message indicated (see example)

Example:
--given the following CQL used within a saved query:

IF (ISNULL(@Int,0) = 0)
BEGIN
  RAISERROR('Invalid parameter: @Int cannot be NULL or zero',18,0)
  RETURN
END
IF (ISNULL(@String,'') = '' OR ISNULL(@String,'') = 'X')
BEGIN
  RAISERROR('Invalid parameter: @String cannot be NULL or empty or X',18,0)
  RETURN
END

--note "X-Cinchy-Error" in the sample response:

< HTTP/1.1 400 Bad Request
< Cache-Control: private
< Content-Type: text/html; charset=utf-8
< Server: Microsoft-IIS/10.0
< X-AspNetMvc-Version: 5.2
< Access-Control-Allow-Origin: *
< X-Cinchy-Error: Invalid parameter: @Int cannot be NULL or zero
< X-AspNet-Version: 4.0.30319
< X-Powered-By: ASP.NET
< Date: Wed, 1 Aug 2020 17:43:04 GMT
< Content-Length: 4517

401: The saved query API endpoint will return a 401 error code when you provide invalid credentials, this includes not providing credentials, expired credentials and incorrect credentials.

< HTTP/1.1 401 Unauthorized
< Cache-Control: private
< Content-Type: text/html; charset=utf-8
< Server: Microsoft-IIS/10.0
< X-AspNetMvc-Version: 5.2
< X-AspNet-Version: 4.0.30319

POST: https://<Cinchy SSO URL>/identity/connect/token

Definition

The Post Request will return an access token which can be used to access Cinchy APIs.

Header Parameters

Name
Data Type
Description

Content-type

string

application/x-www-form-urlencoded

Body Parameters

Name
Data Type
Description

Token

string

You can pass in your base64 encoded SAML token instead of your Cinchy username and password

Client_id

string

Client Id value from Integrated Clients table

Client_secret

string

Guid value from Integrated Clients table

Username

string

Username of Cinchy user

Password

string

Password for Cinchy user in plain text

Grant_Type

string

Set as "password" for username/password authentication. Set as "saml2" for saml token authentication.

Scope

string

Set as "js_api"

Responses

200: The request is successful

// {
    "access_token": "eyUzI1NiIsImtpZCI6IkE4M0UwQTFEQTY1MzE0NkZENUQxOTFDMzRDNTQ0RDJDODYyMzMzMzkiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJxRDRLSGFaVEZHX1YwWkhEVEZSTkxJWWpNemsifQ.eyJuYmYiOjE1NTQxMzE4MjAsImV4cCI6MTU1NDEzNTQyMCwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgxIiwiYXVkIjpbImh0dHA6Ly9sb2NhbGhvc3Q6ODA4MS9yZXNvdXJjZXMiLCJqc19hcGkiXSwiY2xpZW50X2lkIjoiYWJjIiwic3ViIjoiMSIsImF1dGhfdGltZSI6MTU1NDEzMTgyMCwiaWRwIjoibG9jYWwiLCJwcm9maWxlIjoiQWRtaW5pc3RyYXRvciIsImVtYWlsIjoiYWRtaW5AY2luY2h5LmNvIiwicm9sZSI6IkNpbmNoeSBVc2VyIEFjY291bnQiLCJpZCI6ImFkbWluIiwic2NvcGUiOlsianNfYXBpIl0sImFtciI6WyJjdXN0b20iXX0.N7drAlvtFiQoN4njs1rd5ZnTvJ_x8ZEnUEi6G1GjR4FS5FyS4hC6xdsT-Zhn1yRJQMkI2HA7HMPWwjsfkZ0IlBwuC25ECkGhbjv7DlK6baHQIkqeB0aTB9aDZSxWfDhV66O0dhby6EIEa4YuGspyjQMsDpx_LimmE9alfsUU-608944ZZkS6lBJlJ9LFCC5hYKARQIMZavrftz0tFUBsDU0T2fHpLNGo5GGwG1f9jUZTWTu7s3C05EsgboW3scUfDzjS_Wf55ExwhopIg9SD6ktHYYNRaCPtfMhU-e43l6a2LH-XrmP7OfoxJP2bvTMcvQCQWUEizKHuxKLl-ehWBw",
    "expires_in": 3600,
    "token_type": "Bearer"
}

400: For invalid parameters, a 400 error will be returned with the following JSON response with a description of the error.

Example:
{
  "error": "invalid_grant",
  "error_description": "Invalid username or password"
}

2.9 /api/getstsauthorityuri

Description

This will return your IDP URL endpoint.

2.10 /api/jobs

POST: https://<Connections-URL>/api/jobs

Description

This endpoint can be used to trigger a batch data sync job that has been configured in Cinchy.

Request Header Parameters

Name
Data Type
Description

Authorization

string

Content-Type

String

multipart/form-data

Body Parameters

Note that the parameter names "files" and "options" are both case sensitive and must use lowercase in your JSON. The contents of the parameters themselves are not case sensitive.

Name
Data Type
Description

files

binary

The URL to any file(s) needed to be uploaded to be used in place of a parameter in the data sync

options

string

Options - JSON Structure

 {
     "paramValues": {
       "<name of parameter in sync>": {
         "isFile": <set to true if this parameter corresponds to a file, otherwise set it to false>,
         "value": "<value of the parameter, if the parameter corresponds to a file, then it should match the file name that was uploaded>"
       }
     },
     "server": "<cinchy url without protocol>",
     "useHttps": <true or false, depending on the server's protocol>,
     "userId": "<username of the user you want to run the data sync as, leave as null if you want to run it as the user associated with the access token used in the Authorization header>",
     "password": "<password of the user you want to run the data sync as, leave as null if you want to run it as the user associated with the access token used in the Authorization header>",
     "model": "Cinchy",
     "feed": "<name of the data sync configuration>",
     "batchsize": <Set to 5000 for the default behaviour - the size of the batches when performing inserts/updates/deletes in the target, set to 5000 if you want the default behaviour>,
     "retrievalbatchsize": <Set to 5000 for the default behaviour -  this is the size of the batches when retrieving records from the source to process>,
     "writeToFile": <Set to true for the default behaviour - This will ensure it will write records to temp files on disk to save memory on larger syncs. If this is set to false, it'll store source records in memory, which will be faster for smaller data syncs>
   }

Endpoint Example

curl --request POST \
  --url <cinchy.com>/connections/api/jobs \
  --header 'Authorization: Bearer xxx’ \
  --header 'Content-Type: multipart/form-data' \
  --form files=@/Users/shawn/Worker.zip \
  --form 'options={ "paramValues": {  "file": {   "isFile": true,   "value": "FBL costing model with upload to SF.xlsx"  } }, "server": "sandbox.cinchy.net/technicalsales", "useHttps": true, "password": null, "userId": null, "model": "Cinchy", "feed": "Excel -> Cinchy", "batchsize": 5000, "retrievalbatchsize": 5000, "writeToFile": true}'

Responses

200: The request was successful.

{
   executionId = "<The Cinchy Id of the data sync execution, it will correspond go the Cinchy Id of the newly created record in the [Cinchy.[Execution Log] table>"
}

400: The request could not be completed.

{
   status = <Http status code>,
   message = "<Error message>"
}

2.6

Bearer <access_token> The access token can be either a Bearer token or a See for details.

2.7

You can use this endpoint to access your Cinchy Saved Queries via API. To access any Cinchy Saved Query API, pass the access token, received from either the Bearer Token Request or created as a PAT, in the Authorization header, prefixed by "Bearer". For more information,

Bearer <access_token> The access token can be either a Bearer token or a See for details.

2.8

Bearer <access_token> Note that this endpoint does not support Personal Access Tokens. See for details.

A JSON string of the data sync options. for the structure of this JSON string.

/API/ExecuteCQL
POST: https://<Cinchy Web URL>/API/ExecuteCQL
/identity/connect/token
Cinchy Query Language
Authentication
Saved Query endpoints
ExecuteCQL endpoint.
/admin/index
/apps/modelloader
/healthcheck
/metaforms/healthcheck
/cache/clear
/API/ExecuteCQL
/API/MyDomain/MyQuery
/identity/connect/token
/api/getstsauthorityuri
/api/jobs
Personal Access token.
Authentication
see here.
Personal Access token.
Authentication
Authentication
See here
/API/MyDomain/MyQuery