You receive an empty response when trying to get the scan report on REST API inVMware Tanzu Kubernetes Grid Integrated Edition (TKGI)
search cancel

You receive an empty response when trying to get the scan report on REST API inVMware Tanzu Kubernetes Grid Integrated Edition (TKGI)

book

Article ID: 298718

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

According to API Explorer of VMware Habor Registry 1.10.x, you may see the following API path to get the scan report:
 
 GET   /repositories/{repo_name}/tags/{tag}/scan        Get the scan report

Based on this API path, you may get an empty response even if there are actual vulnerability reports with the target repository when you try to get the scan report from API Explorer or by the command line as below:
$ curl -k -u admin:passowrd -X GET "https://harbor.mydomain.com/api/repositories/testrepo%2testapp/tags/latest/scan" -H "accept: application/json"


Environment

Product Version: Other

Resolution

You can get the scan report by removing "/scan" at the end of API path with the following command line:
$ curl -k -u admin:passowrd -X GET "https://harbor.mydomain.com/api/repositories/testrepo%2testapp/tags/latest" -H "accept: application/json"