All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Sign in to the WSO2 API Publisher.
    https://<hostname>:9443/publisher (ex: https://localhost:9443/publisher). Use admin as username and password
    Image Added
  2. In the APIS menu, click Add New API.
  3. Select Design New REST API and click Start Creating.
  4. Give the information in the table below and click Add to add the resource.

    Field
    Sample value
    Name
    PhoneVerification
    Context
    /phoneverify


    Tip

    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 based on the versions.

    Version
    1.0.0
    Visibility
    Public
    ResourcesURL patternCheckPhoneNumber

    Request types

    GET, POST

  5. After you add the resource, click it's GET method to expand it and update the Produces to application/xml and Consumes to application/json. Next, add the following parameters. You use these parameters to invoke the API using our integrated API Console, which is explained in later tutorials. 
    Once done, click Next: 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. You can come back later to edit it further by selecting the API and clicking on Edit. For details about the states of the API see Manage the API Lifecycle.

  6. Anchor
    ManageAPI
    ManageAPI
    Click the Managed API option.

  7. The Implement tab opens. Enter the information in the table below.

    FieldSample value
    Endpoint typeHTTP/REST 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.

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

  8. Click Next: Manage > and enter the information in the table below.

    FieldSample valueDescription
    TransportsHTTP 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.

    Warning

    You can only try out HTTPS based APIs via the API Console, because the API Store runs on HTTPS.


    Subscription TiersSelect 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.

  9. Click Save & Publish.
    This publishes the API that you just created to the API Store so that subscribers can use it. You have created an API.

...