Needed Items:
Postman - download the latest version at https://www.postman.com/downloads/
Lacework API version 1
You will need to download the Swagger.json file from the API v1 Documentation page. To do so, first, log in to your Lacework tenant. After logging into your Lacework tenant, using the menu on the left side, navigate to Help -> API Documentation. Next, click or right-click as needed the link at the top labeled https://{your_lacework_tenant}.lacework.net/api/v1/external/swagger.json as shown below to save the needed swagger.json file.
Lacework API Version 2
You will need to download the Open API compliant YAML file from the API v2 Documentation page. To do so, first, log in to your Lacework tenant. After logging into your Lacework tenant, using the menu on the left side, navigate to Help -> API 2.0 Documentation. Next, click the button at the top labeled "Download" as shown below to save the needed YAML file. The filename will be "lacework-api-v2.0.yaml"
NOTE - API v1 (swagger.json) and API v2 (lacework-api-v2.0.yaml) files require different import settings for optimal results.
API v2 - Import the YAML file into Postman
Step 1 - Open Postman and navigate to your preferred Workspace. Click on the "Collections" tile/tab on the left side. Next, click the Import button to open the Import window as shown below.
Step 2 - Drag the file lacework-api-v2.0.yaml into the Import window or click the Upload Files button to select it.
Step 3 - You will now be presented with the Import Options window. You should see an entry labeled "Lacework API Documentation 2.0". Verify the entry shows the correct format, Open AI 3.0. Ensure the "Generate collection from imported APIs" button is checked. Change the value for 'Link this collection as" from "Documentation" to "Test Suite" Last, click the "Show advanced settings" arrow. As shown below:
Step 4 - Next Ensure all values match the following:
Under Import -> "Test Suite" is selected in the drop-down.
Naming Request -> Fallback
Set indent character -> Space
Collapse Redundant folders -> Enabled
Optimise conversion -> Enabled
Request parameter generation -> Example
Response parameter generation -> Schema
Folder Organization -> Tags
Include auth info in example request -> Disabled
Disable optional parameters -> Enabled
Keep Implicit Headers - Disabled
Then click the Import button. Once the import completes, click the Close button to return to Postman.
Step 5 - Last, click on the "Collections" tile/tab on the left to see the newly imported collection!
Note: The v2 collection also includes built-in documentation. Just click on the "View complete collection documentation" link in the bottom right corner as shown below.
API v1 - Import your Swagger file into Postman
Step 1 - Open Postman and navigate to your preferred Workspace. Click on the "Collections" tile/tab on the left side. Next, click the Import button to open the Import window as shown below.
Step 2 - Drag the swagger.json file into the Import window or select the Upload Files button to select it.
Step 3 - You will now be presented with the Import Options window. You should see an entry labeled "Lacework API Documentation". Verify the entry shows the correct format, Swagger 2.0. Ensure the "Generate collection from imported APIs" button is checked. Next, click the "Show advanced settings" arrow.
Step 4 - Next Ensure all values match the following:
Under Import -> Documentation is selected in the drop-down.
Naming Request -> Fallback
Set indent character -> Space
Collapse Redundant folders -> Enabled
Optimise conversion -> Enabled
Request parameter generation -> Schema
Response parameter generation -> Schema
Folder Organization -> Paths
Include auth info in example request -> Disabled
Then click the Import button. Once the import completes, click the Close button to return to Postman.
Step 5 - Last, click on the "Collections" tile/tab on the left to see the newly imported collection!