This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Create and Publish an API
- Log in to the API Publisher.
Click the Add link and provide the information given in the table below.
Field  Sample value Name  PhoneVerificationContext /phoneverifyVersion  1.0.0 Visibility  Public Resources URL pattern CheckPhoneNumber  Request types GET, POST, OPTIONS
Tip: Selecting theÂ
OPTIONS
method is mandatory if you want to allow subscribers to invoke the API using the API Console in the store.For the resources that have methods requiring authentication (i.e., Auth Type is not NONE), you set None as the Auth type of
OPTIONS
to support CORS (Cross Origin Resource Sharing) between the API Store and Gateway.Click Add New Resource. After the resource is added, expand its
GET
method, add the following parameters to it and click Implement.
You add these parameters as they are required to invoke the API using our integrated API Console in later tutorials.Parameter Name Description Parameter Type Data Type Required PhoneNumber Give the phone number to be validated Query String True LicenseKey Give the license key as 0 for testing purpose Query String True The
Implement
tab opens. Provide the information given in the table below. Click the Show More Options link to see the options that are not visible by default.Field Sample value Implementation method Backend Endpoint type HTTP endpoint Production endpoint This sample service has two operations as
CheckPhoneNumber
andCheckPhoneNumbers
. Let's useÂCheckPhoneNumber
here.
http://ws.cdyne.com/phoneverify/phoneverify.asmxTo verify the URL, click the Test button next to it.
Endpoint security scheme Non Secured
(If secured, user is asked for credentials of the backend service)Click Manage to go to the
Manage
tab and provide the following information.Field Sample value Description Tier Availability Select all The API can be available at different levels of service. They allow you to limit the number of successful hits to an API during a given period of time. Transports HTTP and HTTPS The transport protocol on which the API is exposed. Both HTTP and HTTPS transports are selected by default. If you want to limit API availability to only one transport (e.g., HTTPS), un-check the other transport. - Click Save & Publish. This will publish the API that you just created in the API Store so that subscribers can use it.
You have created an API.