Create and Publish an API
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:
The steps below show how to create a new API.
- Log in to the API Publisher.
- Select the option to design a new API and click Start Creating.
Give the information in the table below and click the Add button to add the resource.
Field Sample value Name PhoneVerification Context /phoneverifyTip: 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.Version 1.0.0 Visibility Public Resources URL pattern CheckPhoneNumber Request types GET, POST
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 Name Description Parameter Type Data Type Required PhoneNumber Give the phone number to be validated Query String True LicenseKey Give the license key as 0 for testing purpose Query String True 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.
Click the Managed API option.
The Implement tab opens. Give the information in the table below.
Field Sample value Endpoint type HTTP endpoint Production endpoint This sample service has two operations as
CheckPhoneNumber
andCheckPhoneNumbers
. Let's useCheckPhoneNumber
here.
This is the Production Endpoint value for CheckPhoneNumber: http://ws.cdyne.com/phoneverify/phoneverify.asmxTo verify the URL, click the Test button next to it.
Click Manage to go to the
Manage
tab and give the information in the table below.Field Sample value Description Tier Availability Select all The 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. Transports HTTP 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. - 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.