...
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
What is the API Gateway?
An important component of PIPEFORCE is the The PIPEFORCE API Gateway . It allows you to manage API endpoints so external partners and systems can connect to your PIPEFORCE internal pipelines or microservices. expose a RESTful API endpoint to the outside world. Once this external endpoint is called, this request can either be forwarded to an internal automation pipeline, a microservice running within PIPEFORCE, or simply put a new message on a queue to inform multiple listeners at the same time about the request.
Furthermore, on the API Gateway endpoint you can additionally add authorization, filtering, logging or simply mock the endpoint until the real implementation is ready:
Drawio | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
To put it into a nutshell, the PIPEFORCE API Gateway can help you in these main spaces:
...
Serve - Support for underlying microservice and automation pipeline call management. In case you have multiple micorservices and want to combine the result of them into a single response. Manage path mappings in order to keep names to external world constant even if internal microservice or pipeline structure and naming changes.
...
Authentication - There is only one entry point which handles authentication and authorization. Otherwise, this has to be re-implemented in any microservice or app again and again.
HTTPS / TLS Termination - The HTTPS communication and its certificates is handled at a central point so microservices and apps are not required to deal with this internally.
No internet exposure required - Microservices and apps are not required to be exposed to the internet which improves security since no ports must be opened managed and secured.
Better Monitoring & Tracing - All incoming requests will be logged at a central point and can be monitored afterwards with seamless following of the microservice call paths.
Decoupling & Transparency - Changes in microservices in the background (for example refactorings in names or paths) can be done fully transparent to the client caller. Also auto-scaling and resilency can be managed by the gateway then. Request paths can be easily re-mapped to internal paths.
Better Mocking & Testing - Endpoins can be mocked which simplifies development and testing in a team, since the API contract can be defined and discussed with the client long time before the microservice or app is up and ready to accept its first request.
Aggregation Combine responses from multiple pipelines and microservices and return the result in one single response.
Transformation & Filtering - Transform the the request or the response of pipelines or microservices into other structures of formats. For example in case a microservice returns a response in a special format, the API gateway can translate it into a common format (for example SOAP → REST). Manipulate headers. And more.
Auto-polling of async results - In case an endpoint calls an async target in a microservice or pipeline, the API Gateway endpoint can be configured so the caller will automatically do long-polling until the result is ready to be fetched.
Caching - Resonses Responses can be cached, so microservices and automation pipelines must not be called on any request. This can improve performance a lot.
Create and edit an endpoint
In order to create a new API endpoint, log-in to the PIPEFORCE portal and go to the Endpoints section. Here, all existing endpoints will be listed. Click on ADD ENDPOINT in order to open the editor to create a new endpoint:
...
If this target is selected, the request will be forwarded to a data pipeline as defined in the Path field. The pipeline will be executed sync and the body of the pipeline will be returned as body response to the caller.
Info |
---|
You can also access request headers, parameters and body from inside your pipeline called by the API Gateway. For more details see: Pipeline Objects |
Service
This target forwards any request to a microservice deployed inside the cluster and managed by PIPEFORCE. Its mandatory to define the name of this service, the port and the service path to forward the request to.
...