HTTP (Hypertext Transfer Protocol) request is a message that is sent to a web server. It is used to retrieve, update, create resources such as web pages, images, videos, and other types of files.
When using HTTP actions in Inginie, you have two options:
Option 1 #
Use a Dedicated Key for HTTP #
You can generate a dedicated key specifically for handling HTTP actions. You can then use this key when performing actions within your workflow. You can control access and permissions for this key separately.
For this option, follow these steps:
- Add a new HTTP key to Engini by following this guide.
- Choose the Http software and click on the “Send Authorized Http Request” action.
- Click on the 3 dots located at the right top side of the activity.
- Select the key you want to use in this activity from the available options. This action will automatically update the activity based on the key you have chosen. For example, “NetSuite HTTP” key.
- Follow the next steps to define the activity:
- URL
The URL field is automatically populated with a suitable and unique URL based on the key you have selected. This URL typically identifies the target endpoint or resource you want to interact with. It cannot be edited in this field because it is generated based on the chosen authorization key, ensuring that the request is directed to the correct destination. - Relative URL
You can specify additional path segments or parameters that need to be added to the end of the automatically generated URL. This allows you to customize the specific resource or operation you want to perform within the target system. - Method
Specifies the type of request being made.
Choose from the tooltip the method you want to use:- GET – requests a resource from the server.
- POST (by default)- submits data to be processed by the server.
- PUT- used to update or replace an existing resource on the server.
- PATCH – used to partially update or modify an existing resource on the server. It is similar to the PUT method, but instead of replacing the entire resource, PATCH allows you to specify only the changes or updates to be applied to the resource.
- DELETE – used to request the removal of a resource on the server.
- Body Type
The request body typically contains the payload or content of the request, which can be in various formats.
Choose from the drop down the body type:
- application/json: Indicates that the request body contains data in JSON format.
- application/x-www-form-urlencoded: Indicates that the request body contains form data, typically used in HTML forms.
- multipart/form-data: Indicates that the request body contains binary data or files, typically used for uploading files from a client to a server.
- text/html: Indicates that the request body contains html text data.
- text/plain: Indicates that the request body contains plain text data.
- text/xml: Indicates that the request body contains xml text data.
- Body
Contains any data that is being sent to the server. - Add Headers
Additional metadata about the request, such as the type of data the Engini can accept, the length of the request body, and authentication information.- Click on the “Add Headers” button to add a header.
- Click on the key field to enter the key, and on the value field to enter a value.
Each header consists of a key-value pair, where the key is the name of the parameter, and the value is the data associated with that parameter. - Click on the “add key” button to add more keys.
- Add Queries
The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server. Queries are typically used in the HTTP GET request method to specify the values or filters for the requested data, although they can also be used in other HTTP request methods. Queries are added to the URL of an HTTP request after a question mark (“?”) and are separated by ampersands (“&”).- Click on the “Add Queries” button to add a Query.
- Click on the key field to enter the key, and on the value field to enter a value.
Each query consists of a key-value pair, where the key is the name of the parameter, and the value is the data associated with that parameter. - Click on the “add key” button to add more keys.
- URL
Option 2 #
Use a dedicated activity directly #
You can choose not to create a dedicated key and instead input all the required details directly into the activity itself when setting up the HTTP action. This method simplifies the setup process but may be less secure and less organized, especially in scenarios where multiple workflows or users are involved.
- Choose the Http software and click on the “Send Http Request” action.
- Follow the next steps to define the activity:
- URL
Uniform Resource Locator: This identifies the location of the resource being requested on the web server. It typically includes the protocol (e.g., http:// or https://), the domain name or IP address of the server, and the path to the specific resource on the server. - Method
Specifies the type of request being made.
Choose from the tooltip the method you want to use:- GET – requests a resource from the server.
- POST (by default)- submits data to be processed by the server.
- PUT- used to update or replace an existing resource on the server.
- PATCH – used to partially update or modify an existing resource on the server. It is similar to the PUT method, but instead of replacing the entire resource, PATCH allows you to specify only the changes or updates to be applied to the resource.
- DELETE – used to request the removal of a resource on the server.
- SSL Certificate Verification
To ensure secure data transmission over the Internet, HTTPS pages may require an SSL certificate. This property in Engini allows you to specify whether validation of an SSL certificate is necessary. If you want to disable SSL validation, set the property to False.
Note: The default value is True. - Body Type
The request body typically contains the payload or content of the request, which can be in various formats.
Choose from the drop down the body type:
- application/json: Indicates that the request body contains data in JSON format.
- application/x-www-form-urlencoded: Indicates that the request body contains form data, typically used in HTML forms.
- multipart/form-data: Indicates that the request body contains binary data or files, typically used for uploading files from a client to a server.
- text/html: Indicates that the request body contains html text data.
- text/plain: Indicates that the request body contains plain text data.
- text/xml: Indicates that the request body contains xml text data.
- Body
Contains any data that is being sent to the server. - Authentication
A process of verifying the identity of a client that is making a request to a server. It is used to ensure that only authorized users or applications are allowed to access certain resources or perform specific actions on a web server.
Choose from the drop down the type of the authentication:
- Basic Authentication (by default): In this method, the client includes a username and password in the “Authorization” header of the HTTP request. The server then verifies the provided credentials against a known list of usernames and passwords to authenticate the client.
- Bearer Authentication: Involves the use of a token (usually a JSON Web Token or JWT) that is included in the “Authorization” header of the HTTP request. The token contains encoded information about the client’s identity and is used to authenticate the client on the server.
- Custom Authentication – Unique or customized authentication mechanism that is not part of the standard authentication methods provided by the HTTP protocol. Custom authentication can be used to meet specific security requirements or business logic of an application.
- None
- Basic Authentication (by default): In this method, the client includes a username and password in the “Authorization” header of the HTTP request. The server then verifies the provided credentials against a known list of usernames and passwords to authenticate the client.
- Add Headers
Additional metadata about the request, such as the type of data the Engini can accept, the length of the request body, and authentication information.- Click on the “Add Headers” button to add a header.
- Click on the key field to enter the key, and on the value field to enter a value.
Each header consists of a key-value pair, where the key is the name of the parameter, and the value is the data associated with that parameter. - Click on the “add key” button to add more keys.
- Add Queries
The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server. Queries are typically used in the HTTP GET request method to specify the values or filters for the requested data, although they can also be used in other HTTP request methods. Queries are added to the URL of an HTTP request after a question mark (“?”) and are separated by ampersands (“&”).- Click on the “Add Queries” button to add a Query.
- Click on the key field to enter the key, and on the value field to enter a value.
Each query consists of a key-value pair, where the key is the name of the parameter, and the value is the data associated with that parameter. - Repeat steps 1-2 to add additional keys.
- URL
Download File From Url
#
Download a file using from a public URL.
- Enter the URL into the empty field.
- Please make sure the URL is public and does not require authentication.
The output of this activity returns the following:
- base64String – holds the file content
- filename
- filesize
- url
Send Webhook Response
#
When a webhook is received, the this activity allows you to send a response back to the source of the webhook, confirming the receipt of the data or providing additional information.
- Status Code
The status code provides information about the success or failure of the webhook processing, allowing the sender to understand the response.- Click on the empty field, and a list of predefined HTTP status codes will appear.
- Select the appropriate status code that best represents the outcome of the webhook processing. Common status codes include:
- 200 (OK)
- 201 (Created)
- 400 (Bad Request)
- 404 (Not Found)
- Body Type
Specify the format or type of data that you want to include in the response body. The choice of body type depends on the nature of the response you want to send and the requirements of the receiving system. Choose from the drop down the body type:
- File (application/octet-stream): Rpresents a specific format for transmitting data between systems. This format is commonly used to send and receive binary files, such as images, audio, video, documents, and other non-textual data.
- application/json: Indicates that the request body contains data in JSON format.
- text/plain: Indicates that the request body contains plain text data.
- text/xml: Indicates that the request body contains xml text data.
- Body
Provide the actual content of the response. Depending on the selected body type, you should format the response content accordingly. - Add Headers
Additional metadata about the response.- Click on the “Add Headers” button to add a header.
- Click on the key field to enter the key, and on the value field to enter a value.
Each header consists of a key-value pair, where the key is the name of the parameter, and the value is the data associated with that parameter. - Repeat steps 1-2 to add additional headers.