Skip to content

Latest commit

 

History

History
163 lines (109 loc) · 3.97 KB

File metadata and controls

163 lines (109 loc) · 3.97 KB

Harbor1Client::SystemApi

All URIs are relative to http://localhost/api

Method HTTP request Description
system_cve_whitelist_get GET /system/CVEWhitelist Get the system level whitelist of CVE.
system_cve_whitelist_put PUT /system/CVEWhitelist Update the system level whitelist of CVE.
system_oidc_ping_post POST /system/oidc/ping Test the OIDC endpoint.

system_cve_whitelist_get

CVEWhitelist system_cve_whitelist_get

Get the system level whitelist of CVE.

Get the system level whitelist of CVE. This API can be called by all authenticated users.

Example

# load the gem
require 'harbor1_client'
# setup authorization
Harbor1Client.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Harbor1Client::SystemApi.new

begin
  #Get the system level whitelist of CVE.
  result = api_instance.system_cve_whitelist_get
  p result
rescue Harbor1Client::ApiError => e
  puts "Exception when calling SystemApi->system_cve_whitelist_get: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

CVEWhitelist

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

system_cve_whitelist_put

system_cve_whitelist_put(opts)

Update the system level whitelist of CVE.

This API overwrites the system level whitelist of CVE with the list in request body. Only system Admin has permission to call this API.

Example

# load the gem
require 'harbor1_client'
# setup authorization
Harbor1Client.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Harbor1Client::SystemApi.new

opts = { 
  whitelist: Harbor1Client::CVEWhitelist.new # CVEWhitelist | The whitelist with new content
}

begin
  #Update the system level whitelist of CVE.
  api_instance.system_cve_whitelist_put(opts)
rescue Harbor1Client::ApiError => e
  puts "Exception when calling SystemApi->system_cve_whitelist_put: #{e}"
end

Parameters

Name Type Description Notes
whitelist CVEWhitelist The whitelist with new content [optional]

Return type

nil (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

system_oidc_ping_post

system_oidc_ping_post(endpoint)

Test the OIDC endpoint.

Test the OIDC endpoint, the setting of the endpoint is provided in the request. This API can only be called by system admin.

Example

# load the gem
require 'harbor1_client'
# setup authorization
Harbor1Client.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = Harbor1Client::SystemApi.new

endpoint = Harbor1Client::Endpoint.new # Endpoint | Request body for OIDC endpoint to be tested.


begin
  #Test the OIDC endpoint.
  api_instance.system_oidc_ping_post(endpoint)
rescue Harbor1Client::ApiError => e
  puts "Exception when calling SystemApi->system_oidc_ping_post: #{e}"
end

Parameters

Name Type Description Notes
endpoint Endpoint Request body for OIDC endpoint to be tested.

Return type

nil (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain