2️⃣ Set up your Postman collection

With your API keys in hand, let’s get you up and running with Postman :mailbox_with_mail::muscle:

We’ve created a public Postman workspace so that you can quickly and easily start testing what data you can get using Lacework. In this post, you’ll learn how to install and configure our collection.

:white_check_mark:Make sure you’re logged in to your Postman account.

Fork the Lacework API

To use Lacework’s API collection we’re going to fork the collection and the environment:

:movie_camera::popcorn:Step-by-step video: Fork the environment and collection in the Lacework API Workspace

Fork the environment:

  1. Go to Lacework’s Postman Workspace
  2. Navigate to the Environments tab
  3. Click the ellipsis under “LaceworkEnvironment”
  4. Select “Create a Fork”
  5. Give it a :sunglasses:name, e.g., LaceworkEnvironment.
  6. Choose “My Workspace”
  7. Click “Fork Environment”

Fork the collection:

  1. Go to Lacework’s Postman Workspace
  2. Navigate to the Collections tab
  3. Click the ellipsis under “Lacework API Docs”
  4. Select “Create a Fork”
  5. Give it a :sunglasses:name, e.g., Lacework API.
  6. Choose “My Workspace”
  7. Ensure you leave the watch option checked. This way, if we ever make a change to the collection, you’ll be automatically notified and you’ll be able to pull the changes into your fork.:wink:
  8. Click “Fork Collection”

:eight_spoked_asterisk: That was easy! Let’s quickly configure Postman so that you can easily use our API.

Configure the environment

Our Postman collections makes use of environment variables to customize the requests that are sent. You can read more about environments in Postman’s setting up an environment with variables article.

:page_facing_up:Have your downloaded Lacework API Key file handy!

To edit your forked Lacework environment variables:

:movie_camera::popcorn:Step-by-step video: Editing the Postman LaceworkEnvironment

  1. In your Postman workspace, click the Environments tab
  2. Select “LaceworkEnvironment”
  3. Edit the following environment variables by copying the values from the Lacework API Key file you downloaded earlier.

:white_check_mark:Make sure that your AccessKeyID, SecretAccessKey and baseUrl are properly stored as the initial value AND current value. This is important to avoid errors.

  1. AccessKeyID: keyId value from your API key file
  2. SecretAccessKey: secret value from your API key file
  3. baseUrl: Replace the placeholder, YourLacework ,with the account name of the account field from your API key file
  4. Click Save

(In case you’re wondering, yes, this demo API key has been deleted prior publishing)

:eight_spoked_asterisk: And you’re done! Now, let’s make our first call to the Lacework API!