> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/observability/monitoring-service/api-how-tos/modify-monitoring-pipeline.md).

# Modify a Monitoring Pipeline Instance

Ensures that the pipeline with the provided ID is created or modified. The full pipeline needs to be provided to ensure (either update or create) the pipeline. Non present data will only be filled with defaults or left empty, but not take previous values into consideration.

To ensure that the pipeline with the provided ID is created or modified, perform `PUT` request.

## Request

The following is a sample request. Remember to replace the `{pipelineID}` with a valid ID of the specific pipeline you want to create or update.

```bash
curl --location \
--request PUT 'https://monitoring.de-txl.ionos.com/pipelines/{pipelineID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $TOKEN' \
--data-raw '{
  "metadata": {},
  "properties": {
    "name": "Pipeline1"
  }
}'
```

{% tabs %}
{% tab title="Path Parameters" %}
Below is the list of mandatory path parameters for updating a Monitoring Pipeline:

| **Path Parameters** | **Type** | **Description**                | **Example**                            |
| ------------------- | -------- | ------------------------------ | -------------------------------------- |
| `pipelineId`        | string   | The ID (UUID) of the Pipeline. | `f72521ba-1590-5998-bf96-6eb997a5887d` |
| {% endtab %}        |          |                                |                                        |

{% tab title="Request Body Parameters" %}
Below is the list of mandatory body parameters for updating a Monitoring Pipeline:

| **Body Parameters** | **Required** | **Type** | **Description**                                                                                | **Example**                      |
| ------------------- | ------------ | -------- | ---------------------------------------------------------------------------------------------- | -------------------------------- |
| `metadata`          | no           | object   | Metadata                                                                                       | `{}`                             |
| `properties`        | yes          | object   | A pipeline consists of the generic rules and configurations of a monitoring pipeline instance. | `{ "name": "Updated Pipeline" }` |
| {% endtab %}        |              |          |                                                                                                |                                  |

{% tab title="Request Header Parameters" %}
To make authenticated requests to the API, the following fields are mandatory in the request header:

| **Header Parameters** | **Required** | **Type** | **Description**                                                                                                                          |
| --------------------- | ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Authorization`       | yes          | string   | The Bearer token enables requests to authenticate using a JSON Web Token (JWT). The token can be generated using the Authentication API. |
| `Content-Type`        | yes          | string   | Set this to `application/json`.                                                                                                          |
| {% endtab %}          |              |          |                                                                                                                                          |
| {% endtabs %}         |              |          |                                                                                                                                          |

## Response

The following is a sample response. The values returned by each response differ based on the request.

**200 Successful operation**

```json
{
  "id": "f72521ba-1590-5998-bf96-6eb997a5887d",
  "type": "pipeline",
  "href": "/pipelines/f72521ba-1590-5998-bf96-6eb997a5887d",
  "metadata": {
    "createdDate": "2020-12-10T13:37:50+01:00",
    "createdBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "createdByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedDate": "2020-12-11T13:37:50+01:00",
    "lastModifiedBy": "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "lastModifiedByUserId": "87f9a82e-b28d-49ed-9d04-fba2c0459cd3",
    "resourceURN": "ionos:<product>:<location>:<contract>:<resource-path>",
    "status": "AVAILABLE",
    "statusMessage": null,
    "key": "momSrlgabcdef1234",
    "grafanaEndpoint": "https://grafana.logging.de-txl.ionos.com",
    "httpEndpoint": "https://f8ss7fgr7s-metrics.jf9ejf8t6hrt.monitoring.de-txl.ionos.com"
  },
  "properties": {
    "name": "Pipeline1"
  }
}
```

{% hint style="success" %}
**Result:** The Monitoring Pipeline is successfully updated or created.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/observability/monitoring-service/api-how-tos/modify-monitoring-pipeline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
