The HTTP Connector step allows you to integrate your process with any service with an HTTP-based API.
What is the HTTP Connector, and what can you use it for?
The HTTP Connector allows you to interact with services with an application program interface (API). This will enable you to configure your process in SolveXia to receive, send and update data in these services.
For example, do you want to get exchange rate data to be used in your process? instead of loading a file, you can configure a GET request that will retrieve updated exchange rate data each time the process is run.
Do you want to update a journal in your accounting system? You can have a process in SolveXia that creates the entry and then uses a POST request to send the data to the accounting system.
How to use the HTTP Connector?
We will be using an online application to get exchange rate data. For this exercise, you will need:
1. An API endpoint. This will be an URL to will allow us to get data from the exchange rate application.
2. An API key. This will allow us to verify with API that we have access to the API.
In SolveXia,
1. In the designer view, open your process. Then, click on the⋮icon and select "add connector step":
2. Enter a name for the connector step, and then select HTTP Connector.
3. In the HTTP connector, update the following parameters:
- Method, in this case, we are getting information from the API endpoint, so we select GET
- URL path, this is the URL that the connector will use to get the data
- The API key needs to the loaded as a Header, thus, in the Header section, enter the API key.
- [Optional] You can pass any parameters, e.g. base = AUD
Your step should look like this:
4. You can check that the step works by clicking on Test. The step will return the Status code, e.g. 200, and a preview of the data:
5. To use the data, you can export it to a file and then use it in the process.
Tips and tricks
The URL, Headers and Parameters were hard-coded in the example above. However, you can link these to data properties in your process. This will make the API call dynamic based on the process configuration.
Comments
0 comments
Please sign in to leave a comment.