API Builder

Objective


SOAJS offers a rich UI wizard that assist you in creating Multi Model Microservices and / or Endpoints with Multi Authentication capabilities.

Microservices


Microservices represent small atomic servers that dispose of multiple APIs and handle a specific type of request. 

A project is built from a collection of microservices that communicate with one another to achieve the business purpose of this project, Learn More.

SOAJS offers the mechanism to build microservices and later orchestrates deploying them in multiple environments, managing and operating on top of them.

The API builder offers a wizard that assists in creating, configuring and defining the Rest Layer of your microservice, the APIs in that layer and the inputs and responses of each API.

The wizard also offers the mechanism to define how many data models your microservice needs to communicate with depending on the business logic you are going to put inside it.

Finally and only for microservices, the API builder provides you with a copy of the source code so you can alter it and add your business logic instructing the APIs of the microservice what to do.

Endpoints


The API Builder also allows you to create Endpoints that sit on top of any resource no matter the technology or language of that resource.

Once created, the endpoint inherits multiple features that SOAJS offers such as: Productization - Multitenancy - IMFV - Awareness ..., you can refer to the SOAJS documentation space to learn more.

Endpoints created using the API builder support all authentication method per API: Basic Authentication - oAuth - SOAP - custom ...

Endpoints rely on 2 models ( REST  & SOAP ) to bridge out to the destination resources.

Wizard


The wizard leverages SOAJS by using:

  • SOAJS IMFV engine to help you define the API inputs and their validation
  • SOAJS Response to help you standardize the responses of your APIs
  • SOAJS Composer to help you build microservices at lightning speed







1- Creating Microservices


Head to Develop → API Builder and select the microservices tab and follow the wizard instructions to create a new microservice.

  • Provide the basic information of your service: name - port - group ...
  • Turn on multiple SOAJS features and associate them to your service
  • Define how many Data models your service needs to communicate with and what drivers to use
  • Provide a Swagger YAML Configuration of the Microservice Rest Layer

The wizard will render the YAML configuration and generate the rest layer by reverse engineering it along with the inputs and response of each API.

Once the Microservic is created, the wizard will populate a rich Editor that allows you to extend the APIs configuration and attach more complex configuration through simple clicks.

In addition, the wizard synchronizes all your configuration with the same swagger engine and supplies you with an input validator that engine that you can use to test the configuration of your inputs per API.

The validation engine relies on the SOAJS IMFV engine to check your inputs.

Basic Microservice Information
Swagger Yaml Configuration
UI Wizard

At this point your microservice configuration as well as the Rest Layer configuration is ready but the microservice is not generated yet.

Click on the Download Button  and the wizard will provide you with a zip file that contains a copy of the source code you have configured for the microservice.

Extract the zip, locate the README.md file and follow the instructions; Learn More.

After you run the command from the README.md file, he extracted module will be updated and will contain a full structure for a microservice.

The REST layer, the API middlewares, the data models and the testing platform will be populated and ready for you to fill in the business logic of each API and unit/integration test case.

Complete the business logic and place the generated code in a GIT repository then activate and sync your repo to deploy the source code in your environments.




2- Creating Endpoints


Endpoints Available at Herrontech SAAS and in SOAJS Enterprise

Endpoints are only available if you have an account at www.herrontech.com and if you have a project running on the herrontech SAAS OR if you are using the enterprise version of SOAJS


Head to Develop → API Builder and select the endpoints tab and follow the wizard instructions to create a new endpoint.

  • Provide the basic information of your service: name - port - group ...
  • Select the Authentication Resources that the endpoint needs to use.
  • Turn on multiple SOAJS features and associate them to your service

Once the Endpoint is created, the wizard will populate a rich Editor that allows you to create and build the APIs, their inputs configuration and attach the authentication methods to each of them.

In addition, the wizard synchronizes all your configuration with the same swagger engine mentioned above and supplies you with an input validator that engine that you can use to test your inputs.

The validation engine relies on the SOAJS IMFV engine to check your inputs.

Basic Endpoint Information

Swagger YAML Engine
UI Wizard Authentication Methods

Unlike Microservice, when you finish building your endpoint, simply click on the publish button to generate a copy from it in the API Catalog.

Once the endpoint is registered in the API Catalog, you can then deploy it in your environments and operate on it.