Programmatically running a transaction

📘

About this guide

In this guide, you will learn to programmatically run a transaction in Demyst Data APIs, assuming you have already created and configured a Data API in the Demyst platform.

Steps

1- Access the Data API

Access the Data API, navigate to the Data APIs overview section, and click on the Data API you created

In the overview section scroll till the Quick Start section copy the code from the Quick Start curl and paste it in a text editor. It will be easier to run it later, once you have an API key and other necessary information.

Quick Start in the overview section

Quick Start in the overview section

About the curl

Channel ID: The "id" in the curl is the Channel ID number from your saved data API on the Demyst platform. This is shown at Data APIs > Your Data API > Settings. The Channel ID sends inputs to that specific configuration so that the correct data is appended.

Inputs : The inputs listed in the context are examples of input requirements for different connectors in a Data API. These inputs are used to customize the API request and retrieve specific data. In the quick start's curl section, the inputs are substituted into the curl request to make a programmatic request to the Data API. The inputs are included in the request body or URL parameters, depending on the connector's configuration. This allows the API to process the request and return the desired data based on the input requirements.

2- Generate an API key

You can generate an API key by clicking on the 'Generate API Key' button and providing an appropriate name for the key as well as mentioning the 'user' role. A popup on the screen will show your successfully generated API key.

3- Generated API key

Copy this information, save it, and manage it appropriately.

🚧

The API key is not viewable once you navigate away from the popup screen.

Copy the API key Generated

Copy the API key Generated

Replace the API key in the code with the generated API key. Complete the sample curl request by adding the necessary inputs for the Data API. Paste the completed curl request into your terminal and press enter to run it.

The results will be displayed in the terminal(left side), matching the results that would be seen in the Demyst platform.