Connections Functions
1. Overview
The set of functions listed in this page are for use in Cinchy's Connections Experience when configuring data syncs.
JSON_ESCAPE
This function is used in Connections to escape parameter values and be safe to use inside a JSON document without breaking it
This function can be used in a REST API connection anywhere that allows parameters to be, such as the URL endpoint, the Request Body, or a Post-Sync Script.
Syntax
Arguments
Argument | Description |
---|---|
Parameter | The parameter value that you want to escape in order to be safe to use inside a JSON document without breaking it |
Example 1
The following example shows how you would use JSON_ESCAPE in your REST API URL (Image 1).
In this example we have an API and want to add a value (@Parameter) that contains double quotes -- this could break the JSON structure, so we need to wrap the parameter with JSON_ESCAPE().
Example 2
The following example shows how you would use JSON_ESCAPE in your REST API Request Body (Image 2).
In this example we have an API and want to add a value (@Parameter) that contains double quotes -- this could break the JSON structure, so we need to wrap the parameter with JSON_ESCAPE().
URL_ESCAPE
This function is used in Connections to escape parameter values and be safe to use inside a URL without breaking it
This function can be used in a REST API connection anywhere that allows parameters to be, such as the URL endpoint, the Request Body, or a Post-Sync Script.
Syntax
Arguments
Argument | Description |
---|---|
Parameter | The parameter value that you want to escape in order to be safe to use inside a URL without breaking it |
Example 1
The following example shows how you would use URL_ESCAPE in your REST API URL (Image 3).
In this example we have an API and want to add a value (@Parameter) that contains the "&" symbol to the URL field. To properly read the URL, we need to wrap the parameter with URL_ESCAPE(), which will escape the & to be %26.
Last updated