com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Adding an API

Follow the instructions below to add an API to the store through the API Publisher Web application.

1. Log in to WSO2 API Publisher with a user who has been assigned the "creator" role. For more information on creating users and assigning roles, refer to section User Management.

Once logged in, select the "Add" menu.

In this section, we work with a service exposed by the Cdyne company (www.wdyne.com) which provides data quality services. We use the phone validation service as an example, which has SOAP and REST interfaces and is documented using a WSDL file. This service is described at : http://wiki.cdyne.com/index.php/Phone_Verification.

The table below explains the fields required when adding an API and their descriptions. Also, values are given as an example according to the phone validation service mentioned before. Only the fields marked with * are mandatory.

FIELDDESCRIPTIONEXAMPLE VALUES
Name*Name of API as you want it to appear in the API store.PhoneVerification
Context*URI context path that is used by to API consumers./phoneverify
Version*API version (in the form of version.major.minor).1.0.0
DescriptionHigh-level description of API functionality.Text
Thumbnail Image

Icon to be displayed in API store (can be jpeg, tiff, png format).

Image file
Endpoint URL*Endpoint of the back-end service URL, here:
http://ws.cdyne.com/phoneverify/phoneverify.asmx
URL
Sandbox URL

Endpoint of sandbox (testing) back-end service.

A sandbox URL is meant to be used for online testing of an API with easy access to an API key.

URL
WSDLURL of WSDL file (describing API interface):
http://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl
URL
WADLURL to WADL file (describing API interface).URL
Tags

One of more tags separated by comma. Tags are used to group/search for API.

String
Tier Availability*The section below describes this in detail.

Bronze/Gold/Silver/Unlimited

Business Owner and Email

Information about the person responsible for this API at a business level.

String

Technical Owner and Email

Information about the person responsible for this API at a technical level.

String
API ResourcesThe section below describes this in detail. 
Tags

An API can be given any number of tags by entering a comma-separated list of words. Tags allow you to group/categorize APIs having similar attributes/behavior/domain. Once this API gets published to the API Store, these tags will appear as clickable links to the API consumers, who can use them to quickly jump into the APIs they are interested in.

Tier Availability

An API can be available to a consumer at different levels of service. When creating an API, the user defines the list of tiers which are available for a given API. You can select multiple entries from a list of tiers available by default in the WSO2 API Manager. WSO2 API Manager comes with three defined tiers (Gold/Silver/Bronze) and a special tier called Un-limited, which can be disabled by editing the <TierManagement> node of the api-manager.xml file.

In addition to these default tiers, you can also add new tiers to the API Manager through its Management Console. For instructions, refer to section Adding New Throttling Tiers.

At subscription time, the consumers can choose which tier they are interested in. For information on subscribing to a published API as an API consumer, refer to section  . Subscribing to an API

API Resources

 When adding a new API using the API Publisher, you can define API resources, which appears at last in the "Add New API" window as follows:

An API is made up of one or more resources. Each resource handles a particular type of requests. A resource is analogous to a method (function) in a larger API.

API resources can accept following optional attributes:

  • verbs: Specifies the HTTP verbs a particular resource would accept. Allowed values are: GET, POST, PUT, DELETE. Multiple values can be specified.
  • uri-template: A URI template as defined in http://tools.ietf.org/html/rfc6570 (eg:/phoneverify/{phoneNumber}).
  • url-mapping: A URL mapping defined as per the servlet specification (extension mappings, path mappings and exact mappings).

Once a request is accepted by a resource, it will be mediated through an in-sequence. Any response from the back-end is handled through the out-sequence. Fault sequences are used to mediate errors that might occur in either sequence. Default in-sequence, out-sequence and fault sequence are generated when the API is published.

2. Once the required information is filled, click the "Create" button at the end of the page to create the API.

3. If the API is created successfully, you will be navigated to the "Browse" menu where the newly-added API will be listed with the other available APIs. For example,

4.Click the API to access its information. You will be first navigated to its "Overview" page.

The following tabs are available:

  • Overview: Displays the details of the API.
  • Edit: Allows the user to change the API details and test the Endpoint URL, Sandbox URL, WSDL and WADL.
  • Versions: Shows usage and subscription statistics of the API per version.
  • Docs: Allows to add   documents to an API.   For instructions, refer to section Adding API Documentation. 
  • Users: Shows the list of active users subscribed to the API and their subscription statistics.

Note

The "Edit" tab is only visible to users with "creator" privileges. Users logged in as creators do not have permission to publish the API. To publish, you need to log in as a user with "publisher" privileges.

Using these tabs, you can manage your API.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.