Consuming a BookStore REST Endpoint in TIBCO Business Studio™ for BusinessWorks™
Importing the REST API document
Swagger 2.0-compliant REST API documents must be imported into the TIBCO Business Studio™ for BusinessWorks™ Service Descriptors folder of the project. This gives you the ability to expand and collapse endpoints, operations, parameters and response codes in the Project Explorer view.
Accessing the BookStore Swagger in the Docker Environment
For the BookStore sample running in the Docker environment, the swagger URL should be accessible using the Docker external URL. in the format http://docker-external-ip/swagger.
Retrieving the Swagger Document
You can now retrieve the swagger document by accessed using the URL
http://<docker external ip>/swagger/swagger.jsonor using the curl command:
curl http://<docker external ip>/swagger/swagger.json -o bookstore.json
Accessing the BookStore Swagger in the K8S Environment
If your BookStore sample is hosted in K8S environment, the swagger URL can be accessed using the external IP of the K8S service.
For example the following command will give you the external IP of the running Docker service
kubectl get svc rest-bookstore-app
Copyright © Cloud Software Group, Inc. All rights reserved.