Skip to main content

Introduction

Provide a clear, concise introduction to the feature or topic. Explain:
  • What this feature/topic is
  • Why it’s important or useful for SCANOSS users
  • When developers would use this functionality

Prerequisites

List any requirements or setup needed before using this feature:
  • Required tools or dependencies
  • Prior configuration steps
  • Necessary permissions or access levels

Usage

Basic Usage

Explain the fundamental way to use this feature. Break it down into clear steps:

Advanced Usage

Provide information about more advanced use cases or configuration options:
  • Optional parameters and their effects
  • Performance optimisation tips
  • Integration with other SCANOSS features

Examples

Example 1: Basic Scan Request

Provide a practical, example with context.
# Scan a single file using the SCANOSS CLI
scanoss-py scan path/to/your/file
Expected Response:
{
  "bom": {
    "include": [
      {
        "purl": "pkg:github/scanoss/scanner.c"
      }
    ]
  }
}

Example 2: Batch Scanning

Show a more complex example that demonstrates additional capabilities.
from scanoss.scanner import Scanner

def main():
    scanner = Scanner(url='new-url', api_key='key')
    scanner.scan_folder( '.' )

if __name__ == "__main__":
    main()
Use Case: This approach is ideal when scanning entire project directories for open-source inventory analysis.

Common Issues and Troubleshooting

Issue: Authentication Failures

Problem: API requests return 401 Unauthorized errors. Solution:
  1. Verify your API key is correctly set
  2. Check that your API key hasn’t expired
  3. Ensure you have the necessary permissions for your organization

Issue: Rate Limiting

Problem: Requests are being throttled. Solution:
  • Implement exponential backoff in your code
  • Contact support to discuss rate limit increases for your use case
  • Consider caching results for frequently scanned files

Video Tutorial

Watch our walkthrough video to see this feature in action:

Next Steps

After mastering this feature, explore these related topics: Need help? Contact our AI assistant or check our FAQs.