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

  1. Log in to the API Publisher.
  2. Click the Add link and provide the information given in the table below.

    Field Sample value
    Name 
    PhoneVerification
    Context
     
    /phoneverify
    Version 1.0.0
    Visibility Public
    ResourcesURL patternCheckPhoneNumber
     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.

  3. 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 NameDescriptionParameter TypeData TypeRequired
    PhoneNumberGive the phone number to be validatedQueryStringTrue
    LicenseKeyGive the license key as 0 for testing purposeQueryStringTrue

  4. 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.

    FieldSample value
    Implementation methodBackend
    Endpoint typeHTTP endpoint
    Production endpoint

    This sample service has two operations as CheckPhoneNumber and CheckPhoneNumbers. Let's use CheckPhoneNumber here.
    http://ws.cdyne.com/phoneverify/phoneverify.asmx

    To verify the URL, click the Test button next to it.

    Endpoint security schemeNon Secured
    (If secured, user is asked for credentials of the backend service)

  5. Click Manage to go to the Manage tab and provide the following information.

    FieldSample valueDescription
    Tier AvailabilitySelect allThe 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.
    TransportsHTTP and HTTPSThe 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.

  6. 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.