Sign Up

What are Endpoints?

An endpoint refers to a specific URL (Uniform Resource Locator) that a client can access to interact with the API and perform various operations. Endpoints act as gateways that allow clients (such as web or mobile applications) to communicate with the server hosting the API and perform actions like retrieving data, submitting data, updating information, or executing specific functionalities.

Each endpoint represents a specific entity or action and is associated with a unique path signature and HTTP method (GET, POST, PUT, DELETE, etc.) to determine the type of operation it supports.

Parameters

Endpoint parameters are values or data that are included in the API call to provide additional information or instructions to the API when making a request. These parameters allow clients to customize the behavior of the API and retrieve specific data or perform particular actions.

List of parameters are:

  • Path Variables: Are inserted directly into the URL path, enclosed in curly braces "{}". Adding "(*)" after the path parameter will allow the inclusion of "/" in the path variable.
  • Query Parameters: Are appended to the URL after a question mark "?" and multiple parameters are separated by an ampersand &. They are used for non-essential or optional data, such as filters, sorting, or pagination.
  • Body: Payload of data that is sent as part of an HTTP request, typically when using the HTTP methods POST, PUT, or PATCH. The body contains the data that needs to be transmitted from the client
  • File: Allows you to transfer files from a client. File uploads are commonly used when you need to send files, such as images, videos, documents, or any other binary data, to a server for processing, storage, or other purposes.
  • Headers: Refers to a part of the HTTP request or response that carries metadata or additional information about the message being sent.
  • Cookies: Small pieces of data that are stored in a user's web browser when they visit a website.
  • Form Parts: Data typically sent in the form of key-value pairs and is used to submit information or perform actions on the API.

By marking a parameter as required, any endpoint request made without providing that parameter will result in an error being thrown. This will promptly notify the user or client about the mandatory nature of the parameter and prompt them to include it for successful processing of the request.

Function

Every endpoint triggers a specific class function responsible for processing the incoming request. When calling the class function, you have the option to provide the endpoint parameters as arguments, or alternatively, you can choose to utilize global variables as the input for the function.

Security

When security is enabled Bearer token authentication is applied to the endpoint to ensure security. If you wish to disable security, you can easily do so by using the secure toggle.

Related Topics