Customize the apis.yaml for PostMan
This document (000020929) is provided subject to the disclaimer at the end of this document.
Resolution
- Download the apis.zip from our documentation and unzip it.
- Open it into an editor and make the following updates.
- basePath (This should be the hostname/IP address to the NeuVector API service.)
- add default variable {{TOKEN}} to the X-Auth-Token header
Update the basePath
Add default value to X-Auth-Token header by doing a find and replace all. Save the changes.
Import the updated apis.yaml into Postman and should now have a NeuVector API collection
Click on the eye and create a new Environment and select the Environment to use it
Update the /v1/auth call with the appropriate NeuVector user credentials
Add a test code into the /v1/auth call to extract the authentication token and save it into the TOKEN variable
var jsonData = JSON.parse(responseBody); postman.setEnvironmentVariable("TOKEN", jsonData.token.token);
NeuVector by default uses self-signed certificates. You need to disable certificate verification.
Ensure the Environment is selected. Now you should be able to click on the "Send" button on the /v1/auth call. The response should be a 200, and the TOKEN variable should be populated so the subsequent call will automatically make use of it.
You can verify by clicking on the eye next the selected environment or make a GET request to the /v1/eula endpoint and should receive a 200 response like the one below.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020929
- Creation Date: 17-Jan-2023
- Modified Date:18-Jan-2023
-
- SUSE NeuVector
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com