Create API in WSO2 API Manager from WSO2 AS - wso2

I have a service exposed in my AS at the url: http://192.168.7.160:8284/customer/XXX where XXX is the customer id like http://192.168.7.160:8284/customer/1020
I'm having some difficult to create an API in Api Manager to consume this service.
I try to set the URL Pattern to /customer with a parameter named customer with no luck.
How can I consume this AS service in the Api Manager?

Related

How to setup wso2 api gateway and Can we customize working of WSO2 API gateway?

How to setup wso2 api gateway.
Is it possible to modify/customize behavior of WSO2 gateway
We have our own OAuth server and want to redirect each and every request to OAuth server for authorizing request.
Once request is authorized then gateway should redirect that to back end service/api
We want add some filtering logic as well.
Yes, this is possible with third party key manager support in WSO2 API Manager [1].
The basic idea in here is when generating a token, the token request will go to the OAuth server of yours via the key manager component of API Manager.
When an API request comes in, the gateway send the token validation request to the key manager component of the API manager. From here, you can call the OAuth server of yours to validate the token.
To accomplish your requirement you have to write your logic in Java language. Sample can be found in [2].
https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/configure-a-third-party-key-manager/#configure-a-third-party-key-manager
https://github.com/wso2-extensions/apim-keymanager-okta/blob/OKTA-OAuth-Client-2.0.0/docs/config.md

How to ADD an API on WSO2 API Manager 3.1.0?

I'm trying to create a API from my ERP into WSO2 API Manager ,to access API without use API Manager I need to use a NTLM credential. I want to publish this API into API Manager, but when I trying to create and Publish , I cannot add that credentials and api does not work. where do I submit those credentials?
As you can see on this picture, I'm getting unauthorize.
API Manager Error
WSO2 API Manager v3.1.0 supports basic auth, digest auth, and mutual ssl for backend security. If you want NTLM, then you can use a class mediator. https://medium.com/#nipunadilhara/ntlm-authentication-for-wso2-esb-v6-2-0-9584c3e6713

How wso2 api manager validates whether application is subscribed to API or not when the request comes

How wso2 api manager validates whether application is subscribed to API or not when the request comes. Does keymanager validate that via an API call or Gateway does that?
How wso2 api manager validates whether application is subscribed to
API or not when the request comes?
When you invoke an API, you have to send an OAuth 2 token, WSO2 API Manager validates the subscription based on that token.
Does keymanager validate that via an API call or Gateway does that?
Gateway validate the token via a service call to Key Manager. Also, both Gateway and Key Manager have a cache in their own.

WSO2 API Manager authentication through single page app

I am new to WSO2 API Manager. I have installed it to proxy my REST endpoints and to do access management via oAuth2.
Great! I managed to get access to my backend REST implementation through the oAuth2 process of API Manager (via API console). Now I want to setup the complete roundtrip starting from a user authentication process where identity is verified with corresponding roles. So...
Next I want to create a single page app and bring an authentication step by either redirect the user to a login page (authentication service) or let the user interact with single app page directly and let the single app page do the login to some authentication service.
Question:
Can I use the Key Manager component of the API Manager to handle user authentication (oAuth2 based) or do I need to install the WSO2 Identity Server to handle the authentication?
I see that WSO2 API Manager can host Users and Roles, a User Store and an endpoint to handle (authz) token requests, but can it also handle a login (authentication) request from my single app?
You can use APIM with OAuth2 Authorization code grant type. See this sample in identity server docs, but use below endpoints of APIM instead of IS endpoints.
https://localhost:8243/authorize
https://localhost:8243/token

matching API with data services in WSo2

I have created a data service in WSo2 for exposing a table. I have also created an API for this, Now I wanted to match the API with this data service.
Please help how to do this.
Have you created the API in the ESB? You can create the API in the DSS itself[1] while creating the data service[1][2]. If you want to expose the datasservice via an ESB then the service endpoint of the created dataservice is available in the dataservice dashboard page which can be directly accessed by the ESB.
[1]https://docs.wso2.com/display/DSS321/Defining+Service+Operations
[2]https://docs.wso2.com/display/DSS321/Exposing+Data+as+REST+Resources