# API How-Tos

This section provides detailed guides and examples on how to interact with the MariaDB REST API. Each guide covers specific tasks such as creating, managing, and deleting MariaDB clusters, as well as handling backups and connecting from Kubernetes.

## Quick Links

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><mark style="color:blue;"><strong>Prerequisites</strong></mark></td><td>A list of prerequisites to assure success with MariaDB creation.</td><td><a href="api-howtos/prerequisites">prerequisites</a></td></tr><tr><td><mark style="color:blue;"><strong>Create a MariaDB Cluster</strong></mark></td><td>Learn to create a MariaDB cluster.</td><td><a href="api-howtos/create-mariadb-cluster">create-mariadb-cluster</a></td></tr><tr><td><mark style="color:blue;"><strong>Verify the status of a MariaDB Cluster</strong></mark></td><td>Learn to verify the status of a MariaDB cluster.</td><td><a href="api-howtos/verify-mariadb-cluster-status">verify-mariadb-cluster-status</a></td></tr><tr><td><mark style="color:blue;"><strong>Connect from Kubernetes</strong></mark></td><td>Learn how to connect to MariaDB from your managed Kubernetes cluster.</td><td><a href="api-howtos/connect-mariadb-kubernetes">connect-mariadb-kubernetes</a></td></tr><tr><td><mark style="color:blue;"><strong>List MariaDB Clusters</strong></mark></td><td>Learn how to list the MariaDB clusters.</td><td><a href="api-howtos/list-mariadb-clusters">list-mariadb-clusters</a></td></tr><tr><td><mark style="color:blue;"><strong>Fetch a MariaDB Cluster</strong></mark></td><td>Learn how to fetch a specific MariaDB cluster.</td><td><a href="api-howtos/fetch-mariadb-cluster">fetch-mariadb-cluster</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete a MariaDB Cluster</strong></mark></td><td>Learn how to delete a specific MariaDB cluster.</td><td><a href="api-howtos/delete-mariadb-cluster">delete-mariadb-cluster</a></td></tr><tr><td><mark style="color:blue;"><strong>List MariaDB Cluster Backups</strong></mark></td><td>Learn how to retrieve a list of backups for all MariaDB clusters.</td><td><a href="api-howtos/list-mariadb-cluster-backups">list-mariadb-cluster-backups</a></td></tr><tr><td><mark style="color:blue;"><strong>Fetch a specific Backup of a MariaDB Cluster</strong></mark></td><td>Learn how to retrieve a specific backup of a MariaDB cluster.</td><td><a href="api-howtos/fetch-mariadb-cluster-backup">fetch-mariadb-cluster-backup</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve all Backups of a MariaDB Cluster</strong></mark></td><td>Learn how to retrieve all backups of a specific MariaDB cluster.</td><td><a href="api-howtos/retrieve-backups-mariadb-cluster">retrieve-backups-mariadb-cluster</a></td></tr><tr><td><mark style="color:blue;"><strong>Create a MariaDB Cluster from a Backup</strong></mark></td><td>Learn how to create a MariaDB cluster from an existing backup.</td><td><a href="api-howtos/create-mariadb-cluster-from-backup">create-mariadb-cluster-from-backup</a></td></tr><tr><td><mark style="color:blue;"><strong>Restore a MariaDB Cluster from a Backup</strong></mark></td><td>Learn how to restore a MariaDB cluster from a backup.</td><td><a href="api-howtos/restore-mariadb-cluster-from-backup">restore-mariadb-cluster-from-backup</a></td></tr></tbody></table>

## Endpoints

A regional endpoint is necessary to interact with the MariaDB REST API endpoints. For more information, see the [<mark style="color:blue;">API specification file</mark>](https://api.ionos.com/docs/mariadb/v1/).

IONOS Cloud supports the following endpoints for various locations:

* Berlin, Germany: `https://mariadb.de-txl.ionos.com/clusters`.
* Frankfurt, Germany: `https://mariadb.de-fra.ionos.com/clusters`
* Logroño, Spain: `https://mariadb.es-vit.ionos.com/clusters`
* London, United Kingdom: `https://mariadb.gb-lhr.ionos.com/clusters`
* Worcester, United Kingdom: `https://mariadb.gb-bhx.ionos.com/clusters`
* Newark, United States: `https://mariadb.us-ewr.ionos.com/clusters`
* Las Vegas, United States: `https://mariadb.us-las.ionos.com/clusters`
* Lenexa, United States: `https://mariadb.us-mci.ionos.com/clusters`
* Paris, France: `https://mariadb.fr-par.ionos.com/clusters`

## Request parameter headers

To make authenticated requests to the API, the following fields are mandatory in the request headers:

| Header                | Required |   Type  | Description                                                                                                                       |
| --------------------- | :------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------- |
| **Authorization**     |    yes   |  string | HTTP Basic authorization. A base64 encoded string of a username and password separated by a colon. `username@domain.tld:password` |
| **X-Contract-Number** |    no    | integer | Users with more than one contract may apply this header to indicate the applicable contract.                                      |
| **Content-Type**      |    yes   |  string | Set this to `application/json`.                                                                                                   |

## Examples

The documentation contains `curl` examples, as the tool is available on Windows 10, Linux, and macOS. You can also refer to the following blog posts on the IONOS Cloud website that describe how to execute `curl` in [<mark style="color:blue;">Linux</mark>](https://www.ionos.com/digitalguide/server/tools/introduction-to-curl-in-linux) and [<mark style="color:blue;">Windows</mark>](https://www.ionos.com/digitalguide/server/tools/introduction-to-curl-in-windows) systems if you encounter any problems.
