# Introduction

### Overview

An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based "Data Center Designer" (DCD) tool or via an easy-to-use API.

With IONOS Cloud Database as a Service, you can quickly setup and manage a MongoDB database. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.

### Getting Started

#### Instalation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

**Maven users**

Add this dependency to your project's POM:

```xml
<dependency>
  <groupId>com.ionoscloud.dbaasmongo</groupId>
  <artifactId>ionos-cloud-sdk-dbaas-mongo</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>
```

**Gradle users**

Add this dependency to your project's build file:

```groovy
compile "com.ionoscloud.dbaasmongo:ionos-cloud-sdk-dbaas-mongo:1.0.0"
```

**Others**

At first generate the JAR by executing:

```shell
mvn clean package
```

Then manually install the following JARs:

* `target/ionos-cloud-sdk-dbaas-mongo-1.0.0.jar`
* `target/lib/*.jar`

#### Usage

```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.TemplatesApi;

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");

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

### FAQ

* How can I open a bug/feature request? Bugs & feature requests can be open on the repository issues: <https://github.com/ionos-cloud/ionos-cloud-sdk-dbaas-mongo/issues/new>
* Can I contribute to the DBaaS PostgreSQL Java SDK? Pur SDKs are automatically generated using OpenAPI Generator and don’t support manual changes. If you need changes please open an issue and we’ll try to take care of it.


---

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