Tools
Http Requests
12 min
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 core 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, “test for sharepoint” key follow the next steps to define the activity base 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 delete – used to request the removal of a resource on the server get – requests a resource from 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 post (by default) submits data to be processed by the server put used to update or replace an existing 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 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 core 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 delete – used to request the removal of a resource on the server get – requests a resource from 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 post (by default) submits data to be processed by the server put used to update or replace an existing 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 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 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) presents 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