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 V2

  1. Log in to the API Publisher.
  2. Select the option to design a new API and click Start Creating.
     
  3. Give the information in the table below and click the Add button to add the resource.

    FieldSample value
    Name
    PhoneVerification
    Context
    /phoneverify

     

    Tip: You can define the API's version as a parameter of its context by adding the {version} into the context. For example,{version}/phoneverify. The API Manager assigns the actual version of the API to the {version} parameter internally. For example, https://localhost:8243/1.0.0/phoneverify. Note that the version appears before the context, allowing you to group your APIs according to versions.

    Version1.0.0
    VisibilityPublic
    ResourcesURL patternCheckPhoneNumber
    Request types

    GET, POST

  4. After the resource is added, expand its GET method, add the following parameters. You use them to invoke the API using our integrated API Console in later tutorials. Once done, click Implement.

    Parameter NameDescriptionParameter TypeData TypeRequired
    PhoneNumberGive the phone number to be validatedQueryStringTrue
    LicenseKeyGive the license key as 0 for testing purposeQueryStringTrue

    Alternatively, click Save to save all the changes made to the API before it is completed. You can come back later to edit it further by selecting the API and clicking Edit.

     

    To change the state of a partially complete API, select the API and click on the Lifecycle tab. You can update the state of the API to any of the available options. For more information about the states of the API see Manage the API Lifecycle.

     

  5. Click the Managed API option.
     

  6. The Implement tab opens. Give the information in the table below.

    FieldSample value
    Endpoint typeHTTP endpoint
    Production endpoint

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

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

  7. Click Manage to go to the Manage tab and give the information in the table below.

    FieldSample valueDescription
    Tier AvailabilitySelect allThe API service is available at different levels. They allow you to limit the number of successful hits to an API during a given period of time.

  8. Click Save & Publish. This will publish the API that you just created in the API Store so that subscribers can use it. You can also save APIs without publishing. Publish the API later in the Lifecycle tab or select any of the available options. For more information about the states of the API see Manage the API Lifecycle.

You have created an API.