New Xeelo object action “Execute special function” provides a functionality of using an SQL without use of Data Exchange. In this article will discuss the possibility of using this function for generating a JSON file and provide an api request on some defined endpoint.
You can see what endpoints are and how to configure them on this page.
Execute special function
When you add new Object Action to the object, select type “Execute special function”.
This action provides one parameter -
Custom SQL. There you can add whatever SQL command you want.
In this case we will be adding an SQL command which creates a JSON format.
This is an example of how your SQL command can look like. Places that are in these “<>” brackets are placeholders where you will provide an ID number of specific object lines.
Run REST endpoint
Now that you have created a JSON, let’s put it to some specific endpoint. For that there is an object action called “Run REST endpoint”. This object action provieds 9 parameters like:
- Data type - can be JSON or XML
- Execution method - POST / GET / DELETE
- Timeout (ms) - time in miliseconds
- Wait for response 0/1 - 1 if you want to wait for response, 0 if you don’t
- Endpoint data - id of object line where you have stored your JSON/XML
- Endpoint token
- Endpoint URL - URL of your specific endpoint
- Response code object line ID
- Response text object line ID
An example of how to fill these parameters is here: