Try WSO2 Cloud for Free
Sign in

All docs This doc

Versions Compared

Key

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

API creation is the process of linking an existing backend API implementation to the API Publisher so that you can manage and monitor the API's lifecycle, documentation, security, community, and subscriptions. Alternatively, you can provide the API implementation in-line in the API Publisher itself.

Panel
bgColor#d3d3d3

In this tutorial , you create an API using a production endpoint and publish it to the API Store.

Note

Click the following topics for a description of the concepts that you need to know when creating an API:

| API visibility | Resources | Endpoints | Throttling tiers | Sequences | Response caching |

Let's get started. See the video tutorial here or a step-by-step walk-through of the video tutorial below.

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=Ocam6Ao6Vo4fs_oNgqU73U&feature=youtu.belist=PLp0TUr0bmhX49rEwMR7BDX2O9-iQHOOzN&index=2
height600

Here's a step-by-step walk-though of the video tutorial:

Anchor
walkthrough
walkthrough

  1. If you have not registered to the API Cloud yet, go to to https://cloud.wso2.com/ and and sign up. 
  2. Log in to the API Cloud and the API Publisher Web application will open automatically.Select the
  3. Close the interactive tutorial that starts automatically if you are a first-time user, and then click New API...
    Image Added 
  4.  Select the option to design a new API and click API and click Start Creating .
  5. Give the information in the table below and click the Add button to add the resource.

    FieldSample value
    NamePhoneVerification
    Context

    /phoneverify

    Tip

    Tip: You

    can define

    can define the API's version as a parameter of its context by adding the {version} into the context.

     For

     For example,

     

    {version}/phoneverify.

     The

     The API Manager assigns the actual version of the API to the {version} parameter internally. For example, https://gateway.api.cloud.wso2.com:8243/t/companyn/1.0.0/phoneverify. Note that the version appears before the context, allowing you to group your APIs

    according

    based on to versions.

    Version1.0.0
    VisibilityPublic
    Resources
    • URL Pattern: CheckPhoneNumber
    • Request Types: GET, POST

    Image Modified

  6. After you add the resource is added, expand click its GET method to expand it, add the following parameters. You use them to invoke the API using our integrated API Console, which is explained 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. 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.
  7. Click the Managed API option option.
    Image Modified

  8. The Implement tab opens. Give Enter the information in the table below.

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

    Image Modified

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

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

    Image Modified

  10. Click Save & Publish. This will publish the API that you just created in the API Store so that subscribers can use it. You can save the API without publishing it. Select the API and click the Lifecycle tab to manage the API Lifecycle.
    Image Added

You have created an API.

For details on creating APIs using Swagger definitions, see Create APIs using a Swagger URL.