webMethods API Portal guide
The API Management suite of products includes two key components
Roles & Responsibilities of API gateway includes:
- API creation & Policy enforcement
- Security - Authentication & authorisation (e.g. OAuth or JWT or API Keys)
- Threat protection (e.g. DoS etc)
- Protocol transformation, routing & orchestration (e.g. SOAP2REST or Mashup)
- Analytics & monitoring
- Throtlling & SLA management
- Generate documentation automatically from published API specification
- Ability to customize the portal to match to your organization’s branding
- Provide developers with SDKs for kick start API consumption.
- Simple intitutive interface(playground) for making sample request to test the published API
- Ability to configure various user onboarding workflows
Communication between API Portal & API Gateway
Below picture captures the overall interaction between API Gateway/ API Portal
Often times people find it very difficult in isolating the causes for the errors in communication failures between these core components. In this article we will see possible checkpoints to isolate the communication failure with respect to application creation request.
Based on the security policy enforcement in API Gateway, API Portal will show a get access token link API details view for the protected APIs. End developers can use the "Request API Access Token" dialog to request new application to consume the API of interest. The request raised in the API Portal immediately delivered to API Gateway for processing(assuming API Gateway is reachable from API Portal). Various such activities performed by end developers are captured as events in API Portal and their respective statuses are tracked in API Portal. This scenario is tracked as "REQUEST_ACCESS_TOKEN"
Check point I:
Query the events API.
|curl --request GET \
--url 'https://api.portal/abs/apirepository/v1/events?eventStatus=NEW,INPROGRESS' \
--header 'authorization: Basic c3lzdGVtOm1hbmFnZXI='
Above request will query the events stored in API Portal with eventStatus in NEW or INPROGRESS.
The response would contain an array of events stored in API Portal. An event would mainly contain 3 section
- executor - basic info on the user who is performing the request.
- source - the object on which the event is performed (API GUID in our case)
- contextdata - the dynamic context information with respect to the event(mainly the user entered data - the app name/description/redirect uri)
Check point II (eventStatus=NEW)
If you see your application request is listed with eventStatus as NEW, this would mean the events are not delivered to API Gateway at all. There could be various possibilties for this
- API Gateway is not reachable from API Portal - Try reaching API Gateway system from API Portal machine(a simple ping would do)
- API Gateway authentication failure. - API Portal uses the username/password provided in the portal destination configuration to contact back to API Gateway. If there are changes in the username/passwords used for communication, then this would result in failure in communication. You can check the username configured for API Gatway in the API Providers view of API Portal.
Check point III (eventStatus=INPROGRESS)
If you see your application request is listed with eventStatus as INPROGRESS, this would mean the events are delivered to API Gateway and API gateway is processing.
- Check whether you have any approvals enabled in API Gateway for application creation/updation/registration. If there are approval policies enabled, applications will be created in API Portal only after pending requests are cleared in API Gateway.
- If you do not have pending approvals, Check whether the application is created in API Gateway. If the application fails to create in API Gateway, then verify the server.log for any failures while provisioning application in API gateway
- IF you see application in API Gateway and still not visible in API Portal, check the API Gateway log for any failures in application publish failure.