GoHarbor Scan API
The scan API from GoHarbor — 1 operation(s) for scan.
The scan API from GoHarbor — 1 operation(s) for scan.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/goharbor-scan-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Harbor Scan API
description: These APIs provide services for manipulating Harbor project.
version: '2.0'
servers:
- url: http://localhost/api/v2.0
- url: https://localhost/api/v2.0
security:
- basic: []
- {}
tags:
- name: Scan
paths:
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan:
post:
summary: Scan the artifact
description: Scan the specified artifact
tags:
- Scan
operationId: scanArtifact
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/projectName'
- $ref: '#/components/parameters/repositoryName'
- $ref: '#/components/parameters/reference'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
description: Artifact not found. No artifact with the specified reference exists in this repository.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: The artifact does not support scanning (for example, it is an image index with no directly scannable layers).
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'500':
$ref: '#/components/responses/500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScanType'
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/stop:
post:
summary: Cancelling a scan job for a particular artifact
tags:
- Scan
operationId: stopScanArtifact
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/projectName'
- $ref: '#/components/parameters/repositoryName'
- $ref: '#/components/parameters/reference'
responses:
'202':
$ref: '#/components/responses/202'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'422':
$ref: '#/components/responses/422'
'500':
$ref: '#/components/responses/500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ScanType'
description: 'The scan type: Vulnerabilities, SBOM'
required: true
/projects/{project_name}/repositories/{repository_name}/artifacts/{reference}/scan/{report_id}/log:
get:
summary: Get the log of the scan report
tags:
- Scan
operationId: getReportLog
parameters:
- $ref: '#/components/parameters/requestId'
- $ref: '#/components/parameters/projectName'
- $ref: '#/components/parameters/repositoryName'
- $ref: '#/components/parameters/reference'
- name: report_id
in: path
required: true
description: The report id to get the log
schema:
type: string
responses:
'200':
description: Successfully get scan log file
content:
text/plain:
schema:
type: string
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
components:
responses:
'400':
description: Bad request. The request body or query parameters are invalid. Inspect the `errors` array in the response body for details.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'500':
description: Internal server error. Inspect the `errors` array in the response body for details.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'202':
description: Accepted
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
'404':
description: Not found. The requested resource does not exist.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'401':
description: Unauthorized. Authentication is required to access this resource.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'403':
description: Forbidden. The caller does not have sufficient permission to perform the requested operation.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
'422':
description: Unprocessable entity. The request was well-formed but could not be processed (for example, due to validation errors). Inspect the `errors` array in the response body for details.
headers:
X-Request-Id:
description: The ID of the corresponding request for the response
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Errors'
parameters:
projectName:
name: project_name
in: path
description: The name of the project
required: true
schema:
type: string
requestId:
name: X-Request-Id
description: An unique ID for the request
in: header
required: false
schema:
type: string
minLength: 1
repositoryName:
name: repository_name
in: path
description: The name of the repository. If it contains slash, encode it twice over with URL encoding. e.g. a/b -> a%2Fb -> a%252Fb
required: true
schema:
type: string
reference:
name: reference
in: path
description: The reference of the artifact, can be digest or tag
required: true
schema:
type: string
schemas:
Errors:
description: The error array that describe the errors got during the handling of request
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
ScanType:
type: object
properties:
scan_type:
type: string
description: The scan type for the scan request. Two options are currently supported, vulnerability and sbom
enum:
- vulnerability
- sbom
Error:
description: a model for all the error response coming from harbor
type: object
properties:
code:
type: string
description: The error code
message:
type: string
description: The error message
example:
code: NOT_FOUND
message: artifact library/hello-world:latest not found
securitySchemes:
basic:
type: http
scheme: basic