# MetadataApi

## MetadataApi

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

| Method                                    | HTTP request            | Description          |
| ----------------------------------------- | ----------------------- | -------------------- |
| [**infosVersionGet**](#infosversionget)   | **GET** /infos/version  | Get API Version      |
| [**infosVersionsGet**](#infosversionsget) | **GET** /infos/versions | Get All API Versions |

## **infosVersionGet**

> APIVersion infosVersionGet()

Get API Version

Retrieves the current version of the responding API.

#### Example

```java
// Import classes:
import com.ionoscloud.dbaasmongo.ApiClient;
import com.ionoscloud.dbaasmongo.ApiException;
import com.ionoscloud.dbaasmongo.Configuration;
import com.ionoscloud.dbaasmongo.auth.*;
import com.ionoscloud.dbaasmongo.model.*;
import com.ionoscloud.dbaasmongo.api.MetadataApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basicAuth
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");


    MetadataApi apiInstance = new MetadataApi(defaultClient);
    try {
      APIVersion result = apiInstance.infosVersionGet();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MetadataApi#infosVersionGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

#### Parameters

This endpoint does not need any parameter.

#### Return type

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

#### HTTP request headers

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

## **infosVersionsGet**

> List\<APIVersion> infosVersionsGet()

Get All API Versions

Retrieves all available versions of the responding API.

#### Example

```java
// Import classes:
import com.ionoscloud.dbaasmongo.ApiClient;
import com.ionoscloud.dbaasmongo.ApiException;
import com.ionoscloud.dbaasmongo.Configuration;
import com.ionoscloud.dbaasmongo.auth.*;
import com.ionoscloud.dbaasmongo.model.*;
import com.ionoscloud.dbaasmongo.api.MetadataApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basicAuth
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");


    MetadataApi apiInstance = new MetadataApi(defaultClient);
    try {
      List<APIVersion> result = apiInstance.infosVersionsGet();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling MetadataApi#infosVersionsGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

⚠️ **Note**: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.

#### Parameters

This endpoint does not need any parameter.

#### Return type

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

#### 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-java/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.
