Jitsusama / demo-postman

Used to demo Postman features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

Postman is a service that facilitates experimentation, documentation and integration of all things API. This is especially useful when trying to learn a new API, giving a relatively simple interface to make and record requests.

It allows for adhoc definitions, or importing pre-existing API specifications in various formats. OpenAPI and WSDL being a couple of examples.

On the experimentation side, it has a unique feature centred around quickly building mock implementations of an API and making them publicly accessible, so that you can test an application against the API before it actually exists.

Initial Setup

Follow these steps in order to set the stage for the rest of the demo.

  1. Install the latest Node.js LTS if you don't already have it.
  2. Clone this repository.
  3. Run npm install followed by npm start from the ui directory.
  4. Open/Load Postman.
  5. Home -> Start Something New -> Workspace
  6. Set Name to Demo -> Create Workspace
  7. APIs -> Create an API -> Import -> GitHub -> Continue
  8. Set Repository to postman-demo -> Continue -> Import -> Confirm and Close
  9. APIs -> Backend API -> Develop -> Add Mock Server -> Create New Mock Server -> Use an Existing Collection -> Select Collection and Continue
  10. Set Name to Demo, Check Save the mock server URL... -> Create Mock Server -> Close
  11. Environments -> Demo -> Set Variable to baseUrl -> Save

Documentation Demo

These steps show off a high level overview of Postman's documentation capabilities.

  1. Workspaces -> Demo -> APIs -> Backend API -> Define
  2. Develop -> Documentation
  3. View Collection -> Collections

Request Demo

This is an example of how to run requests and see them in action.

  1. Workspaces -> Demo -> Collections -> Backend API
  2. Change No Environment to Demo
  3. Backend API -> Login -> Invalid credentials -> Set password to bad -> Save
  4. Send Login request with password set to secret and bad.
  5. Send Retrieve Logins request.
  6. Console and observe entries.
  7. History and observe entries.

Mock Demo

Finally, here is a live example of an application speaking to a mocked out API.

  1. Workspaces -> Demo -> Mock Servers -> Demo -> Copy URL
  2. Go to UI -> Paste URL
  3. Set Username to john and password to secret -> Login
  4. Logout -> Set Username to john and password to bad -> Login
  5. Go to Postman -> Mock Servers -> Demo
  6. Observe entries.

About

Used to demo Postman features.


Languages

Language:JavaScript 60.8%Language:CSS 36.8%Language:HTML 2.4%