node.jsyamlapi-gatewayapiconnect

Connect Api Connect with Existing WebServices


i am using apiconnect microgateway (available on github) to connect with any existing webservice and add some policies, i figured i have to create yaml files for my existing apis and add them to api connect's directory. here is a sample yaml file they have given.

# sample_1.0.0.yaml
#
info:
  version: 1.0.0
  title: sample
  description: sample laptop yaml
basePath: /sample
swagger: '2.0'
paths:
  /echo:
    get:
      responses:
        '200':
          description: 200 OK
x-ibm-configuration:
  assembly:
    execute:
      - javascript:
          title: write a small json object
          source: |
           message.body = { text : 'Hello World' };
schemes:
  - http

my question is how do i invoke my existing rest service in this file and define policies like authentication, hit limits etc.

here is the link of micro-gateway github

https://github.com/strongloop/microgateway


Solution

  • Creation of REST service in API Connect is straightforward. Follow the instructions provide by IBM

    In API Connect, the configuration or the scripts what we write in Assembly section will automatically populate in the swagger file(Source section in API Designer). So we don't need to manipulate any swagger file.

    To invoke the existing rest service in API COnnect. Please follow the steps which you can find in the above link.

    For the creation of REST service invoking SOAP service please follow this link

    Thanks SP