API Gateway

Definitions

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.

Create an API Gateway

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:

  1. In the API Gateway tab, click on "Create API Gateway".

  2. In the modal, enter the API Gateway Name, Description (Optional), choose a Group (default is "default"), and Image (Optional).

The image must be 80x80 in png, jpg or jpeg format. If no image is chosen, the API Gateway will be represented by a standard platform thumbnail, which can be changed later.

  1. To finish, click on "Create".

How to edit an API Gateway

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:

Name and Description:

  1. To edit the "Name" and "Description", just one click will make the area editable.

  2. After making your changes, click outside the editing area or press the Enter key to save your changes.

Image

  1. To change the image, move the mouse closer and click on "Edit".

  2. Once the change has been made, click "Save".

Mouse pointer in the image shows the edit option

Copying an API Gateway

To copy an API Gateway, simply click on "Copy URL".

Deleting an API Gateway

  1. To delete an API Gateway, simply click on "Delete", located in the three dots in the API Gateway editing area.

  2. Enter the name to confirm the deletion and click "Delete" to finish the action.

You can't undo the deletion.

Version

With this feature, you can create different versions for the same API, which can contain different routes and access permissions.

Creating a Version

To create a version:

  1. In "API Gateway", click on the desired item.

  2. Click on "New version".

  1. Enter the Name of the API Gateway version and click "Next Step".

  1. Create a new route (more information below) and click "Save changes".

Editing a Version

To edit a version:

  1. Under "API Gateway", click on the desired item.

  2. Under "Versions", choose the version you want to modify and click "Edit".

  3. To finish, click on "Save changes".

Deleting a Version

To delete a version:

  1. In "API Gateway", click on the desired item.

  2. Under "Versions, choose the version you want to delete and click "Delete".

  3. In the modal, enter the name to confirm the deletion and click "Delete" to finalize the action.

Routes

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.

HTTP Route

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:

  1. With the version already created, when you click on "Next steps", you will be directed to create the route.

  2. Click on "Create new route".

  1. 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".

Trigger 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:

  1. With the version already created, by clicking on "Next steps", you will be directed to create the route.

  2. Click on "Create new route".

  3. 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;

  1. To finish the action, click on "Save route".

Edit Routes

To edit a created route at any time:

  1. Within the version of your API Gateway, choose the item you want to change and click "Edit".

  2. Once you've made your changes, click "Save changes".

Execution limit

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".

The default run limit is 10 runs per minute.

Delete routes

To delete a created route at any time:

  1. Within the version of your API Gateway, choose the item you want to change and click "Delete".

  2. In the modal, enter the name to confirm the deletion and click "Delete" to finalize the action.

Users

If you want to restrict access to one or more users, you can do so using an authentication (Basic ou oAuth2)

Create Users

  1. To create a user, in API Gateway, click on the Users tab.

  2. Click on "Add user";

  3. Customize the rest of the User name;

  4. 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.

Edit Users

To edit a user:

  1. In API Gateway, in the Users tab, click on "Edit" for the desired user.

  1. Make the necessary changes and click on "Save changes".

Deleting Users

To delete a user:

  1. In API Gateway, in the Users tab, click on "Delete" for the desired user.

  2. In the modal, enter the name to confirm the deletion and click on "Delete" to finalize the action.

Read also:

Last updated