Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 2.17 KB

1.mockapi.md

File metadata and controls

39 lines (25 loc) · 2.17 KB

Mock API

Overview

In this hands-on lab you will create a mock API for passengers. It’s really a good idea to fake it before you make it. Teams can create mock services to indicate what they need an API to do. Architects and developers can get a head start on their work by leveraging the Mock API well before the implemented API goes into production; and can also provide feedback and changes earlier in the API development lifecycle. Supports continuous planning, development, and testing.

Get Started

Start by having your API Specs group CustomerExperienceAirport open. There are many ways to open your spec group. Here are the steps starting from Welcome to your TIBCO Cloud.

[To return to the Home Page of TIBCO Cloud Integration, clik the TIBCO CLOUD icon from the top left corner]

  1. Start at Welcome to your TIBCO Cloud (Home Page).
  2. Select APIs.
  3. Select API Model & Mock
  4. Select CustomerExperienceAirport group.

Create Mock App

We are now going to create a mock application for passengers from your passenger API spec.

  1. Navigate to passengers, hover over passengers in the API spec list, select and choose Create Mock app.
  2. Give your mock app a name, v2_passengers and select Create.
  3. Your mock app v2_passengers will be created and deployed to the cloud.

Test

This next section will show you how to test your mock application end points.

  1. Select the down-arrow next to "1 Endpoint" and choose view and test.
  2. Select Try it out! Under GET /v2/passengers.
  3. Your request for passengers will return a list of passengers.
  4. Let’s try testing /v2/passengers/{passengerid}. Select or scroll down to /v2/passengers/{passengerid}. Enter 11111 in passengerid parameter and select Try it out!
  5. Your request for /v2/passengers/11111 will return passenger details.

Summary

Creating Mock Apps is as simple as a mouse click on TIBCO Connected Intelligence Cloud. In this section we leveraged the passengers API and generated and deployed a mock passengers app to the cloud and tested the API end point.

Next step: Implement API Internals