artifact-keeper-client 1.2.1

Rust client for the Artifact Keeper REST API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# \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)