Skip to content

Commit

Permalink
docs: add some examples, retrieving SBOMs and their information
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed May 6, 2024
1 parent 7a9d1c0 commit bc2c73f
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions modules/fetch/README.md
Original file line number Diff line number Diff line change
@@ -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==<purl>
```

You can add `which==<left|right>` 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==<relationship>`.

For example:

```bash
http GET localhost:8080/api/v1/sbom/1/related limit==5 offset==0 reference==pkg://maven/com.redhat.quarkus.platform/[email protected]?repository_url=https://maven.repository.redhat.com/ga/&type=pom which==right
```

0 comments on commit bc2c73f

Please sign in to comment.