During the workshop we have to know what the API Management UserID is. This ID is created for you when you sign up for the TCI Trial. In order to find your UserID, do the following: From the Control Center Click Manage and then Users as shown below:
This will bring you to the list of Users in your API Management Portal. Next to the user click on the gear icon.
We will now generate an Application in API Management to use our API Definition with the Package and Plan that we created from the previous steps. Click on Applications and then New Application as shown below:
Enter an Application Name and click Save and Continue. Application Owner will be the username from the ‘Users’ tab and should have been automatically brought it in here.
Select ‘BasicPackage’ followed by the plan ‘StandardPlan’ that were created earlier.
Then click on the ‘+’ sign so that the Package and Plan are assigned
Click Save and continue:
Since we have enabled Self Service of Keys, you will be able to see this as ‘Waiting’ status under the Package Keys section.
Click on ‘Waiting’
The Status will change to ‘Green’ - Enabled because of the self provisioning and you can review the Throttle and Quota values that are applied from the plan that was chosen for this application. You can copy this key for testing later.
You will also want to copy the Public Endpoint URL of your API. So go back to your definition by clicking Design > APIs and select your API.
Congratulations, you have successfully deployed an API Definition that can be accessed via the API Gateway which will inturn use the microservice that was developed inside of the TCI.
We will try to hit the endpoint we exposed on API Management to invoke the microservice running in TCI - Flogo using an external application like 'Postman'.
Postman related screenshots to trigger the tests are shown below:
Here is the sample you can paste in Postman
{ "customer": { "loginid": "johndoe@tibco.com" }, "order": { "Total amount": 20, "id": "or_123", "shipping amount": 10 } }
A successful test will return as shown below:
You can review the activity on API Management from the 'Analyze->Report' section as shown
You can also review the logs from the underlying microservice developed in Flogo by referring to the logs section, as shown below.
This means, We have successfully achieved our goal. We successfully changed the order process for loyal customer to waive a shipping fee. The entire process is now automated providing a business leverage and enhanced customer experience.
Let's Recap: Summary