Broadleaf Microservices
  • v1.0.0-latest-prod

Postman Reference for API Tutorials

While we believe the OpenAPI UI is the best way to experience the Broadleaf Microservices API, you may want to make requests through the popular Postman utility.

This article provides a quick and easy starting point for those who want to follow the API tutorials with Postman.

Step by Step Setup Guide

  1. Make sure you have the latest version of Postman installed

  2. Download our pre-configured Postman request collection for the API tutorials

    1. Right click the following link, choose "Save Link As…​", and then save the JSON file to your computer: Pre-configured API Tutorial Postman Collection JSON file

      This collection is opinionated and only valid for making requests to private demo instances of Broadleaf Microservices. It is not designed to work for other environments, such as local development environments.
      1. This contains all of the requests that the tutorials discuss, and also defines the authorization configuration you’ll need to get access tokens.

  3. In Postman, import the JSON collection you just downloaded (official instructions here)

  4. To make it as easy as possible for you to get started, the collection defines and utilizes variables in its request configurations. You’ll need to initialize some of the collection variable values to reference your specific private demo instance configuration.

    1. As explained in Postman’s documentation, open the collection variables edit window

    2. Set the "Current Value" of demoIdentifier to the identifier of your private demo, ex: demo123abc

    3. Set the "Current Value" of openapi_client_secret to the same value as the original password assigned to your admin user login

Authentication and Authorization

Each request in the Postman collection already contains the configuration necessary for quickly obtaining a valid access token for it (if one is necessary).

Once you’ve set the values of the collection variables as described above, you can simply visit the "Authorization" tab of the secured request you want to execute, scroll down, and click "Get New Access Token". This will automatically execute the OAuth 2.0 client-credentials flow for your private demo’s OpenAPI client and obtain an access token. You can then use this token in your request by clicking "Use Token". For more information, see Postman’s documentation.