2.1 Create an API

Select Publisher

The Publisher allows you to create REST APIs and manage those APIs. When you create an API, you define the API, the backend service, and one or more endpoints for the API.

You must understand REST and know how to create APIs. For more information, see the RFC 7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content page.

Secure API Manager stores the APIs on a specific Identity Server cluster. You must select which Identity Server cluster you want to use when you create the APIs. If you have internal and external Identity Server clusters, this allows you to further separate the APIs.

  1. Ensure that you have the proper API gateway cluster selected in the Cluster field.

  2. Click New to create the API definition.

  3. Define the settings for the API:

    General

    Define the General settings of the API.

    Type

    Select the type of API you want to create. With this release, Secure API Manager supports only REST APIs. You cannot change the API type.

    Name

    Specify a unique name for the API.

    Description

    Specify a detailed description of the API so that anyone who uses the API understands what it does. If you clone the API, update the description of the API to describe the differences between the APIs.

    Version

    Specify the version of the API.

    API Base URL Path

    Specify the base path URL to the endpoint for the API. You can define this path to be whatever you want.

    Tags

    Specify a tag for the API to simplify searching for the API. Secure API Manager includes the specified tags as search parameters for the APIs.

    Transports

    Select whether the API communicates over HTTP or HTTPS.

    Allowable Subscription Tiers

    Select one subscription tier to allow or limit the number of authorizations to the API. Secure API Manager administrators create the limiting policies during configuration of the API Gateway.

    Backend Service

    Define the settings for the backend service the API uses.

    Service Name

    Specify the name of the backend service.

    URL Context

    Specify the URL context of the service on the backend service.

    Protocol

    Select whether the service on the backend service communicates over HTTP or HTTPS.

    IMPORTANT:The protocol that you select is the only protocol allowable for any backend service that you add to this API. You cannot specify an HTTP backend service as well as an HTTPS backend service under the same API. Every backend service that you add to this API must be reachable by the protocol you select in this field.

    Trusted Root

    Paste the trusted root certificate or the chain of certificates in the .pem format from the backend service. The process of validating the backend service certificates contains multiple ways of providing this information. Ensure that you understand the process of validating the backend service certificates to have this option work.

    Validate SSL Certificate

    Select whether you want Secure API Manager to validate the SSL chain to the backend service. We recommend that you leave it enabled for security reasons.

    Pass Authorization Header to the Backend Service

    Select whether you want to pass the authorization header for the APIs to the backend service.

    Services

    Click Add service to define the settings for one or more of the backend services that the API accesses.

    Host

    Specify the fully qualified DNS name of the backend service.

    Port

    Specify the port that the backend service uses. By default, HTTP uses 80 and HTTPS uses 443.

    Endpoints

    Click Add Endpoint to define one or more endpoints for the REST API.

    Methods

    Select the appropriate REST methods for the API. The methods define the action that the API performs. For a definition of each method, see HTTP Request Methods, RFC 7231 Request Methods, and RFC 5789 Patch Method for HTTP.

    Endpoint URL Path

    Specify the URL path for the API endpoint. The path can be anything that you want. The Publisher displays the path you specify under this field as Access at http(s): so that you can verify that the path is correct.

    Backend Service Path URL

    Specify the base of the URL for the backend service. The Publisher displays the path under this field as Backend Service Endpoint Base URL: so that you can verify that it is correct.

    Action

    Select how you want to include the backend service URL to the API. You can do nothing, prepend, append, or replace the backend service URL in the API.

    Mime Type

    Specify the mime type of the API endpoint. For example, application/json or text/html.

    Endpoint Parameters

    Click Add Parameter to define the parameters for the API.

    Name

    Specify a name for the parameter.

    Description

    Specify a detailed description for the API parameter so that other people can understand the endpoint parameter.

    Type

    Select whether the parameter queries, contains data, or is a header.

    Data Type

    Select the appropriate data type of the parameter.

    Action

    Select the type of action the parameter performs.

    Value

    Specify the value for the parameter.

    Required

    Select Required if the parameter is required for the API endpoint.

  4. Click OK to save the API.

If you click Show JSON, you can view the API in JSON.