Actually, I struggled very very much to understand how API Connect service works. Because, I couldn't find a good documentation in IBM official site. So, I hope that someone who needs to understand may benefit from this article. I think that writing too much about API Connect UI is not very helpful. That is to say, Pictures sometimes may say many things clearly. So, you will see many screenshots with simple descriptions. 😉
First view of IBM Cloud UI
Creating API Connect Service
API Connect Service First View
Creating First Sample OpenAPI
Creating, Staging and Publishing a Default Product for API
After Weather Provider API is created in Drafts section, we can test it in Assemble UI. But, it will not be appeared in Developer Portal. So, it will not be able to consumed by any application. Because, Weather Provider API is not added in any Product. That's why, we need to add this API in a Product. you can see how it is made in the following screenshot. "Generate a default product" menu will generate a product and add this API in generated product in Drafts's Products section.
As shown in two screenshots below, first screenshot is showing that product is staged. Second screenshot is showing that it is published.
Re-staging Product to Catalog
Why do we need to re-stage a published product? Because, when we update any API swagger definition or Assemble, we should stage our changes in Catalog. In order to do this, we need to stage product. So, our changes will be transferred to catalog.
Why don't we stage API directly? Because, Product includes APIS and Catalog includes Products. So, if we want to stage our API to a Catalog then we need to stage Product, not API.
Publishing Staged Product to Developer Portal
As shown in the picture above, there are no APIs in Explore UI. Because, Product state is staged. So, this means that there are some changes in Product and it should be published. So, where are we publishing this product with APIs? They are published to the Developer Portal of Catalog. So, we are going to see it in next section.
Explore and Test Published APIs
This UI is to test published APIs for API Developer. There are two sides. One of them is API developer and other side is third party provider (API consumer developer). That is to say, as a developer, I generated it and published as well. So, I can test it from this UI. But, third party providers can not use this UI. Because, this is IBM API Connect UI. Of course, we can share this Endpoint with third party providers and they can consume it. But, there should be a Developer Portal to explore exposed APIs. For that reason, Developer Portal exists for them.
In order to test API. Copy Curl command from the picture above and then paste in local Terminal as following screenshot. It is working
or you can test API from UI as well.
But, I think that Postman is best option for testing an API.
NOT: Do not use test section which is in the right side of developer portal as shown in the picture above. It does not work properly. So, if you do not want to waste your time, test your gateway with Postman or curl.
Publishing Developer Portal for Third Party Providers
Every Catalog has a separate Developer Portal. By default, Developer Portal is not published for any Catalog. To do that, we can follow the following screenshots.
As seen, Developer Portal looks different than Explore UI in IBM API Connect tool.