Register REST APIs in API Manager

Overview

API owners can use the API Manager web interface to register back-end REST APIs. You can manually create a new back-end API, or import a definition for an existing API (for example, in Swagger or WADL format). Using API Manager to register REST APIs means that you can register APIs in a browser, in multiple formats, without any service outage.

When a back-end API is registered, you can then virtualize it as a publicly exposed front-end API. Registered and virtualized APIs are governed by the API Gateway using configured policies. API owners and API administrators can use API Manager to manage registered APIs, and API consumers can use API Manager or API Portal to consume virtualized APIs in their applications.

Back-end and front-end APIs

In API Manager, the back-end API
is the actual REST API that is routed to, and that is exposed by an application server on the network, or in the Cloud (for example, Twitter). You can use in API Manager to register a new back-end REST API manually, or to import a definition for an existing REST API in Swagger or WADL format. The following example shows a manually registered back-end API in API Manager:

In API Manager, the front-end API
is the virtualized publicly exposed REST API that is hosted on the API Gateway, and which is invoked by client applications (for example, iPhone or Android apps). The following shows the example back-end API virtualized as a front-end API in API Manager:

By default, the front-end API is the same as the back-end API, proxying the API as is. However, you can edit the front-end API to present an enriched, public-facing API to client applications. For example, you can change the URL path, change and map parameters, or improve the documentation.

In addition, this separation of front-end API and back-end API definitions allows the back-end API to change over time. This means that you can control how changes are exposed to client applications, thus minimizing or eliminating the potential impact these applications. For more details, see Virtualize REST APIs in API Manager.

Enable an organization for API development

Before you can begin registering REST APIs for an organization in API Manager, you must first enable an organization for API registration and development. The API Manager welcome dialog prompts you to automatically create an API Development
organization, which is enabled for API development by default.

If you do not create the default API Development
organization, you must perform the following steps:

Click the Client Registry
> Organizations
view in API Manager.

Click the name of the organization to enable (for example, Acme Inc).

In the API Development
field, click On.

You can now register back-end APIs and virtualize front-end APIs for this organization.

Import an existing back-end REST API

To automatically register an existing back-end REST API in API Manager, perform the following steps:

Click the API Registration
> Backend API
view in API Manager.

Click New API
and select one of the following:

Import Swagger API: Import an API in Swagger format. Only JSON format is supported for Swagger API definition files. For more details on Swagger, see http://swagger.

Import RAML API: Import an API in RESTful API Modeling Language (RAML) format. Importing RAML files that include references to external files is not supported. For more details on RAML, see http://raml.org/.

Import WADL API: Import an API in Web Application Description Language (WADL) format. For more details on WADL, see https://wadl.java.net/.

Authentication: For URL-based APIs only, enter a User name
and Password
if required.

Click Import
to import the API into the catalog.

Limitations of web services support

API Manager does not support the following features:

WSDL import from file: You can only import a web service from a URL in API Manager, and must use Policy Studio to import from a file.

WS-Policy/WS-Security: If this is required, you must register the web service using Policy Studio.

Schema validation: If schemas are available, you can validate using custom request/response policies (see API Manager custom policies). Otherwise, you should register using Policy Studio.

Binding/operation selection: You cannot select specific bindings/operations for import. If this is required, you must use Policy Studio.

Cloning: You cannot clone an API registered from a web service.

Tip

When your web service schemas are loaded in API Manager, they are protected by your chosen front-end API security device. Your client testing tool may be able to reach the WSDL, but not the schema imports without the appropriate key/credentials.

To add more method parameters, click the add button in the PARAMETERS
section.

To specify content types that can be consumed by the API method, click the plus (+) button in the CONSUMES CONTENT-TYPE
section, and enter the content type. For example, application/xml, text/plain, and so on. Defaults to application/json.

To specify content types that can be produced by the API method, click the plus (+) button in the PRODUCES CONTENT-TYPE
section, and enter the content type. For example, application/xml, text/plain, and so on. Defaults to application/json.

To specify response codes that can be produced by the API method, click the plus (+) button in the RESPONSE CODES
section, and select the response codes (for example, Create codes (201, 403, 500)).

To add more API methods, click the add button on the top left.

Create the REST API data model

For JSON-based REST APIs only, you can enter the JSON schema model for the API data on the Models
tab. This tab is not displayed for web service APIs.

This model is optional and describes the data that is passed to the API as the request payload or returned from the API as the response payload. The data model is then displayed for application developers in the API Catalog in API Manager or in API Portal.

Tip

You can add/edit the data model for a manually created REST API, but this is read-only for an imported REST API. In this case, the data model is part of the imported definition, and cannot be changed. However, if you need to update the model (for example, to fix a bug in the schema), you can do this by cloning the API as described in the next section.