Web API
Version: 4.0.8
Web API integration allows you to execute any Web API and retrieve results.
Connect Web API with LogicHub
- Navigate to Automations > Integrations.
- Search for Web API.
- Click Details, then the + icon. Enter the required information in the following fields.
- Label: Enter a connection name.
- Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
- Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
- Remote Agent: Run this integration using the LogicHub Remote Agent.
- Client Certificate: Upload a .p12 Client Certificate file (p12 file at action input takes precedence over connection).
- Client Certificate Password: Enter password to read the client certificate.
- CA Certificate: Upload a .crt CA Certificate file.
- After you've entered all the details, click Connect.
Actions for Web API
Execute Web API
Execute the given Web API and return the response.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Request Type | GET/POST/PUT/PATCH/DELETE | Required |
URL | Jinja-templated Url Endpoint. | Required |
Headers | Jinja-templated Web api request headers | Optional |
Params | Jinja-templated Web api request parameters. | Optional |
Body | Jinja-templated Web api request body | Optional |
Username | Username for request. | Optional |
Password | Password for request. | Optional |
Client Certificate | Upload a .p12 Client Certificate file. | Optional |
Client Certificate Password | Enter the password to read the client certificate. | Optional |
Expected Response Format | Select how to parse the response based on its expected format. Raw/CSV/HTML/JSON/File. (Default is "Raw" and will pass the full body to the response field). File will write the raw response to a file (as binary data) and return the file-id. | Optional |
Explode Results | If server response is parsed as a list of values instead of a single value, return as individual rows for each value (Default is False). | Optional |
Multipart Form Data | Select if you are sending form data in body and body should be in JSON with no headers. Default is No | Optional |
Change cURL to Web API integration inputs
curl --location --request POST 'https://beecepter/api/path/to/your/endpoint?pageSize=20&offset=60' \ --header 'Content-Type: application/json' \ -u 'admin:thisispassword' \ --data '{ "id":23, "category": "A" }'
For the above cURL request the inputs will be:
Request Type:
POST
URL:
https://beecepter/api/path/to/your/endpoint
Headers:
{"Content-Type": "application/json"}
Params:
{"pageSize":20,"offset":60}
Body:
{"id":23,"category": "A"}
Username:
admin
Password:
thisispassword
Output
A JSON object containing multiple rows of result:
- has_error: True/False
- error: message/null
- other keys of JSON response
Release Notes
v4.0.8
- Support for multipart form data.v4.0.4
- BUG fix: Credentials Stored in Integration Connection Reference Values Are Displayed in Errorsv4.0.0
- Updated architecture to support IO via filesystemv3.2.0
- Added optional fieldCA Certificate
at connection level to override the default certificate.
Updated 4 months ago