You can access the relevant page by following the path System Administrator > Webhook > Web URLs.
On this page, you can create a new WebURL or view existing WebURL records.You can see the columns that provide essential information about the WebURL at a glance in the table.You can customize the columns according to your needs from the table settings.
By clicking the “New” button, you can create a new WebURL. Alternatively, you can edit an existing WebURL by clicking the “Edit” button in the action menu, or delete a WebURL record by clicking the “Delete” button.
On this page, you can make requests to web services using the GET, POST, PUT, and DELETE methods.
The “Variables” section contains informative content about the functions and variables you can use.
Methods
GET:
• Used to retrieve data from the server.
• It is the most commonly used HTTP method.
• Parameters can be sent in the URL.
• Example: https://www.google.com/search?q=cat
POST:
• Used to send data to the server.
• It is used to create new data or update existing data.
• Data is usually sent in the request body.
• Example: https://api.example.com/users
PUT:
• Used to update an existing resource.
• It is used to update the entire resource.
• Data is usually sent in the request body.
• Example: https://api.example.com/users/1
DELETE:
• Used to delete a resource from the server.
• The ID of the resource to be deleted is specified in the URL.
• Example: https://api.example.com/users/1
Params
This section allows you to customize API requests. You can add multiple parameters by clicking the “Add Parameter” button.
You can change the order of the parameters using the drag-and-drop feature.
Key: The name of the piece of data expected by the API. For example, if you want to send a user’s name, the key might be “username.”
Value: The actual piece of data corresponding to the key. For the “username” key, the value would be the actual user’s name (e.g., “john.walker”).
Description: A text explaining what the parameter is for. It is optional but can help you understand what the parameters represent.
Authorization
In this section, options based on the authentication names previously created in the WebURL Authentication page are listed. When an authentication name is selected from the list, the method name related to the authorization method is displayed below.
The authorization feature is used as an authentication method to control access to the API.
The basic working principle of Web URL Authorization is as follows:
The client sends a request to access the API.
The API directs the client to a Web URL for authentication.
The client enters their credentials (such as username and password) on the Web URL.
The Web URL verifies the credentials and sends an authentication token to the client.
The client uses the authentication token to access the API.
Headers
You can use the headers section to add headers to API requests and responses. Headers are used to send additional information to the API and receive additional information from the API.
Key: The name of the piece of data expected by the API. For example, if you want to send a user’s name, the key might be “username.”
Value: The actual piece of data corresponding to the key. For the “username” key, the value would be the actual user’s name (e.g., “john.walker”).
Description: A text explaining what the parameter is for. It is optional but can help you understand what the parameters represent.
Body
The body of an HTTP request contains the data sent to the server. This data can be in various formats.
Web URL Body Use Cases:
• Form Submission: Used to send the data from input forms to the server.
• API Requests: Used to send data to APIs.
• File Uploads: Used to upload files to the server.
None: When this type is selected, no data is sent in the request body. It is used in situations where sending data is not necessary, such as simple GET requests.
Form-Data: This type is similar to the data submission format used in web forms. It is used to send data as key-value pairs. When form-data type is selected, the interface requires you to fill in separate fields for each key and value.
x-www-form-urlencoded: Similar to form-data type, it is used to send data as key-value pairs. However, unlike form-data, the data is sent in URL-encoded format. This format might be preferred by some older APIs.
Raw: This type is used to send raw data without any format restrictions. You can send data in different formats such as JSON, XML, text, or binary data. When the raw type is selected, you need to enter the desired data in the request body in the interface.
Response Manipulation
Web URL Response Manipulation is a technique used to modify responses from a web server. This can be used for various purposes, such as:
Web URL Response Manipulation Examples:
• Formatting Responses: Response Manipulation can be used to transform a JSON response from a web server into an HTML table.
• Hiding Sensitive Information: Responses from a web server can be manipulated to hide sensitive information, such as credit card numbers or social security numbers.
• Testing Responses: Response Manipulation can be used to generate different error codes or response bodies to test web applications.
Test
The Web URL test module is a tool used to test the functionality of a web page or web API. This tool works by sending HTTP requests to a web server and analyzing the responses.
Response Section
The Web URL Response section displays information about the response received from the web server. This section includes the following information:
• Status Code: A code indicating the success of the HTTP request. For example, the 200 OK code indicates that the request was successful.
• Headers: Additional information sent by the web server. For example, the Content-Type header indicates the type of the response.
• Body: The actual data received from the web server.