Retrieves the current version of the responding API.
Examples
require'time'require'ionoscloud-dbaas-mongo'# setup authorizationIonoscloudDbaasMongo.configuredo|config|# Configure HTTP basic authorization: basicAuth config.username='YOUR USERNAME' config.password='YOUR PASSWORD'# Configure API key authorization: tokenAuth config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =IonoscloudDbaasMongo::MetadataApi.newbegin# Get API Version result = api_instance.infos_version_getp resultrescueIonoscloudDbaasMongo::ApiError=> eputs"Error when calling MetadataApi->infos_version_get: #{e}"end
Using the infos_version_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin
# Get API Version
data, status_code, headers = api_instance.infos_version_get_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <APIVersion>
rescue IonoscloudDbaasMongo::ApiError => e
puts "Error when calling MetadataApi->infos_version_get_with_http_info: #{e}"
end
Retrieves all available versions of the responding API.
Examples
require 'time'
require 'ionoscloud-dbaas-mongo'
# setup authorization
IonoscloudDbaasMongo.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: tokenAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = IonoscloudDbaasMongo::MetadataApi.new
begin
# Get All API Versions
result = api_instance.infos_versions_get
p result
rescue IonoscloudDbaasMongo::ApiError => e
puts "Error when calling MetadataApi->infos_versions_get: #{e}"
end
Using the infos_versions_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin
# Get All API Versions
data, status_code, headers = api_instance.infos_versions_get_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<APIVersion>>
rescue IonoscloudDbaasMongo::ApiError => e
puts "Error when calling MetadataApi->infos_versions_get_with_http_info: #{e}"
end