1

I have a test Hyperledger Fabric running in the IBM Cloud, with the IBM Blockchain Application Service. I also have a kubernetes cluster running the Hyperledger Composer REST Server. Everything works great, but how do I extend the REST api with some custom api's? The documentation mentions being able to use the swagger definition (yaml file) with the IBM API Connect or Strongloop product...but how do I do that, as I don't see any way to export the swagger definition?

user3188040
  • 671
  • 9
  • 24

2 Answers2

0

I don't have a tutorial, but as I see it you would have to do three tasks minimally:

  1. write your REST APIs (to do what you want to do) - perhaps these resources on REST APIs will help ? -> Loopback -> https://developer.ibm.com/code/patterns/create-rest-apis-using-loopback/ and in architectural in general ->https://www.ibm.com/developerworks/library/ws-restful/ and
  2. build the routes for your custom APIs

  3. customise your swagger definitions to document your REST APIs - this may help you -> https://www.ibm.com/developerworks/library/wa-use-swagger-to-document-and-define-restful-apis/index.html and Swagger itself -> http://swagger.io/

Paul O'Mahony
  • 6,740
  • 1
  • 10
  • 15
0

If you write custom api and call it as 3rd party api which is mentioned in IBM already it will help you to response but it has very limted scope. I belive you should use swagger to understand its end point are properly configured

Saurabh M
  • 11
  • 3