Try WSO2 Cloud for Free
Sign in

All docs This doc
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Next »

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.

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

If you have not registered to the API Cloud yet, go to https://cloud.wso2.com/ and sign up. Then, log in to the API Cloud and the API Publisher Web application will open automatically.

Let's create an publish an API. See the video tutorial here or a step-by-step walk-through of the video tutorial below.

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

  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.

  • No labels