Sonatype Guide API
Project description
sonatype-guide-api-client
REST API into Sonatype Guide.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 202601
- 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
Requirements.
Python 3.9+
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/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:
import sonatype_guide_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 sonatype_guide_api_client
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
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 http://api.guide.sonatype.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sonatype_guide_api_client.Configuration(
host = "http://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 (v2)
api_response = api_instance.get_billing_v2()
print("The response of BillingApi->get_billing_v2:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling BillingApi->get_billing_v2: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://api.guide.sonatype.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BillingApi | get_billing_v2 | GET /billing/v2 | Get billing information (v2) |
| BillingApi | get_customer_info | GET /billing/customer | Get customer information |
| BillingApi | get_plans | GET /billing/plans | Get all available plans with current plan marked |
| BillingApi | get_plans_v2 | GET /billing/v2/plans | Get all available plans (v2) |
| BillingApi | get_user_invoice_history | GET /billing/invoices | Get user invoice history |
| BillingApi | get_user_subscription | GET /billing/subscription | Get user subscription details |
| ComponentsApi | 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 | GET /components/detail | Get component detail by coordinates (query parameters) |
| ComponentsApi | 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 | GET /components/vulnerabilities | Get vulnerabilities for a component by coordinates (query parameters) |
| CreditsApi | get_credit_usage_breakdown | GET /credits/usage/breakdown | Get credit usage breakdown |
| CreditsApi | get_credit_usage_history | GET /credits/usage/history | Get credit usage history |
| CurrentUserOrganizationApi | accept_invitation | POST /users/me/organization/invitations/{invitationToken}/accept | Accept organization invitation |
| CurrentUserOrganizationApi | bulk_remove_members_or_invitations | DELETE /users/me/organization/members | Bulk remove members or invitations from organization |
| CurrentUserOrganizationApi | get_current_user_organization | GET /users/me/organization | Get current user's organization |
| CurrentUserOrganizationApi | get_current_user_organization_v2 | GET /users/me/organization/v2 | Get current user's organization (v2) |
| CurrentUserOrganizationApi | invite_users | POST /users/me/organization/members/invite | Invite users to current user's an organization |
| CurrentUserOrganizationApi | remove_member_or_invitation | DELETE /users/me/organization/members/{email} | Remove member or invitation from organization |
| CurrentUserOrganizationApi | retrieve_organization_members_as_csv | GET /users/me/organization/members | Retrieve current user's organization members and invitees |
| CurrentUserOrganizationApi | update_organization | PUT /users/me/organization | Update current user's organization |
| CurrentUserTokensApi | create_token | POST /users/me/tokens | Create a new Personal Access Token |
| CurrentUserTokensApi | get_token_by_id | GET /users/me/tokens/{tokenId} | Get a Personal Access Token by ID |
| CurrentUserTokensApi | list_tokens | GET /users/me/tokens | List all Personal Access Tokens |
| CurrentUserTokensApi | revoke_token | DELETE /users/me/tokens/{tokenId} | Revoke a Personal Access Token |
| RecommendationsApi | get_recommendations | POST /recommendations | Get version upgrade recommendations |
| UsageApi | get_billing_periods | GET /usage/billing-periods | Get billing periods for user |
| UsageApi | get_credit_balance | GET /usage | Get credit balance |
| UsageApi | get_credit_periods_v2 | GET /usage/v2/credit-periods | Get credit periods (v2) |
| UsageApi | get_cumulative_usage | GET /usage/cumulative | Get cumulative credit usage for a billing period |
| UsageApi | get_usage_v2 | GET /usage/v2 | Get usage information (v2) |
| VulnerabilitiesApi | get_vulnerability_affected_components | GET /vulnerabilities/{id}/components | Get affected components for a vulnerability |
| VulnerabilitiesApi | get_vulnerability_by_ref_id | GET /vulnerabilities/{id} | Get vulnerability by ID |
| OssiControllerApi | get_component_report | GET /api/v3/authorized/component-report/** | |
| OssiControllerApi | get_component_report1 | GET /api/v3/component-report/** | |
| OssiControllerApi | get_component_reports | POST /api/v3/component-report | |
| OssiControllerApi | get_component_reports1 | POST /api/v3/authorized/component-report | |
| OssiControllerApi | get_version | GET /api/v3/version |
Documentation For Models
- AffectedComponentVersion
- ApiSearchResponse
- ApiSearchResponseAffectedComponentVersion
- ApiSearchResponseComponentDetailDocument
- ApiSearchResponseComponentDocument
- ApiSearchResponseVulnerabilityDocument
- BillingDTO
- BillingPeriod
- BillingPeriodsResponse
- BulkRemoveMembersRequest
- ComponentArtifact
- ComponentDetailDocument
- ComponentDocument
- ComponentLicense
- ComponentReportGet
- ComponentReportPost
- CreateTokenRequest
- CreditBalance
- CreditUsage
- CumulativeCreditUsage
- CurrentUserOrganizationResponse
- CustomerInfo
- DailyCreditUsage
- FromVersion
- InviteUsersRequest
- Invoice
- OrganizationBillingDTO
- OrganizationDTOv2
- OrganizationMembersResponse
- OrganizationPlanDTO
- OrganizationResponse
- OrganizationUsageDTO
- OssiVulnerabilityPost
- PeriodDTO
- Plan
- PlanDTOv2
- PlanInfo
- PlansResponse
- PurlRequestPost
- RecommendationRequest
- RecommendationResponse
- RecommendedVersion
- Reference
- Refid
- SubscriptionDetailsResponse
- UpdateOrganizationRequest
- UsageDTO
- UserTokenDTO
- UserTokenWithPlaintextDTO
- VulnerabilityDetailDocument
- VulnerabilityDocument
- VulnerableMethod
Documentation For Authorization
Authentication schemes defined for the API:
bearer-jwt
- Type: Bearer authentication (JWT)
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sonatype_guide_api_client-0.0.2.tar.gz.
File metadata
- Download URL: sonatype_guide_api_client-0.0.2.tar.gz
- Upload date:
- Size: 69.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f9b7dd4d02b61ace3a814388dffc68ecdae37487ca7775fed6de8a043c6b3c
|
|
| MD5 |
cf5aeffc1f31c58cf366c689e50e4517
|
|
| BLAKE2b-256 |
d472acfccb9014c89c53eebad90e1557f80bc03cabe8fd32205ff8a863228341
|
Provenance
The following attestation bundles were made for sonatype_guide_api_client-0.0.2.tar.gz:
Publisher:
release.yaml on sonatype-nexus-community/sonatype-guide-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonatype_guide_api_client-0.0.2.tar.gz -
Subject digest:
d0f9b7dd4d02b61ace3a814388dffc68ecdae37487ca7775fed6de8a043c6b3c - Sigstore transparency entry: 863026346
- Sigstore integration time:
-
Permalink:
sonatype-nexus-community/sonatype-guide-api-client@0667e3e699bcfa26b2066b2f62e3e412775ce320 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sonatype-nexus-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@0667e3e699bcfa26b2066b2f62e3e412775ce320 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sonatype_guide_api_client-0.0.2-py3-none-any.whl.
File metadata
- Download URL: sonatype_guide_api_client-0.0.2-py3-none-any.whl
- Upload date:
- Size: 133.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
485c03bb9a70502173409d29f3085257b037a1a5b8f6bf27a4b1677e0c3f98a9
|
|
| MD5 |
5d6ad9483e761ac2d620b434f9a2e339
|
|
| BLAKE2b-256 |
a8598e2f582fbcbf77b73a433a8f4d34169944119a543d8ff72b6e55d97ee1e9
|
Provenance
The following attestation bundles were made for sonatype_guide_api_client-0.0.2-py3-none-any.whl:
Publisher:
release.yaml on sonatype-nexus-community/sonatype-guide-api-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonatype_guide_api_client-0.0.2-py3-none-any.whl -
Subject digest:
485c03bb9a70502173409d29f3085257b037a1a5b8f6bf27a4b1677e0c3f98a9 - Sigstore transparency entry: 863026377
- Sigstore integration time:
-
Permalink:
sonatype-nexus-community/sonatype-guide-api-client@0667e3e699bcfa26b2066b2f62e3e412775ce320 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/sonatype-nexus-community
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@0667e3e699bcfa26b2066b2f62e3e412775ce320 -
Trigger Event:
push
-
Statement type: