One-click Installation of Apinizer on Ubuntu 22.04 LTS
This document describes how to install Apinizer on a server with Ubuntu 2022.04 LTS Live Server operating system.
Minimum Requirements
- 4 Core CPU
- 8 GB Ram
#1) Apinizer Installation
#1.1) Run the script below on Ubuntu 2022.04 LTS to install Apinizer.
sudo curl -s https://raw.githubusercontent.com/apinizer/apinizer/main/installApinizer.sh | bash
#1.2) Login to Apinizer Management Console
Default Address : http://YOUR-IP-ADDRESS:32080
Default username : admin
Default password : Apinizer.1!
Step – 2: Create Index Lifecycle Policies and Index Templates
Go to Elasticsearch Clusters Menu (Administration -> Server Management -> Elasticsearch Clusters) Click red cards for Create Index Lifecycle Policies and Index Templates.
After clicking to red cards, you should see them as below.
Step – 3: Publish Environment on Kubernetes.
Go to Gateway Environments (Administration -> Server Management -> Gateway Environments) Click unpublished button for Publish Environment on Kubernetes.
After clicking to unpublished button, you should see them as below after about 2 minutes.
Step – 4: Create first API Proxy and Publish
Select default project on topbar.
Select the default project from the window that comes up.
You will see that left menu changes.
Note: Quick Menu and Main Menu are prepared according to the roles and privileges of the active user.
Two different menus can be displayed in the Main Menu area:
- If the active user has selected a Project, i.e. if the project name appears on the far left in the Quick Menu, ("demo" appears in this image), the Developer Menu is displayed. Jobs related to the items in this menu are described in the Developer's Guide.
- If the active user has the Administrator role and selects any item from the Quick Menu (for example, clicks on Overview), the Admin Menu is displayed. Jobs related to the items in this menu are described in the Administrator's Guide.
When an item is selected from any menu, the Work Area is updated according to the selected item.
Go to API Proxies (Development -> API Proxies)
Creating an API Proxy
Click the +Proxy button at right top side of the interface.
Click the Enter URL link for Swagger 2.x from the options in the New API Proxy creation interface.
Enter "https://petstore.swagger.io/v2/swagger.json" into the textbox labeled URL, and click the Parse button.
Apinizer parses the Swagger file at the address given, and display the details of the API.
Check "https://petstore.swagger.io/v2" in the Addresses part, and enter /petstoreProxy into the Relative Path textbox before clicking the Save button at the right top.
That is all to create an API Proxy.
Deploying the API Proxy
When the API Proxy is created, several tabs appear on the interface. With the configurations to be made from these tabs, the behavior of API Proxy can be customized. API Proxy must be deployed to be accessible. Open the Develop tab.
The Develop tab shows API Proxy's endpoints on the left, and policies and flow in the middle. Various links or buttons open interfaces related to configurations. Click the Deploy button at the middle top. You will see active environment options (1 Prod in demo environment), choose the appropriate one. An deployment description entry window appears, but it is not mandatory to fill in. Continue by pressing the Deploy button.
API Proxy is deployed and ready to access.
Accessing the API Proxy
When the API Proxy is deployed, the access address appears on the interface. API Proxy is now an API for clients (API Consumers) who want to access it and is available at this address.
There are many ways to send a request to an API. In this example, the interface provided by the platform will be used for simplicity.
On the left, select the endpoint/method you want to access. New links appear in the lower middle and the access address is updated to point to the address of the selected endpoint. Click the Test Endpoint link.
In the popup window that opens, there are tabs where the endpoint's header, body, validation rules or advanced settings can be managed, including which HTTP Method the endpoint expects, the access address, and the parameters tab under them by default. Enter pending for the status parameter. You can see that the URL changes while you type. Click the Send button.
Tabs appear with the endpoint's response, headers, validation results if any validation rule defined, and detailed log records.
Congratulations 😊. You have created an API Proxy and accessed it.
Uninstallation
Run the following script on the server to uninstall Apinizer completely.
sudo curl -s https://raw.githubusercontent.com/apinizer/apinizer/main/uninstallApinizer.sh | bash
This document describes how to install Apinizer on a server with Ubuntu 2022.04 LTS Live Server operating system.
Minimum Requirements
- 4 Core CPU
- 8 GB Ram
#1) Apinizer Installation
#1.1) Running the script below on Ubuntu 2022.04 LTS to install Apinizer.
sudo curl -s https://raw.githubusercontent.com/apinizer/apinizer/main/installApinizer.sh | bash
#1.2) Login to Apinizer Management Console
Default Address : http://YOUR-IP-ADDRESS:32080
Default username : admin
Default password : Apinizer.1!
Step – 2: Create Index Lifecycle Policies and Index Templates
Go to Elasticsearch Clusters Menu (Administration -> Server Management -> Elasticsearch Clusters) Click red cards for Create Index Lifecycle Policies and Index Templates.
After clicking to red cards, you should see them as below.
Step – 3: Publish Environment on Kubernetes.
Go to Gateway Environments (Administration -> Server Management -> Gateway Environments) Click unpublished button for Publish Environment on Kubernetes.
After clicking to unpublished button, you should see them as below after about 2 minutes.
Step – 4: Create first API Proxy and Publish
Select default project on topbar.
Select the default project from the window that comes up.
You will see that left menu changes.
Note: Quick Menu and Main Menu are prepared according to the roles and privileges of the active user.
Two different menus can be displayed in the Main Menu area:
- If the active user has selected a Project, i.e. if the project name appears on the far left in the Quick Menu, ("demo" appears in this image), the Developer Menu is displayed. Jobs related to the items in this menu are described in the Developer's Guide.
- If the active user has the Administrator role and selects any item from the Quick Menu (for example, clicks on Overview), the Admin Menu is displayed. Jobs related to the items in this menu are described in the Administrator's Guide.
When an item is selected from any menu, the Work Area is updated according to the selected item.
Go to API Proxies (Development -> API Proxies)
Creating an API Proxy
Click the +Proxy button at right top side of the interface.
Click the Enter URL link for Swagger 2.x from the options in the New API Proxy creation interface.
Enter "https://petstore.swagger.io/v2/swagger.json" into the textbox labeled URL, and click the Parse button.
Apinizer parses the Swagger file at the address given, and display the details of the API.
Check "https://petstore.swagger.io/v2" in the Addresses part, and enter /petstoreProxy into the Relative Path textbox before clicking the Save button at the right top.
That is all to create an API Proxy.
Deploying the API Proxy
When the API Proxy is created, several tabs appear on the interface. With the configurations to be made from these tabs, the behavior of API Proxy can be customized. API Proxy must be deployed to be accessible. Open the Develop tab.
The Develop tab shows API Proxy's endpoints on the left, and policies and flow in the middle. Various links or buttons open interfaces related to configurations. Click the Deploy button at the middle top. You will see active environment options (1 Prod in demo environment), choose the appropriate one. An deployment description entry window appears, but it is not mandatory to fill in. Continue by pressing the Deploy button.
API Proxy is deployed and ready to access.
Accessing the API Proxy
When the API Proxy is deployed, the access address appears on the interface. API Proxy is now an API for clients (API Consumers) who want to access it and is available at this address.
There are many ways to send a request to an API. In this example, the interface provided by the platform will be used for simplicity.
On the left, select the endpoint/method you want to access. New links appear in the lower middle and the access address is updated to point to the address of the selected endpoint. Click the Test Endpoint link.
In the popup window that opens, there are tabs where the endpoint's header, body, validation rules or advanced settings can be managed, including which HTTP Method the endpoint expects, the access address, and the parameters tab under them by default. Enter pending for the status parameter. You can see that the URL changes while you type. Click the Send button.
Tabs appear with the endpoint's response, headers, validation results if any validation rule defined, and detailed log records.
Congratulations 😊. You have created an API Proxy and accessed it.
Uninstallation
Run the following script on the server to uninstall Apinizer completely.
sudo curl -s https://raw.githubusercontent.com/apinizer/apinizer/main/uninstallApinizer.sh | bash