# API How-Tos

The Monitoring Service offers regional APIs that enable programmatic interaction with the platform. These APIs serve various purposes: task automation, system integration, and platform functionality extension. Additionally, the APIs allow you to filter metrics based on different criteria.

## Sub-user access control

A sub-user is a user who has access to the Monitoring Service but is not an administrator or an owner. IONOS Cloud's crucial access control restriction does not allow sub-users to view or modify pipelines belonging to other sub-user accounts, except the primary administrator, who retains full cross-pipeline privileges. Ensure that the sub-user pipeline ownership and access permissions align with your organizational needs.

If a sub-user account creates a pipeline, access is restricted only to that sub-user and the primary administrator. Other sub-users cannot access or perform CRUD operations on the respective pipeline. For example, if sub-user A creates Pipeline 1, only sub-user A and the primary administrator account can view, edit, delete, or manage Pipeline 1. No other sub-user accounts will have access to it.

{% hint style="warning" %}
**Warning:** User privileges set using the IONOS Cloud API or the DCD apply to pipeline access only, not to Grafana access.
{% endhint %}

## Endpoints

A regional endpoint is necessary to interact with the Monitoring Service REST API endpoints. Currently, IONOS Cloud supports only the following regions for the Monitoring Service:

* Berlin: `https://monitoring.de-txl.ionos.com/pipelines`
* Frankfurt: `https://monitoring.de-fra.ionos.com/pipelines`
* London: `https://monitoring.gb-lhr.ionos.com/pipelines`
* Worcester: `https://monitoring.gb-bhx.ionos.com/pipelines`
* Paris: `https://monitoring.fr-par.ionos.com/pipelines`
* Logroño: `https://monitoring.es-vit.ionos.com/pipelines`
* Lenexa: `https://monitoring.us-mci.ionos.com/pipelines`
* Las Vegas: `https://monitoring.us-las.ionos.com/pipelines`
* Newark: `https://monitoring.us-ewr.ionos.com/pipelines`

{% hint style="info" %}
**Note:** We recommend using the authorized IP addresses associated with each endpoint if you need to configure firewall rules to restrict traffic sent to the Monitoring Service endpoints. It enables you to configure rules accordingly to ensure traffic is redirected only through authorized IP addresses for each endpoint. For more information about the authorized IP addresses, see [<mark style="color:blue;">FAQs</mark>](https://docs.ionos.com/sections-test/guides/observability/monitoring-service-faqs#can-i-restrict-the-traffic-sent-to-monitoring-service-endpoints).
{% endhint %}

## Request parameter headers

To interact with the Monitoring Service REST API endpoints, the header must contain the following values:

| Header            | Required |  Type  | Description                                                                                                                                                                                                                                    |
| ----------------- | :------: | :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Authorization** |    yes   | string | A `Bearer $TOKEN` is a string that is tied to your account. For information on generating tokens, see [<mark style="color:blue;">Create New Tokens</mark>](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate). |
| **Content-Type**  |    yes   | string | Set this to `application/json`.                                                                                                                                                                                                                |

## Quick Links

Here are some of the most common API How-Tos for the Monitoring Service:

<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>Create a Monitoring Pipeline Instance</strong></mark></td><td>Create an instance of a monitoring pipeline.</td><td><a href="api-how-tos/create-monitoring-pipeline">create-monitoring-pipeline</a></td></tr><tr><td><mark style="color:blue;"><strong>Obtain a new Key</strong></mark></td><td>Obtain a new key for a monitoring pipeline.</td><td><a href="api-how-tos/obtain-key">obtain-key</a></td></tr><tr><td><mark style="color:blue;"><strong>Modify a Monitoring Pipeline Instance</strong></mark></td><td>Update an existing monitoring pipeline.</td><td><a href="api-how-tos/modify-monitoring-pipeline">modify-monitoring-pipeline</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve a Monitoring Pipeline</strong></mark></td><td>Retrieve information about a specific monitoring pipeline.</td><td><a href="api-how-tos/retrieve-monitoring-pipeline">retrieve-monitoring-pipeline</a></td></tr><tr><td><mark style="color:blue;"><strong>Retrieve All Monitoring Pipelines</strong></mark></td><td>Retrieve all monitoring pipelines.</td><td><a href="api-how-tos/retrieve-all-monitoring-pipelines">retrieve-all-monitoring-pipelines</a></td></tr><tr><td><mark style="color:blue;"><strong>Delete a Monitoring Pipeline Instance</strong></mark></td><td>Delete a specific monitoring pipeline.</td><td><a href="api-how-tos/delete-monitoring-pipeline">delete-monitoring-pipeline</a></td></tr></tbody></table>

We recommend you refer to the following after creating an instance via the API:

<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>Send Metrics to the Platform</strong></mark></td><td>Learn how to send metrics to the platform for monitoring and analysis.</td><td><a href="quick-start/send-metrics-to-platform">send-metrics-to-platform</a></td></tr><tr><td><mark style="color:blue;"><strong>Access Metrics from the Platform</strong></mark></td><td>Understand how to access and retrieve metrics from the platform.</td><td><a href="quick-start/access-metrics-from-platform">access-metrics-from-platform</a></td></tr></tbody></table>
