From bc2c73fde8fd0b433c9facd784afb556846f5dee Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Fri, 3 May 2024 11:08:30 +0200 Subject: [PATCH] docs: add some examples, retrieving SBOMs and their information --- modules/fetch/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/fetch/README.md diff --git a/modules/fetch/README.md b/modules/fetch/README.md new file mode 100644 index 000000000..ebdfae2a8 --- /dev/null +++ b/modules/fetch/README.md @@ -0,0 +1,39 @@ +Find SBOMs: + +```bash +http GET localhost:8080/api/v1/sbom limit==5 offset==0 +``` + +Retrieve SBOM: + +```bash +http GET localhost:8080/sboms/1 +``` + +Get SBOM packages: + +```bash +http GET localhost:8080/api/v1/sbom/1/packages limit==5 offset==0 +``` + +Get SBOM top-level packages: + +```bash +http GET localhost:8080/api/v1/sbom/1/packages limit==5 offset==0 root==true +``` + +Get related packages: + +```bash +http GET localhost:8080/api/v1/sbom/1/related limit==5 offset==0 reference== +``` + +You can add `which==` to declare which side of the reference you want to search for. + +It also is possible to limit the search to a specific relationship type by providing `relationship==`. + +For example: + +```bash +http GET localhost:8080/api/v1/sbom/1/related limit==5 offset==0 reference==pkg://maven/com.redhat.quarkus.platform/quarkus-bom@2.13.8.Final-redhat-00004?repository_url=https://maven.repository.redhat.com/ga/&type=pom which==right +```