All URIs are relative to http://localhost/api/v2.0
Method | HTTP request | Description |
---|---|---|
systeminfo_get | GET /systeminfo | Get general system info |
systeminfo_getcert_get | GET /systeminfo/getcert | Get default root certificate. |
systeminfo_volumes_get | GET /systeminfo/volumes | Get system volume info (total/free size). |
GeneralInfo systeminfo_get
Get general system info
This API is for retrieving general system info, this can be called by anonymous request. Some attributes will be omitted in the response when this API is called by anonymous request.
# load the gem
require 'harbor_swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = SwaggerClient::SysteminfoApi.new
begin
#Get general system info
result = api_instance.systeminfo_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SysteminfoApi->systeminfo_get: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
File systeminfo_getcert_get
Get default root certificate.
This endpoint is for downloading a default root certificate.
# load the gem
require 'harbor_swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = SwaggerClient::SysteminfoApi.new
begin
#Get default root certificate.
result = api_instance.systeminfo_getcert_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SysteminfoApi->systeminfo_getcert_get: #{e}"
end
This endpoint does not need any parameter.
File
- Content-Type: application/json
- Accept: application/octet-stream
SystemInfo systeminfo_volumes_get
Get system volume info (total/free size).
This endpoint is for retrieving system volume info that only provides for admin user. Note that the response only reflects the storage status of local disk.
# load the gem
require 'harbor_swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure HTTP basic authorization: basic
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = SwaggerClient::SysteminfoApi.new
begin
#Get system volume info (total/free size).
result = api_instance.systeminfo_volumes_get
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SysteminfoApi->systeminfo_volumes_get: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json