Software AG Products 10.5 | Using API Gateway | Usage Scenarios | API First Implementation | API First Implementation using Integration Server
 
API First Implementation using Integration Server
This use case explains the steps involved in adapting API First from Integration Server. When an API created in API Gateway is implemented in Integration Server, then the API Contract is sent from API Gateway to Integration Server.
The use case starts when you create an API in API Gateway and ends when you communicate the API implementation endpoint to API Gateway.
In this example, the APIFirst API is created in API Gateway and implemented in the Integration Server instance, IS1 that is configured in API Gateway.
Before you begin
*Ensure that you have the Manage API privilege.
*Configure the required Integration Server instances in API Gateway for implementing your APIs.
*To adapt API First design using Integration Server
1. Log on to API Gateway.
2. Click APIs in the title navigation bar.
A list of all existing APIs appears.
3. Click Create API to create an API with required API documentation.
4. Click Policies and define required policies for the API.
5. Click Enable Mocking to mock and generate API mock responses.
This step enables the API to send responses to the requests received from consumers.
6. From the APIs page, click Publish for the APIFirst API.
The Publish API dialog box appears.
7. Select Integration Servers.
The list of configured Integration Servers instances appears.
8. Select the IS1 instance from the list.
9. In the Package Name and Folder Name fields, provide the package name and folder name of the IS instance in which the API must be implemented.
The API along with the API contract is published to Integration Server.
10. After implementing the API in Integration Server, invoke the REST end-point to communicate API implemented endpoint to API Gateway:
PUT http://<API Gateway host>:<port>/rest/apigateway/apis/{apiId}/implementation
{
"maturityState": "string",
"nativeBaseURLs": [
"string"
]
}
You can provide required values for the parameters in the above command. For information on parameters, see List of Parameters used in API Implementation.
Example:
PUT http://10.2.151.149:5555/rest/apigateway/apis/
94dfd243-dd54-4d7e-8ba5-396ffaf6fe4e/implementation
{
"nativeBaseURLs":["https://10.2.35.125:5556/ws/srvs:Calculator/
CalculatorHttpSoap11Endpoint",
"http://10.2.151.149:5555/ws/srvs:Calculator/CalculatorHttpSoap11Endpoint"],
"maturityStatus" : "Implemented"
}
For details on the REST API, see the swagger file APIGatewayServiceManagement.json, located at Install directory/IntegrationServer/instances/default/packages/ WmAPIGateway/resources/apigatewayservices/APIGatewayServiceManagement.json. For more information on Service Management, see Service Management.
As a result of the REST call, the mocking of the API is disabled and the consumers requests are directed to the actual implementation.