Prerequisites
Before setting up your Postman workspace, ensure you have:- Postman Desktop App or access to Postman Web
- A SCANOSS API key (obtain from your account settings at scanoss.com)
- Familiarity with REST API concepts (HTTP methods, request headers, and JSON responses)
Installing Postman
Desktop Application
- Visit Postman Downloads
- Download the installer for your platform:
- Windows:
.exeinstaller - macOS:
.dmgfile - Linux:
.tar.gzor snap package
- Windows:
- Run the installer and follow the on-screen instructions
Web Version
Alternatively, use Postman in your browser:- Visit web.postman.com
- Sign in or create a free account
- Start using Postman directly in your browser
Creating a Workspace
Workspaces help you organise your API collections, environments, and documentation in one place.Step 1: Create a New Workspace
- Open Postman
- Click Workspaces in the top left
- Click Create Workspace
- Enter the workspace details:
- Name:
SCANOSS API Testing - Summary:
Workspace for testing SCANOSS API endpoints - Visibility: Select Personal for individual use or Team for shared access
- Name:
- Click Create Workspace
Step 2: Create a New Collection
Collections group related API requests together.- In your workspace, click Collections in the left sidebar
- Click + or Create a collection
- Name it
SCANOSS API - Add a description:
Collection of SCANOSS API endpoints for security intelligence, cryptography analysis, and component search - Click Create
Setting Up Environment Variables
Environment variables store reusable values such as API keys and base URLs, allowing you to switch between environments without modifying individual requests.Create an Environment
- Click Environments in the left sidebar
- Click + or Create Environment
- Name it
SCANOSS Production - Add the following variables:
| Variable Name | Type | Initial Value | Current Value |
|---|---|---|---|
base_url | default | https://api.scanoss.com | https://api.scanoss.com |
api_key | secret | (leave blank) | your-scanoss-api-key |
vulnerability_path | default | /v2/vulnerabilities | /v2/vulnerabilities |
cryptography_path | default | /v2/cryptography | /v2/cryptography |
components_path | default | /v2/components | /v2/components |
- Click Save
Variable Types Explained
default: Visible to collaborators. Use for non-sensitive configuration values.secret: Hidden from collaborators. Use for API keys and passwords.
Initial Value vs Current Value
- Initial Value: Shared with team members and synchronised to the Postman cloud. Do not store sensitive credentials here when sharing a collection.
- Current Value: Stored locally on your machine only; never synchronised. Use this field for your actual API key.
Best Practice: When working alone, you may populate both the Initial and Current values with your API key. When sharing a collection with others, leave the Initial Value blank and enter your API key in the Current Value field only.
Configuring Collection Authorisation
Set up authentication at the collection level so that it applies automatically to all requests within the collection.Step 1: Open Collection Settings
- Click on your
SCANOSS APIcollection - Click the … (three dots) menu
- Select Edit
- Go to the Authorization tab
Step 2: Configure API Key Authentication
Terminology note:X-Api-Keyis the HTTP header name sent with each request.api_keyis the Postman environment variable that holds your key value.
- Type: Select API Key from the dropdown
- Configure the key:
- Key:
X-Api-Key - Value:
{{api_key}}(references the environment variable) - Add to:
Header
- Key:
- Click Save
X-Api-Key header to all requests
in the collection.
Alternative: Per-Request Header Configuration
To add the header manually to individual requests instead:- Open any request and go to the Headers tab
- Add a new header:
- Key:
X-Api-Key - Value:
{{api_key}}
- Key:
Creating Request Folders
Organise your requests by API category using folders.Step 1: Create Folders
- Hover over your
SCANOSS APIcollection - Click … → Add folder
- Create the following folders:
- Vulnerability API
- Cryptography API
- Component Search
- Dependency Decoration
- Raw Output
Note: The Vulnerability API folder corresponds to what the SCANOSS platform also refers to as the Security API in some contexts.
Step 2: Add Descriptions
For each folder:- Click … → Edit
- Add a description:
- Vulnerability API:
Endpoints for retrieving vulnerability data and CPEs - Cryptography API:
Endpoints for cryptographic algorithm analysis - Component Search:
Endpoints for searching and retrieving component information - Dependency Decoration:
Endpoints for enriching dependency data with SCANOSS intelligence - Raw Output:
Endpoints returning raw scan output for direct fingerprint analysis
- Vulnerability API:
Testing Your Setup
Create a Test Request
Verify your configuration with a simple API call.- Right-click the Vulnerability API folder
- Select Add request
- Name it
Get Component CPEs - Test - Configure the request:
- Method:
GET - URL:
{{base_url}}{{vulnerability_path}}/cpes/component?purl=pkg:github/scanoss/engine&requirement=>=5.0.0
- Method:
- Click Send
Expected Response
A successful request returns a JSON response similar to the following:Troubleshooting
401 Unauthorised:- Verify that the
api_keyenvironment variable contains a valid API key - Confirm that the correct environment is selected (dropdown in the top right)
- Check the Headers tab to confirm the
X-Api-Keyheader is present
- Verify the request URL is correct
- Check that all environment variables are populated
- Ensure the
base_urlvalue does not have a trailing slash
- Check your internet connection
- Verify that the SCANOSS API is reachable
- Open the Postman Console for detailed error output (View → Show Postman Console)
Selecting the Active Environment
To enable environment variable resolution:- Locate the environment dropdown in the top right corner of Postman
- Click the dropdown (it may display No Environment)
- Select
SCANOSS Production - Confirm the environment name is shown in the dropdown
Importing a SCANOSS Collection
If a pre-built SCANOSS API collection file or URL has been provided to you:Import from Link
- Click Import in the top left
- Select the Link tab
- Paste the collection URL
- Click Continue → Import
Import from File
- Click Import in the top left
- Select the File tab, or drag and drop the file into the import window
- Select the collection JSON file
- Click Import
Workspace Organisation Tips
Naming Conventions
- Requests: Use descriptive names such as
Get Component Vulnerabilitiesrather thanRequest 1 - Folders: Group by API category or functional workflow
- Environments: Include the target environment in the name (e.g.,
SCANOSS Production,SCANOSS Staging)
Documentation
Add documentation to each request:- Select a request
- Click the Documentation icon (📄) or tab
- Add:
- Description: What the endpoint does
- Parameters: Explanation of query parameters and their expected values
- Example Response: A sample successful response
Using Examples
Save responses as examples for reference and documentation:- After receiving a response, click Save Response
- Name the example (e.g.,
Successful ResponseorComponent Not Found) - Saved examples appear in the right sidebar and in the collection documentation
Collection Variables vs Environment Variables
When to Use Collection Variables
- Values that are specific to the collection and do not vary between environments
- Shared path segments or common parameters
- Mock server URLs
When to Use Environment Variables
- Values that change between environments (Production, Staging, Development)
- API keys and authentication tokens
- Base URLs that differ per environment
Setting Collection Variables
- Click on your collection
- Go to the Variables tab
- Add variables, for example:
version:v2timeout:30000
Best Practices
- Use environment variables for credentials: Never hardcode API keys directly in request URLs or headers.
- Organise requests into folders: Group related endpoints together to improve navigability.
- Document each request: Include a description, parameter definitions, and a sample response for every request.
- Save response examples: Capture examples for both success and error scenarios.
- Export and version your collections: Regularly export collection and environment JSON files and store them in version control.
- Protect sensitive data when sharing: Ensure the Initial Value of secret variables is blank before exporting or sharing a collection.
- Write test scripts: Add Postman test scripts to validate response status codes, structure, and field values automatically.
Backing Up Your Workspace
Export Collection
- Click … on your collection
- Select Export
- Choose Collection v2.1 (recommended)
- Save the JSON file
Export Environment
- Click … on your environment
- Select Export
- Save the JSON file
- Note: Secret variable values are not included in exports for security reasons.
Cloud Synchronisation
Postman automatically synchronises your workspace to the cloud when you are signed in. To verify:- Check the sync icon in the header
- Confirm it shows Synced or a checkmark
Next Steps
With your workspace configured, you can proceed to:- Add requests: Create requests for all SCANOSS API endpoints
- Test endpoints: Send requests and review the responses
- Write test scripts: Validate response status codes and payloads
- Run collection workflows: Use the Collection Runner to execute requests sequentially
- Generate documentation: Publish API documentation using Postman’s built-in documentation tools