REST endpoints for pushing APIs into IBM API Connect

Use the REST endpoint, which is a central location for both on-premises and cloud Liberty users, to visualize, call, and push APIs into IBM® API Connect.

Pushing deployed REST endpoints into IBM API Connect

To push deployed REST endpoints into IBM API Connect, you must call a new REST endpoint, /ibm/api/docs/apiconnect, which is exposed by the apiDiscovery-1.0 feature in the server configuration. Administrators and developers can use the REST endpoints to expose assets from a Liberty instance to any enterprise developer who is searching the IBM API Connect framework catalogs.

Providing a product definition

All APIs are referenced by a product and exposed from a catalog. Therefore, the caller provides a product definition that Liberty uses to refer to its RESTful APIs and push the resulting product into IBM API Connect. A sample product is provided in this topic.

Exposing assets of a Liberty collective into IBM API Connect

Using a corresponding Liberty collective endpoint, /ibm/api/collective/docs/apiconnect, you can expose all assets of a Liberty Collective into IBM API Connect with a single RESTful trigger. The Liberty collective endpoint can expose thousands of APIs to any cloud developer connected to API Connect. See the Liberty RESTful API registry, /ibm/api/explorer, for the full Swagger definition of this endpoint.

Endpoint summary

HTTP Request method: POST

URL: https://server:https_port/ibm/api/docs/apiconnect

Required headers

X-APIM-Authorization
Credentials to connect to API Connect display in the two following forms:
  • username and password
  • xyz where xyz is the base64 encoded version of username: password.

Required query parameters

Server
The name of the IBM API Connect server, starting with https://.
Catalog
The name of the catalog that hosts the resulting product.
Organization
The name of the organization of the caller.

Optional query parameters

apiRoot
A multi-cardinality parameter that specifies exactly which context roots, such as, apiRoot=/myApp, the caller wants to push into API Connect. By default, Liberty includes any deployed application except known Liberty runtime Web Application Bundles. This parameter is useful when you want to filter which applications get exposed.
member ID (only available for the Collective variant)
A multi-cardinality parameter that specifies the ID of the exact Collective Members from which the caller wants to expose assets. This ID is composed of a string with the host name,the URLEncoded user dir, and the server name, all separated by a comma, for example: myHost.com, %2Ftmp%2Fwlp%2Fusr, server1.
Input body
Product definition in either in YAML or JSON code. See the following YAML example:
product: "1.0.0"
  info: 
    name: "pushed-product"
    title: "A Product that encapsulates Liberty APIs"
    version: "1.0.0"
  visibility: 
    view: 
      enabled: true
      type: "public"
      tags: 
        - "string"
      orgs: 
        - "string"
    subscribe: 
      enabled: true
      type: "authenticated"
      tags: 
        - "string"
      orgs: 
        - "string"
  apis: 
    liberty: 
      name: "liberty-api:1.0.0"
      x-ibm-configuration: 
        phase: "realized"
        testable: true
        enforced: true
        cors: 
          enabled: true
        assembly: 
          execute: 
            - 
              invoke: 
                target-url: "${gateway.target}"
                title: "Invocation"
                description: "Invoking back-end service"
  plans: 
    default: 
      title: "Default Plan"
      rate-limit: 
        hard-limit: false
        value: "100/hour"
      approval: false
  createdAt: "2016-04-18T20:33:22.937Z"
  createdBy: "string"