WSO2 API Manager is a complete solution for designing and publishing APIs, creating and managing a developer community, and for securing and routing API traffic in a scalable manner. It leverages proven components from the WSO2 platform to secure, integrate and manage APIs. In addition, it integrates with the WSO2 analytics platform and provides out of the box reports and alerts, giving you instant insights into the APIs behavior.
Tip | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Follow the instructions below to run WSO2 API-M.
|
...
- Open the API Publisher (
https://<hostname>:9443/publisher
) and sign in withadmin/admin
credentials. - Exit from API creation tutorial by clicking the close icon(X) on top right corner.
Click the Deploy Sample API button. It deploys a sample API called
PizzaShackAPI
into the API Manager.Note This Deploy Sample API option is available only when there are no APIs in API Publisher. If you have already created a an API, this option will not be available.
Click
PizzaShackAPI
to open it.
Go to the Lifecycle tab and note that the State is
PUBLISHED
. The API is already published to the API Store.
Sign in to the API Store (
https://<hostname>:9443/store
) with theadmin/admin
credentials and click on thePizzaShackAPI
API.
Tip title API Store Walkthrough You can click "API Store walkthrough" to view the interactive tutorial to invoke the API.
Select the default application and an available tier, and click Subscribe.
When the subscription is successful, click View Subscriptions on the information message that appears. Click the Production Keys tab and click Generate Keys to generate an access token to invoke the API.
You have now successfully subscribed to an API. Let's invoke the API using the integrated Swagger-based API Console.
Click the APIs menu again and click the
PizzaShackAPI
to open it. When the API opens, click its API Console tab.
Expand the GET method (which retrieves the menu) and click Try it out.
Note the response for the API invocation. It returns the list of menu items.
...
Go to the API Store (
https://<hostname>:9443/store)
and create an account using the Sign-up link.
Note Users who sign-up through the API Store are assigned the
subscriber
role by default. Therefore, you do not need to specify the role through the management console to be able to subscibe to an API.Fill the details in the Sign Up form appears and click Sign Up.
Note Users who registered with the API Store Signup can be view by login to the Management Console (https://localhost:9443/carbon) and accessing Users and Roles > Users > List.
Details entered in the sign up will be updated in the default profile related to each user in the management console.
After signing up, sign in to the API Store and click the
PhoneVerification 2.0.0
API that you published earlier.Note that you can now see the subscription options. Select the default application and the
Bronze
tier. Click Subscribe.
- Once the subscription is successful, click View Subscriptions in the information message that appears to review your subscriptions.
Click the Production Keys tab of the application and then click Generate Keys to generate an access token that you use later to invoke the API. If you have already generated keys before, click Re-generate.
Tip Tip : You can set a token validity period in the given text box. By default, it is set to one hour. If you set a minus value (e.g., -1), the token will never expire.
...