Let's go through the use cases of the API Manager:
|Table of Contents|
Invoking your first API
Unfortunately, the Weather API, which is used in API Manager 1.9.1, is not publicly available anymore. Therefore, as the key needed to execute the API invocation is not publicly available, the response mentioned in step 10 does not appear. Follow the tutorials below to learn how to create, subscribe, and invoke an API using a step-by-step approach.
Follow the steps in this section to quickly deploy a sample API, publish it, subscribe to it, and invoking it.
- Open the API Publisher (
https://<hostname>:9443/publisher)and log in with
Click the Deploy Sample API button. It deploys a sample API called
WeatherAPIinto the API Manager.
WeatherAPIto open it.
Let's publish this API.
Go to the Lifecycle tab and note that the State is
PUBLISHED. The API is already published to the API Store.
Log in to the API Store (
https://<hostname>:9443/store)with admin/admin credentials and note that
WeatherAPIis visible under the APIs menu. Click it to open the API.
The subscription options are on the right-hand side of the page. Select the default application and an available tier, and click Subscribe.
When the subscription is successful, choose to go to the My Subscriptions page and click the Generate keys button to generate an access token to invoke the API.
You are now successfully subscribed to an API. Let's invoke the API using the integrated Swagger-based API Console.
Click the APIs menu in the API Store again and then click the API to open it. When the API opens, click its API Console tab.
- Expand the GET method, give the parameter value as "London," and click Try it out.
Note the response for the API invocation. It returns the weather in London.
Anchor step10 step10