# MetadataApi

All URIs are relative to *<https://api.ionos.com/databases/mongodb>*

| Method                                          | HTTP request            | Description          |
| ----------------------------------------------- | ----------------------- | -------------------- |
| [**infos\_version\_get**](#infos_version_get)   | **GET** /infos/version  | Get API Version      |
| [**infos\_versions\_get**](#infos_versions_get) | **GET** /infos/versions | Get All API Versions |

## infos\_version\_get

> infos\_version\_get

Get API Version

Retrieves the current version of the responding API.

### Examples

```ruby
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 API Version
  result = api_instance.infos_version_get
  p result
rescue IonoscloudDbaasMongo::ApiError => e
  puts "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.

> \<Array(, Integer, Hash)> infos\_version\_get\_with\_http\_info

```ruby
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
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**APIVersion**](/mongodb-sdk-ruby/models/apiversion.md)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## infos\_versions\_get

> \<Array> infos\_versions\_get

Get All API Versions

Retrieves all available versions of the responding API.

### Examples

```ruby
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.

> \<Array(\<Array>, Integer, Hash)> infos\_versions\_get\_with\_http\_info

```ruby
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
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**Array\<APIVersion>**](/mongodb-sdk-ruby/models/apiversion.md)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/mongodb-sdk-ruby/api/metadataapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
