Metadata-Version: 2.4
Name: sonatype_guide_api_client
Version: 1.202605.2
Summary: Sonatype Guide API
Home-page: 
Author: Sonatype Community Maintainers
Author-email: Sonatype Community Maintainers <community@sonatype.com>
License: Apache 2.0
Project-URL: Repository, https://github.com/sonatype-nexus-community/sonatype-guide-api-client
Keywords: OpenAPI,OpenAPI-Generator,Sonatype Guide API
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: license-file

# sonatype-guide-api-client
REST API into [Sonatype Guide](https://guide.sonatype.com).

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 202605
- Package version: 1.0.0
- Generator version: 7.16.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://github.com/sonatype-nexus-community](https://github.com/sonatype-nexus-community)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

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

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

Then import the package:
```python
import sonatype_guide_api_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import sonatype_guide_api_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import sonatype_guide_api_client
from sonatype_guide_api_client.rest import ApiException
from pprint import pprint

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

# 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 Bearer authorization (JWT): bearer-jwt
configuration = sonatype_guide_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with sonatype_guide_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sonatype_guide_api_client.BillingApi(api_client)

    try:
        # Get billing information
        api_response = api_instance.get_billing()
        print("The response of BillingApi->get_billing:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BillingApi->get_billing: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.guide.sonatype.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BillingApi* | [**get_billing**](docs/BillingApi.md#get_billing) | **GET** /billing | Get billing information
*BillingApi* | [**get_invoice_pdf**](docs/BillingApi.md#get_invoice_pdf) | **GET** /billing/invoices/{invoiceId}/pdf | Download invoice PDF
*BillingApi* | [**get_plans**](docs/BillingApi.md#get_plans) | **GET** /billing/plans | Get all available plans
*BillingApi* | [**get_user_invoice_history**](docs/BillingApi.md#get_user_invoice_history) | **GET** /billing/invoices | Get user invoice history
*ComponentsApi* | [**get_component_dependencies_by_purl_query_param**](docs/ComponentsApi.md#get_component_dependencies_by_purl_query_param) | **GET** /components/dependencies | Get dependencies for a component by coordinates (query parameters)
*ComponentsApi* | [**get_component_detail_by_purl_query_param**](docs/ComponentsApi.md#get_component_detail_by_purl_query_param) | **GET** /components/detail | Get component detail by coordinates (query parameters)
*ComponentsApi* | [**get_component_versions_by_purl_query_param**](docs/ComponentsApi.md#get_component_versions_by_purl_query_param) | **GET** /components/versions | Get all component versions by coordinates (query parameters)
*ComponentsApi* | [**get_component_vulnerabilities_by_purl_query_param**](docs/ComponentsApi.md#get_component_vulnerabilities_by_purl_query_param) | **GET** /components/vulnerabilities | Get vulnerabilities for a component by coordinates (query parameters)
*ComponentsApi* | [**get_latest_version**](docs/ComponentsApi.md#get_latest_version) | **POST** /components/latest-version | Get latest version of a component
*CurrentUserOrganizationApi* | [**accept_invitation**](docs/CurrentUserOrganizationApi.md#accept_invitation) | **POST** /users/me/organization/invitations/{invitationToken}/accept | Accept organization invitation
*CurrentUserOrganizationApi* | [**bulk_remove_members_or_invitations**](docs/CurrentUserOrganizationApi.md#bulk_remove_members_or_invitations) | **DELETE** /users/me/organization/members | Bulk remove members or invitations from organization
*CurrentUserOrganizationApi* | [**get_current_user_organization**](docs/CurrentUserOrganizationApi.md#get_current_user_organization) | **GET** /users/me/organization | Get current user&#39;s organization
*CurrentUserOrganizationApi* | [**invite_users**](docs/CurrentUserOrganizationApi.md#invite_users) | **POST** /users/me/organization/members/invite | Invite users to current user&#39;s an organization
*CurrentUserOrganizationApi* | [**leave_organization**](docs/CurrentUserOrganizationApi.md#leave_organization) | **DELETE** /users/me/organization/membership | Leave organization
*CurrentUserOrganizationApi* | [**remove_member_or_invitation**](docs/CurrentUserOrganizationApi.md#remove_member_or_invitation) | **DELETE** /users/me/organization/members/{email} | Remove member or invitation from organization
*CurrentUserOrganizationApi* | [**retrieve_organization_members_as_csv**](docs/CurrentUserOrganizationApi.md#retrieve_organization_members_as_csv) | **GET** /users/me/organization/members | Retrieve current user&#39;s organization members and invitees
*CurrentUserOrganizationApi* | [**update_organization**](docs/CurrentUserOrganizationApi.md#update_organization) | **PUT** /users/me/organization | Update current user&#39;s organization
*CurrentUserTokensApi* | [**create_token**](docs/CurrentUserTokensApi.md#create_token) | **POST** /users/me/tokens | Create a new Personal Access Token
*CurrentUserTokensApi* | [**get_token_by_id**](docs/CurrentUserTokensApi.md#get_token_by_id) | **GET** /users/me/tokens/{tokenId} | Get a Personal Access Token by ID
*CurrentUserTokensApi* | [**list_tokens**](docs/CurrentUserTokensApi.md#list_tokens) | **GET** /users/me/tokens | List all Personal Access Tokens
*CurrentUserTokensApi* | [**revoke_token**](docs/CurrentUserTokensApi.md#revoke_token) | **DELETE** /users/me/tokens/{tokenId} | Revoke a Personal Access Token
*OSSIndexCompatibilityApi* | [**get_component_report**](docs/OSSIndexCompatibilityApi.md#get_component_report) | **GET** /api/v3/authorized/component-report/** | Get component report by PURL
*OSSIndexCompatibilityApi* | [**get_component_report1**](docs/OSSIndexCompatibilityApi.md#get_component_report1) | **GET** /api/v3/component-report/** | Get component report by PURL
*OSSIndexCompatibilityApi* | [**get_component_reports**](docs/OSSIndexCompatibilityApi.md#get_component_reports) | **POST** /api/v3/component-report | Get component reports for multiple PURLs
*OSSIndexCompatibilityApi* | [**get_component_reports1**](docs/OSSIndexCompatibilityApi.md#get_component_reports1) | **POST** /api/v3/authorized/component-report | Get component reports for multiple PURLs
*OSSIndexCompatibilityApi* | [**get_version**](docs/OSSIndexCompatibilityApi.md#get_version) | **GET** /api/v3/version | Get API version
*RecommendationsApi* | [**get_recommendations**](docs/RecommendationsApi.md#get_recommendations) | **POST** /recommendations | Get version upgrade recommendations
*UsageApi* | [**get_credit_periods**](docs/UsageApi.md#get_credit_periods) | **GET** /usage/credit-periods | Get credit periods
*UsageApi* | [**get_cumulative_usage**](docs/UsageApi.md#get_cumulative_usage) | **GET** /usage/cumulative | Get cumulative credit usage for a billing period
*UsageApi* | [**get_ossi_usage_history**](docs/UsageApi.md#get_ossi_usage_history) | **GET** /usage/ossi-history | Get historical OSSI usage
*UsageApi* | [**get_usage**](docs/UsageApi.md#get_usage) | **GET** /usage | Get usage information
*VulnerabilitiesApi* | [**get_vulnerability_affected_components**](docs/VulnerabilitiesApi.md#get_vulnerability_affected_components) | **GET** /vulnerabilities/{id}/components | Get affected components for a vulnerability
*VulnerabilitiesApi* | [**get_vulnerability_by_ref_id**](docs/VulnerabilitiesApi.md#get_vulnerability_by_ref_id) | **GET** /vulnerabilities/{id} | Get vulnerability by ID


## Documentation For Models

 - [AffectedComponentVersion](docs/AffectedComponentVersion.md)
 - [ApiSearchResponse](docs/ApiSearchResponse.md)
 - [ApiSearchResponseAffectedComponentVersion](docs/ApiSearchResponseAffectedComponentVersion.md)
 - [ApiSearchResponseComponentDetailDocument](docs/ApiSearchResponseComponentDetailDocument.md)
 - [ApiSearchResponseComponentDocument](docs/ApiSearchResponseComponentDocument.md)
 - [ApiSearchResponseVulnerabilityDocument](docs/ApiSearchResponseVulnerabilityDocument.md)
 - [BillingDTO](docs/BillingDTO.md)
 - [BulkRemoveMembersRequest](docs/BulkRemoveMembersRequest.md)
 - [ComponentArtifact](docs/ComponentArtifact.md)
 - [ComponentDetailDocument](docs/ComponentDetailDocument.md)
 - [ComponentDocument](docs/ComponentDocument.md)
 - [ComponentLicense](docs/ComponentLicense.md)
 - [ComponentReportGet](docs/ComponentReportGet.md)
 - [ComponentReportPost](docs/ComponentReportPost.md)
 - [CreateTokenRequest](docs/CreateTokenRequest.md)
 - [CumulativeCreditUsage](docs/CumulativeCreditUsage.md)
 - [DailyCreditUsage](docs/DailyCreditUsage.md)
 - [DtsDimensions](docs/DtsDimensions.md)
 - [FromVersion](docs/FromVersion.md)
 - [InviteUsersRequest](docs/InviteUsersRequest.md)
 - [Invoice](docs/Invoice.md)
 - [LatestVersionRequest](docs/LatestVersionRequest.md)
 - [MethodSignature](docs/MethodSignature.md)
 - [OrganizationDTO](docs/OrganizationDTO.md)
 - [OrganizationMembersResponse](docs/OrganizationMembersResponse.md)
 - [OssiMonthlyUsage](docs/OssiMonthlyUsage.md)
 - [OssiUsageDataRange](docs/OssiUsageDataRange.md)
 - [OssiUsageHistoryDTO](docs/OssiUsageHistoryDTO.md)
 - [OssiUsageSummary](docs/OssiUsageSummary.md)
 - [OssiVulnerabilityGet](docs/OssiVulnerabilityGet.md)
 - [OssiVulnerabilityPost](docs/OssiVulnerabilityPost.md)
 - [PeriodDTO](docs/PeriodDTO.md)
 - [PlanDTO](docs/PlanDTO.md)
 - [PolicyComplianceResult](docs/PolicyComplianceResult.md)
 - [PolicyConditionResult](docs/PolicyConditionResult.md)
 - [PurlRequestPost](docs/PurlRequestPost.md)
 - [RecommendationRequest](docs/RecommendationRequest.md)
 - [RecommendationResponse](docs/RecommendationResponse.md)
 - [RecommendationVulnerableMethod](docs/RecommendationVulnerableMethod.md)
 - [RecommendedVersion](docs/RecommendedVersion.md)
 - [Reference](docs/Reference.md)
 - [Refid](docs/Refid.md)
 - [UpdateOrganizationRequest](docs/UpdateOrganizationRequest.md)
 - [UsageDTO](docs/UsageDTO.md)
 - [UserTokenDTO](docs/UserTokenDTO.md)
 - [UserTokenWithPlaintextDTO](docs/UserTokenWithPlaintextDTO.md)
 - [VulnerabilityDetailDocument](docs/VulnerabilityDetailDocument.md)
 - [VulnerabilityDocument](docs/VulnerabilityDocument.md)
 - [VulnerableMethod](docs/VulnerableMethod.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="bearer-jwt"></a>
### bearer-jwt

- **Type**: Bearer authentication (JWT)

<a id="ossi-basic-auth"></a>
### ossi-basic-auth

- **Type**: HTTP basic authentication

<a id="user-token"></a>
### user-token

- **Type**: Bearer authentication


## Author

community@sonatype.com


