API Gateway
Last updated
Last updated
An API Gateway is an API management tool that allows you to create or use third-party APIs in one place, making it a quick and practical API management solution. It acts as a reverse proxy to accept all API calls, aggregate the various services needed to execute them, and return the appropriate result.
With this in mind, to facilitate the creation of your flows in different integrations, the platform's API Gateway solution was designed to be your API management hub, featuring Basic authentication (with username and password) for one or more users and routing (route creation). Additionally, you can not only manage external APIs but also create an API from scratch, allowing you to use it within a flow on the platform.
You can create one or more API Gateways to control different APIs, whether they are external or created within the platform. To do this, follow these steps:
In the API Gateway tab, click on "Create API Gateway".
In the modal, enter the API Gateway Name, Description (Optional), choose a Group (default is "default"), and Image (Optional).
To finish, click on "Create".
To edit the API Gateway, simply click on the desired item. You will then be directed to the editing screen. We have separated the editing steps below:
To edit the "Name" and "Description", just one click will make the area editable.
After making your changes, click outside the editing area or press the Enter key to save your changes.
To change the image, move the mouse closer and click on "Edit".
Once the change has been made, click "Save".
To copy an API Gateway, simply click on "Copy URL".
To delete an API Gateway, simply click on "Delete", located in the three dots in the API Gateway editing area.
Enter the name to confirm the deletion and click "Delete" to finish the action.
With this feature, you can create different versions for the same API, which can contain different routes and access permissions.
To create a version:
In "API Gateway", click on the desired item.
Click on "New version".
Enter the Name of the API Gateway version and click "Next Step".
Create a new route (more information below) and click "Save changes".
To edit a version:
Under "API Gateway", click on the desired item.
Under "Versions", choose the version you want to modify and click "Edit".
To finish, click on "Save changes".
To delete a version:
In "API Gateway", click on the desired item.
Under "Versions, choose the version you want to delete and click "Delete".
In the modal, enter the name to confirm the deletion and click "Delete" to finalize the action.
Now that you’ve created at least one version, you can set up one or more routes for your API.
A route is an address (URL) that directs to a flow, acting as an endpoint for accessing your API in Skyone Data. For example, you can create a route named "/products" to handle all flows related to products (saving, listing, deleting products) using one or more versions. By using routes with different HTTP methods, Skyone Data's API Gateway simplifies the use of APIs or the creation of APIs to perform various tasks in different flows.
For greater flexibility, our API Gateway allows the creation of two types of routes: Trigger and HTTP, which we’ll explore in detail below.
When you create an HTTP route, which always uses an external API, you can point to a route in a given language, even if the endpoint is in a different language, making it easy for any Skyone Data user to use external APIs. So if, for example, you want to make a request to the "/orders/approve" endpoint of an API, you can create a route called "/orders/approve".
In other words, instead of using the external API, without customization, you use it with a unique URL and custom data: route, version and user access (Basic authentication).
Create an HTTP route:
With the version already created, when you click on "Next steps", you will be directed to create the route.
Click on "Create new route".
Enter the route data:
Enter the Route URL you want to use in the route, which may be different from the original.
Choose one or more API Gateway route methods (GET, POST, PUT, PATCH OR DELETE);
Under Route Type, choose HTTP;
Enter the Protocol (HTTP or HTTPS), the Host (API address) and the Port used;
Enter the API's original Path (endpoint)
Choose the Execution limit (number of executions and period);
Optionally, if you have already created a user, click on the "Protected route" option and choose the user who needs access to this route;
4. To finish the action, click on "Save route".
When you create a Trigger route, which doesn't use an external API, you can carry out different operations without having to repeat the configuration in each flow, as well as controlling access according to the user registered in the API Gateway, if you want access to be restricted.
In other words, instead of repeating the data in different flows, you use it with a single URL and personalized data: route, version and access per user (Basic authentication).
Create a trigger route:
With the version already created, by clicking on "Next steps", you will be directed to create the route.
Click on "Create new route".
Enter the route data:
Enter the Route URL you want to use in the route, which may be different from the original.
Choose one or more API Gateway route methods (GET, POST, PUT, PATCH OR DELETE);
Under Route Type, choose Trigger;
Choose the Execution limit (number of executions and period);
Optionally, if you have already created a user, click on the Protected route option and choose the user who needs access to this route;
To finish the action, click on "Save route".
To edit a created route at any time:
Within the version of your API Gateway, choose the item you want to change and click "Edit".
Once you've made your changes, click "Save changes".
You can manage the number of executions of your API Gateway through the Execution Limit, i.e. determining the maximum number of times the API will be requested over a period of time.
To do this, when editing a route, choose the desired number and time measure (second, minute or hour).
Finally, click on "Save changes".
Time is measured in seconds, minutes and full standard time. For example: Imagine you have a route and the limit on executions is set to 2 per minute. Even if the call starts at 08:45:55, the limit is until 08:45:59, because 08:46:00 will be counted as a new series of executions.
To delete a created route at any time:
Within the version of your API Gateway, choose the item you want to change and click "Delete".
In the modal, enter the name to confirm the deletion and click "Delete" to finalize the action.
If you want to restrict access to one or more users, you can do so using an authentication (Basic ou oAuth2)
To create a user, in API Gateway, click on the Users tab.
Click on "Add user";
Customize the rest of the User name;
Choose the authentication type: Basic or oAuth2, and follow the setup according to the selected type.
To complete the setup for a Basic user, enter the Password, then click "Save user".
The created users are listed under the "Users" tab in the API Gateway.
To edit a user:
In API Gateway, in the Users tab, click on "Edit" for the desired user.
Make the necessary changes and click on "Save changes".
To delete a user:
In API Gateway, in the Users tab, click on "Delete" for the desired user.
In the modal, enter the name to confirm the deletion and click on "Delete" to finalize the action.
You can delete any user, as long as they are not currently associated with a route. If this is the case, you need to edit the routes that include the user and remove them from the "Is this route protected?".
Read also: