Define and manage APIs
webMethods API Gateway enables organizations to define and manage their APIs. Developer and partner users can use webMethods API Gateway's design and customization capabilities to build, develop, and publish APIs to a portal. Internal and external API consumers can then consume these published APIs.
The following sections describe the types of APIs that webMethods API Gateway supports and the different ways in which you can create APIs and update APIs. In addition, you can also learn how to create and maintain different versions of an API, and group and tag APIs.
API administrators and users with the appropriate functional privileges can create and manage APIs, and publish the APIs to Developer Portal or service registries from where they can be consumed.
webMethods API Gateway supports the following API types:
Representational State Transfer (REST).
A set of architectural principles that allow accessing and manipulating resources by using capabilities that are already built into HTTP. The capabilities include a uniform and predefined set of stateless operations. These operations and resources are represented by media types. The RESTful framework provides REST APIs based on REST architecture. REST API has multiple specification formats. In webMethods API Gateway, you can create a REST API that uses one of the supported formats, RAML, Swagger 2.0, OpenAPI 3.0 Specification.
Simple Object Access Protocol (SOAP).
A communication method for XML-based message exchange over different transport protocols, such as Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP). This framework provides SOAP APIs based on Web Services Description Language (WSDL).
Open Data Protocol (O Data).
A set of best practices for the creation and consumption of RESTful APIs. It provides a uniform way to describe both the data and the data model. The OData framework provides interoperable OData APIs with a RESTful interface based on OData standards.
GraphQL.
A query language designed to build client applications by providing a flexible syntax and provides a comprehensive description of data within an API. webMethods API Gateway supports proxying an existing GraphQL endpoint and provides API management capabilities to clients like authentication, and analytics. webMethods API Gateway supports GraphQL version 16.2.
Asynchronous APIs
webMethods API Gateway provides an asynchronous form of API support for REST APIs.
The synchronous and asynchronous nature of an API depends on the following points.
- The way that an API processes a request that an application sends.
- The mode and the time frame in which the API returns the data to the client.
The following table provides details of the differences between the synchronous and asynchronous APIs.
Synchronous API | Asynchronous API |
---|---|
Synchronous API is used where data or service availability, resources, and connectivity are high and requires low latency. | Asynchronous API is used where data or service availability, resources, and connectivity are low or over-saturated with demand. |
The client application requests data and waits until it receives a response to proceed with other processes. The expectation is an immediate response | The client application requests data and continues with other processes without waiting for a response. The expectation is of no immediate response. |
Consider this example of synchronous and asynchronous APIs performing a log purge operation. In this scenario, because of a wait period for the return of data, synchronous API invocations might time out when the API processes take a significant time to complete. The following figure depicts the differences between how a synchronous and an asynchronous API performs the log purge operation.
When you create a REST API, webMethods API Gateway provides the capability of defining the callback component with the supported method parameters. For details about creating an API with the callback definition, see Creating a REST API.
Creating APIs
You can create and manage APIs from the Manage APIs page in webMethods API Gateway UI. The page lists all the APIs, their description, and version number. You can also create, delete, view details, activate, deactivate, publish, and unpublish an API. In addition, you can view API analytics, group APIs, and add tags to an API.
You can create an API in one of the following ways:
- Create an API by importing a definition for an existing API (for example, in Swagger or RAML
format) by using an API importer. webMethods API Gateway reads a RAML file and generates a REST API that the
RAML definition describes. The importer also uploads the RAML file to the webMethods API Gateway repository and
links the file to the REST API.
An API importer generates an API from a URL or an input file in one of the supported formats. For example, the RAML importer installed with API
- Create an API from scratch and set its attributes manually.
The following sections explain in detail about different ways of creating APIs.