# \SbomApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**check_license_compliance**](SbomApi.md#check_license_compliance) | **POST** /api/v1/sbom/check-compliance | Check license compliance against policies
[**convert_sbom**](SbomApi.md#convert_sbom) | **POST** /api/v1/sbom/{id}/convert | Convert an SBOM to a different format
[**delete_license_policy**](SbomApi.md#delete_license_policy) | **DELETE** /api/v1/sbom/license-policies/{id} | Delete a license policy
[**delete_sbom**](SbomApi.md#delete_sbom) | **DELETE** /api/v1/sbom/{id} | Delete an SBOM
[**generate_sbom**](SbomApi.md#generate_sbom) | **POST** /api/v1/sbom | Generate an SBOM for an artifact
[**get_cve_history**](SbomApi.md#get_cve_history) | **GET** /api/v1/sbom/cve/history/{id} | Get CVE history by artifact UUID or CVE identifier (legacy overload).
[**get_cve_history_by_artifact**](SbomApi.md#get_cve_history_by_artifact) | **GET** /api/v1/sbom/cve/history/by-artifact/{artifact_id} | Get CVE history for one artifact (typed UUID variant).
[**get_cve_history_by_cve**](SbomApi.md#get_cve_history_by_cve) | **GET** /api/v1/sbom/cve/history/by-cve/{cve_id} | Get CVE history for one CVE identifier across artifacts (typed CVE-id variant).
[**get_cve_trends**](SbomApi.md#get_cve_trends) | **GET** /api/v1/sbom/cve/trends | Get CVE trends and statistics
[**get_license_policy**](SbomApi.md#get_license_policy) | **GET** /api/v1/sbom/license-policies/{id} | Get a license policy by ID
[**get_sbom**](SbomApi.md#get_sbom) | **GET** /api/v1/sbom/{id} | Get SBOM by ID with full content
[**get_sbom_by_artifact**](SbomApi.md#get_sbom_by_artifact) | **GET** /api/v1/sbom/by-artifact/{artifact_id} | Get SBOM by artifact ID
[**get_sbom_components**](SbomApi.md#get_sbom_components) | **GET** /api/v1/sbom/{id}/components | Get components of an SBOM
[**list_license_policies**](SbomApi.md#list_license_policies) | **GET** /api/v1/sbom/license-policies | List all license policies
[**list_sboms**](SbomApi.md#list_sboms) | **GET** /api/v1/sbom | List SBOMs with optional filters
[**update_cve_status**](SbomApi.md#update_cve_status) | **POST** /api/v1/sbom/cve/status/{id} | Update CVE status
[**update_cve_status_by_artifact_cve**](SbomApi.md#update_cve_status_by_artifact_cve) | **POST** /api/v1/sbom/cve/status/by-artifact/{artifact_id}/by-cve/{cve_id} | Update CVE status for a synth (scan_findings-derived) Security tab row.
[**upsert_license_policy**](SbomApi.md#upsert_license_policy) | **POST** /api/v1/sbom/license-policies | Create or update a license policy



## check_license_compliance

> models::LicenseCheckResult check_license_compliance(check_license_compliance_request)
Check license compliance against policies

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**check_license_compliance_request** | [**CheckLicenseComplianceRequest**](CheckLicenseComplianceRequest.md) |  | [required] |

### Return type

[**models::LicenseCheckResult**](LicenseCheckResult.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## convert_sbom

> models::SbomContentResponse convert_sbom(id, convert_sbom_request)
Convert an SBOM to a different format

Returns the converted SBOM as a [`SbomContentResponse`]: the metadata row plus the full converted document under `content`. The `content` is load-bearing here. A consumer that asked for `target_format=spdx` needs the SPDX document (`content.spdxVersion`, `content.SPDXID`, ...) to feed downstream attestation tooling, and a `target_format=cyclonedx` request needs `content.bomFormat == \"CycloneDX\"`. Returning metadata-only (`SbomResponse`) dropped the converted document entirely, so callers could not tell an SPDX result from a CycloneDX one and round-trip conversion appeared to lose the document shape. (release-gate `test-sbom-convert.sh` 2.5.a / 2.5.b.)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | SBOM ID | [required] |
**convert_sbom_request** | [**ConvertSbomRequest**](ConvertSbomRequest.md) |  | [required] |

### Return type

[**models::SbomContentResponse**](SbomContentResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_license_policy

> serde_json::Value delete_license_policy(id)
Delete a license policy

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | License policy ID | [required] |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_sbom

> serde_json::Value delete_sbom(id)
Delete an SBOM

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | SBOM ID | [required] |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## generate_sbom

> models::SbomResponse generate_sbom(generate_sbom_request)
Generate an SBOM for an artifact

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**generate_sbom_request** | [**GenerateSbomRequest**](GenerateSbomRequest.md) |  | [required] |

### Return type

[**models::SbomResponse**](SbomResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_cve_history

> Vec<models::CveHistoryEntry> get_cve_history(id)
Get CVE history by artifact UUID or CVE identifier (legacy overload).

The path param accepts either:   - A UUID `artifact_id` (legacy shape, returns all CVEs for one artifact)   - A CVE id like `CVE-2019-10744` (returns this CVE across every artifact     the caller can access)  # URL design decision (#1385 round-2)  Overloading a single `{id}` path parameter to mean two different lookups is a REST anti-pattern: the route's behavior changes based on a runtime content sniff. We considered splitting into two routes vs documenting the overload and chose **both**: the split routes `GET /cve/history/by-artifact/{uuid}` and `GET /cve/history/by-cve/{cve_id}` are the canonical shape for new clients (typed path params, no sniff), while this overload remains so the v1.2.0 SDKs that already shipped against the single-route shape keep working. New code should prefer the split routes; the overload may be deprecated in v1.3.  Issue #1375: prior to this fix the route was typed `Path<Uuid>`, so any CVE-id call (e.g. the release-gate `GET /sbom/cve/history/CVE-2019-10744`) failed Axum's path extractor with a bare HTTP 400, leaving consumers unable to look up history by CVE.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **String** | Artifact UUID or CVE identifier (e.g. CVE-2019-10744). Prefer the typed routes /cve/history/by-artifact/{uuid} or /cve/history/by-cve/{cve_id}. | [required] |

### Return type

[**Vec<models::CveHistoryEntry>**](CveHistoryEntry.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_cve_history_by_artifact

> Vec<models::CveHistoryEntry> get_cve_history_by_artifact(artifact_id)
Get CVE history for one artifact (typed UUID variant).

Canonical replacement for the UUID branch of the overloaded `/cve/history/{id}` route. Returns every CVE ever detected against the given artifact, deduped across curated `cve_history` rows and live `scan_findings` projections.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**artifact_id** | **uuid::Uuid** | Artifact UUID | [required] |

### Return type

[**Vec<models::CveHistoryEntry>**](CveHistoryEntry.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_cve_history_by_cve

> Vec<models::CveHistoryEntry> get_cve_history_by_cve(cve_id)
Get CVE history for one CVE identifier across artifacts (typed CVE-id variant).

Canonical replacement for the CVE-id branch of the overloaded `/cve/history/{id}` route. Returns every artifact the caller can access where the given CVE has been detected.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**cve_id** | **String** | CVE identifier (e.g. CVE-2019-10744) | [required] |

### Return type

[**Vec<models::CveHistoryEntry>**](CveHistoryEntry.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_cve_trends

> models::CveTrends get_cve_trends(repository_id, days)
Get CVE trends and statistics

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**repository_id** | Option<**uuid::Uuid**> |  |  |
**days** | Option<**i32**> |  |  |

### Return type

[**models::CveTrends**](CveTrends.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_license_policy

> models::LicensePolicyResponse get_license_policy(id)
Get a license policy by ID

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | License policy ID | [required] |

### Return type

[**models::LicensePolicyResponse**](LicensePolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_sbom

> models::SbomContentResponse get_sbom(id)
Get SBOM by ID with full content

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | SBOM ID | [required] |

### Return type

[**models::SbomContentResponse**](SbomContentResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_sbom_by_artifact

> models::SbomContentResponse get_sbom_by_artifact(artifact_id)
Get SBOM by artifact ID

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**artifact_id** | **uuid::Uuid** | Artifact ID | [required] |

### Return type

[**models::SbomContentResponse**](SbomContentResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_sbom_components

> Vec<models::ComponentResponse> get_sbom_components(id)
Get components of an SBOM

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | SBOM ID | [required] |

### Return type

[**Vec<models::ComponentResponse>**](ComponentResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_license_policies

> Vec<models::LicensePolicyResponse> list_license_policies()
List all license policies

### Parameters

This endpoint does not need any parameter.

### Return type

[**Vec<models::LicensePolicyResponse>**](LicensePolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_sboms

> Vec<models::SbomResponse> list_sboms(artifact_id, repository_id, format)
List SBOMs with optional filters

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**artifact_id** | Option<**uuid::Uuid**> |  |  |
**repository_id** | Option<**uuid::Uuid**> |  |  |
**format** | Option<**String**> |  |  |

### Return type

[**Vec<models::SbomResponse>**](SbomResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_cve_status

> models::CveHistoryEntry update_cve_status(id, update_cve_status_request)
Update CVE status

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | CVE history entry ID | [required] |
**update_cve_status_request** | [**UpdateCveStatusRequest**](UpdateCveStatusRequest.md) |  | [required] |

### Return type

[**models::CveHistoryEntry**](CveHistoryEntry.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_cve_status_by_artifact_cve

> models::CveHistoryEntry update_cve_status_by_artifact_cve(artifact_id, cve_id, update_cve_status_request)
Update CVE status for a synth (scan_findings-derived) Security tab row.

Background (#1426): the Security tab read path projects `scan_findings` into `CveHistoryEntry` rows whose `id` is a deterministic SHA-256 hash (see `synth_cve_id`). Those ids have no corresponding row in the `cve_history` table, so calls to `POST /cve/status/{id}` always 404 -- a dead acknowledge path. This route operates on the only stable identity a synth row carries, the (artifact_id, cve_id) pair, and writes the underlying `scan_findings` rows instead.  The wider design choice between (A) populating `cve_history` from the scanner loop and (B) treating `scan_findings` as the source of truth for the Security tab is settled here in favour of B: less code, less risk of data drift between two parallel tables, and `cve_history` remains in place for the rare curated/admin write path via the legacy `POST /cve/status/{id}` route.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**artifact_id** | **uuid::Uuid** | Artifact UUID | [required] |
**cve_id** | **String** | CVE identifier (e.g. CVE-2019-10744) | [required] |
**update_cve_status_request** | [**UpdateCveStatusRequest**](UpdateCveStatusRequest.md) |  | [required] |

### Return type

[**models::CveHistoryEntry**](CveHistoryEntry.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## upsert_license_policy

> models::LicensePolicyResponse upsert_license_policy(upsert_license_policy_request)
Create or update a license policy

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**upsert_license_policy_request** | [**UpsertLicensePolicyRequest**](UpsertLicensePolicyRequest.md) |  | [required] |

### Return type

[**models::LicensePolicyResponse**](LicensePolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

