How to download Packaging Reports for a release using Bitnami API
search cancel

How to download Packaging Reports for a release using Bitnami API

book

Article ID: 438607

calendar_today

Updated On:

Products

Bitnami Secure Images VMware Tanzu Application Catalog Bitnami Premium (Bitnami Secure Images)

Issue/Introduction

This KB outlines the seps to download a packaging report for a release using Bitnami API.

Resolution

Create temporary token for Bitnami Secure images API access.

 

1. Retrieve the Catalog ID

curl -s "https://api.app-catalog.vmware.com/v1/catalogs" \
 -H "Accept: application/json" \
 -H "Authorization: Bearer $BEARER_TOKEN" | jq -r '.items[].id'

2. Retrieve the App ID of the relevant package

curl -s "https://api.app-catalog.vmware.com/v1/catalogs/<Catalog ID>/applications" \
 -H "Accept: application/json" \
 -H "Authorization: Bearer $BEARER_TOKEN" | jq -r '.items[] | select(.product.name == "<Package Name") | .id'

3. Retrieve the Release ID of the relevant package.

curl -s "https://api.app-catalog.vmware.com/v1/catalogs/Catalog ID>/applications/<App ID>" \
 -H "Accept: application/json" \
 -H "Authorization: Bearer $BEARER_TOKEN" | jq -r '.latest_release.id'

4. Retrieve the Reports for the Release

curl -v "https://api.app-catalog.vmware.com/v1/catalogs/<Catalog ID>/releases/<Release ID>" \
 -H "Accept: application/json" \
 -H "Authorization: Bearer $BEARER_TOKEN" | jq -r '.platform_release_metadata[].release_metadata[] | select(.mime_type == "<Report Type>") | "https://catalog.api.vcloud.vmware.com" + .url'

5. Retrieve download URL for the report

curl -s "https://api.app-catalog.vmware.com/v1/catalogs/<Catalog ID>/files/<File ID>?filename=spdx.json" \
-H "Accept: application/json" \
 -H "Authorization: Bearer $BEARER_TOKEN" | jq .

6. Download the Report

curl -L -o "<Local File name>" "<File URL>"