WSO2 APIM Beginner's Guide
# Nov 9, 2021Starting to use WSO2 was a hellish experince in the beginning. There are numerous products. The documentation expects you to have some understanding of the system and most of the tutorial’s are that way too. There is also an Enterprise Integrator and Integration Studio that comes with it. Note that I’m new in WSO2 and this post may contain some misinformation. If you want to contribute, you can mail yusufavci99 at gmail.com.
Note: My WSO2 APIM use case was probably a bit unusual. I needed to proxy a server to make it conform the REST standards. Therefore, I mostly learned things that will help for that.
Installation
I installed WSO2 APIM on Docker and used the installation guide provided in
The Official WSO2 site. The installation is fairly straightforward. However, there is a catch. For some reason docker run command doesn’t work unless you do the fix below.
docker run -it \
-p 9443:9443 \
-p 8243:8243 \
-p 8280:8280 \
docker.wso2.com/wso2am -> This Line
wso2/wso2am -> Should Be Changed To This
When you run the container,
https://localhost:9443/publisher/ carbon, devportal and admin pages become available on port 9443 (couldn’t they have just a single page…). I will focus on the usage of the publisher page because the gateway operations can be done there.
Warning: Below is work in progress!
Publisher Page
Resources
Endpoint
Dynamic Endpoint
Mediation with XML
I think XML always looks horrifying. However, I can say that when you start to understand how the mediators generally work. They become less scary. I only used request mediation to manipulate request headers, queries and path.
- Property mediator
- XPath Methods (Expressions)
- Filter Mediator
- Switch Mediator
- URL Rewrite Mediator