Skip to content

Commit

Permalink
Add API REST calls
Browse files Browse the repository at this point in the history
  • Loading branch information
0GiS0 committed Oct 12, 2023
1 parent 42ac401 commit 35a1931
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
31 changes: 26 additions & 5 deletions steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,39 @@ snyk auth
git clone https://github.com/0GiS0/tour-of-heroes-angular.git && cd tour-of-heroes-angular
npm install

spdx-sbom-generator --format JSON
cdxgen -o bom.json


# Trying API REST
curl https://reimagined-xylophone-vp9qqwj64fx67w-8080.app.github.dev/api/version -w '%{response_code}'

curl -X "PUT" "https://reimagined-xylophone-vp9qqwj64fx67w-8080.app.github.dev/api/v1/bom" \
-H 'Content-Type: multipart/form-data' \
-H 'X-Api-Key: BgCIvb2ZuIEiuaZBiOZ5JhmQdD8I4Iop' \
-F 'project=00ca1b30-3746-4da1-abae-f0b45a6d9906' \
-F '[email protected]' \
-w '%{response_code}'

curl -X "POST" "https://reimagined-xylophone-vp9qqwj64fx67w-8080.app.github.dev/api/v1/bom" \
-H 'Content-Type: multipart/form-data' \
-H "X-Api-Key: BgCIvb2ZuIEiuaZBiOZ5JhmQdD8I4Iop" \
-F "autoCreate=true" \
-F "projectName=tour-of-heroes-test" \
-F "projectVersion=1.0.0" \
-F "[email protected]" \
-w '%{response_code}'


# snyk sbom --format cyclonedx1.4+json # Doesnt work

git clone https://github.com/0GiS0/tour-of-heroes-dotnet-api.git && cd tour-of-heroes-dotnet-api
dotnet build

spdx-sbom-generator
spdx-sbom-generator --format json

curl -X "POST" "https://ominous-spork-p74pp9x7pf7xq9-8081.app.github.dev/api/v1/bom" \
curl -X "PUT" "https://reimagined-xylophone-vp9qqwj64fx67w-8081.app.github.dev/api/v1/bom" \
-H 'Content-Type: multipart/form-data' \
-H 'X-API-Key: 5TWxIUEnxBV9YSXrEHb3I1URmWjN90Na' \
-F 'project=00ca1b30-3746-4da1-abae-f0b45a6d9906' \
-H 'X-Api-Key: BgCIvb2ZuIEiuaZBiOZ5JhmQdD8I4Iop' \
-F 'project=81d1c70e-5527-4d1d-bdd0-15d6120badcb' \
-F '[email protected]' \
-w '%{response_code}'
1 change: 1 addition & 0 deletions tour-of-heroes-angular
Submodule tour-of-heroes-angular added at 58aa38
1 change: 1 addition & 0 deletions tour-of-heroes-dotnet-api
Submodule tour-of-heroes-dotnet-api added at 9b8a5e

0 comments on commit 35a1931

Please sign in to comment.