Skip to content

Commit

Permalink
update example requests
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe committed Sep 4, 2024
1 parent 13f0156 commit 49a131e
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 14 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ This requires building the jar file first.
See `compose-up.sh` for the required steps to bring up a local environment.

After about a minute you should be able to perform an HTTP GET request on http://localhost:8080/readiness and get a response with status code 200.

## Example Requests

Find example requests to play with the API in the `api-examples` folder.
They are created with [Bruno](https://www.usebruno.com), an open source and easy to use HTTP client.
2 changes: 1 addition & 1 deletion api-examples/Get CVEs by Distro Codename Packages.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: http://localhost:8080/v1/cves/debian_linux/bookworm/packages/vim,firefox-esr
url: http://localhost:8080/v1/cves/gardenlinux/1592/packages/vim,bash,python3,curl
body: none
auth: none
}
2 changes: 1 addition & 1 deletion api-examples/Get CVEs by Distro Codename.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: http://localhost:8080/v1/cves/debian_linux/bookworm
url: http://localhost:8080/v1/cves/gardenlinux/1592
body: none
auth: none
}
2 changes: 1 addition & 1 deletion api-examples/Get CVEs by Distro Version Packages.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta {
}

get {
url: http://localhost:8080/v1/cves/debian_linux/version/12/packages/vim,firefox-esr
url: http://localhost:8080/v1/cves/gardenlinux/version/1592.0/packages/vim,bash,python3,curl
body: none
auth: none
}
11 changes: 0 additions & 11 deletions api-examples/Get Packages.bru

This file was deleted.

11 changes: 11 additions & 0 deletions api-examples/Get Vulnerabilities by Package by Version.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: Get Vulnerabilities by Package by Version
type: http
seq: 7
}

get {
url: http://localhost:8080/v1/packages/vim/2:9.1.0496-1+b1
body: none
auth: none
}
11 changes: 11 additions & 0 deletions api-examples/Get Vulnerabilities by Package.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: Get Vulnerabilities by Package
type: http
seq: 6
}

get {
url: http://localhost:8080/v1/packages/vim
body: none
auth: none
}
11 changes: 11 additions & 0 deletions api-examples/List Packages in Distro.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
meta {
name: List Packages in Distro
type: http
seq: 8
}

get {
url: http://localhost:8080/v1/packages/distro/gardenlinux/1592
body: none
auth: none
}

0 comments on commit 49a131e

Please sign in to comment.