Using Postman with Lightstep

This section shows how to use Postman to make API calls to Lightstep.

Prerequisites

  • An active Lightstep organization and project
  • Access to your Lightstep Public API Keys
  • The Postman client installed
  • Basic knowledge of APIs and JSON

Setup

Import the Lightstep Postman Collection

  1. Download the Lightstep Postman Collection (pre-configured API templates)
    A Postman Collection lets you group individual requests together for easy editing and re-use.
  2. Open Postman. Click on File > Import or click on the Import button in the upper left of Postman.
  3. Select the lightstep_postman_collection.json file downloaded in Step 1.
Importing LightStep collection in Postman.Importing LightStep collection in Postman.

Importing LightStep collection in Postman.

The Lightstep API is now available as a collection in Postman. A full list of available Lightstep API calls is structured by folder in the left pane of Postman.

Note: The following section is required for the API calls to work.

Setup API keys in Postman

The collection uses Postman Environment variables to set API keys and other values that might remain static most of the time, for example organization and project.

Follow these steps to setup your API keys for your collection.

  1. Click the Manage Environments gear icon in the upper right corner of Postman.
  2. Click Add and enter an Environment Name. For example, you can name your environment Lightstep or Lightstep-YourOrgName.
  3. In the table, add the variable lightstep_api_key. In the Current Value column, enter your actual LightStep API Key.
  4. If you have access to multiple organizations and projects, you can also choose to add the organization or project variables and/or setup multiple environments.
  5. Once an Environment is set up, you can choose it from the dropdown in the upper right corner of Postman.
Setting up Environments in Postman.Setting up Environments in Postman.

Setting up Environments in Postman.

Use the Collection

After setup is complete, you are ready to begin making API calls. In the Lightstep Public API collection in the left sidebar, there are multiple subfolders for each type of API category listed in the Lightstep Public API Reference. You can test your API access by using the API calls under the Test folder.

Testing LightStep API with Postman.Testing LightStep API with Postman.

Testing LightStep API with Postman.

Params

Some API calls include path, query, or body parameters. When you select an API call from the left sidebar, you can edit the parameters in the tab that opens on the right before sending the API call. Refer to the Lightstep Public API Reference for more details about each API call and its parameters.

Editing Path and Query parameters for an API call in Postman.Editing Path and Query parameters for an API call in Postman.

Editing Path and Query parameters for an API call in Postman.

Editing Body Parameters for an API call in Postman.Editing Body Parameters for an API call in Postman.

Editing Body Parameters for an API call in Postman.

For more information on using Postman, refer to the guides here.