Skip to main content

ossindex-api-client

This documents the available APIs into Sonatype OSS Index - API Version: 1-SNAPSHOT (be72c8343baab38a8c598d28dafc78003dce81db).

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2024.323
  • Package version: 1.0.0
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/sonatype-nexus-community

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/sonatype-nexus-community/ossindex-api-client.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/sonatype-nexus-community/ossindex-api-client.git)

Then import the package:

import ossindex_api_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import ossindex_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ossindex_api_client
from ossindex_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://ossindex.sonatype.org
# See configuration.py for a list of all supported configuration parameters.
configuration = ossindex_api_client.Configuration(
    host = "https://ossindex.sonatype.org"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: apiToken
configuration = ossindex_api_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure HTTP basic authorization: basicAuth
configuration = ossindex_api_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with ossindex_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ossindex_api_client.ComponentVulnerabilityReportsApi(api_client)
    body = ossindex_api_client.ComponentReportRequest() # ComponentReportRequest |  (optional)

    try:
        # Request vulnerability reports for components
        api_response = api_instance.post(body=body)
        print("The response of ComponentVulnerabilityReportsApi->post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling ComponentVulnerabilityReportsApi->post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://ossindex.sonatype.org

Class Method HTTP request Description
ComponentVulnerabilityReportsApi post POST /api/v3/component-report Request vulnerability reports for components
ComponentVulnerabilityReportsApi post1 POST /api/v3/authorized/component-report Request vulnerability reports for components
VersionApi get GET /api/v3/version Get service version information

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

apiToken

  • Type: HTTP basic authentication

basicAuth

  • Type: HTTP basic authentication

Author

community@sonatype.com

Metadata

Release files for ossindex_api_client 2025.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ossindex_api_client 2025.15.0
File Size Uploaded
ossindex_api_client-2025.15.0.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ossindex_api_client 2025.15.0
File Interpreter ABI Platform
ossindex_api_client-2025.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 kB

Release files / ossindex_api_client-2025.15.0.tar.gz

Download URL ossindex_api_client-2025.15.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b2648df164fc0d4cc23339edbbe8fba026340d977d1d23939ee8c4d3dd17e8ee
BLAKE2b-256 checksum
How to use checksums
52ca6df125c922809eb08bf12d6e960e9c775e91bd6b0834bf2333f967a8cbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.8 Linux/6.5.0-1025-azure

Release files / ossindex_api_client-2025.15.0-py3-none-any.whl

Download URL ossindex_api_client-2025.15.0-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34caff755a4ae82f564c81a17c53d3ea6a1bb8ecc3600385511877fe215208c0
BLAKE2b-256 checksum
How to use checksums
82dc8077e96b36882a6cb37f2b8bb5567541273e619af66f64f6cc80d336771c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.12.8 Linux/6.5.0-1025-azure

Release history Release notifications | RSS feed

This release

2025.15.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page