# Metric Data Sources

## GET /metric-data-sources

> Get Metric Data Sources

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.5-r.3"},"tags":[{"name":"Metric Data Sources"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"MetricDataSource":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}},"MetricDataSourceType":{"type":"string","enum":["DATADOG","PROMETHEUS"]},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"MetricDataSourceMetadata":{"type":"object","oneOf":[{"$ref":"#/components/schemas/MParamsDatadog"},{"$ref":"#/components/schemas/MParamsPrometheus"}]},"MParamsDatadog":{"required":["apiKey","applicationKey","region"],"type":"object","properties":{"region":{"type":"string"},"apiKey":{"type":"string"},"applicationKey":{"type":"string"}}},"MParamsPrometheus":{"required":["authType","url"],"type":"object","properties":{"url":{"type":"string"},"authType":{"type":"string","enum":["NONE","BASIC","HEADER"]},"basicUser":{"type":"string","description":"Optional, required for 'BASIC'"},"basicPass":{"type":"string","description":"Optional, required for 'BASIC'"},"headerKey":{"type":"string","description":"Optional, required for 'HEADER'"},"headerValue":{"type":"string","description":"Optional, required for 'HEADER'"}}}}},"paths":{"/metric-data-sources":{"get":{"tags":["Metric Data Sources"],"summary":"Get Metric Data Sources","parameters":[{"name":"start-index","in":"query","description":"an integer specifying the starting point (beginning with 0) when paging through a list of entities","schema":{"type":"integer","format":"int32","default":0}},{"name":"max-results","in":"query","description":"the maximum number of results when paging through a list of metric data sources","schema":{"maximum":100,"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"The Metric Data Sources","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetricDataSource"}}}}}}}}}}
```

## POST /metric-data-sources

> Create a new Metric Data Source.

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.5-r.3"},"tags":[{"name":"Metric Data Sources"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"MetricDataSourcePost":{"required":["metadata","name","type"],"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}},"MetricDataSourceType":{"type":"string","enum":["DATADOG","PROMETHEUS"]},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"MetricDataSourceMetadata":{"type":"object","oneOf":[{"$ref":"#/components/schemas/MParamsDatadog"},{"$ref":"#/components/schemas/MParamsPrometheus"}]},"MParamsDatadog":{"required":["apiKey","applicationKey","region"],"type":"object","properties":{"region":{"type":"string"},"apiKey":{"type":"string"},"applicationKey":{"type":"string"}}},"MParamsPrometheus":{"required":["authType","url"],"type":"object","properties":{"url":{"type":"string"},"authType":{"type":"string","enum":["NONE","BASIC","HEADER"]},"basicUser":{"type":"string","description":"Optional, required for 'BASIC'"},"basicPass":{"type":"string","description":"Optional, required for 'BASIC'"},"headerKey":{"type":"string","description":"Optional, required for 'HEADER'"},"headerValue":{"type":"string","description":"Optional, required for 'HEADER'"}}},"MetricDataSource":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}}}},"paths":{"/metric-data-sources":{"post":{"tags":["Metric Data Sources"],"summary":"Create a new Metric Data Source.","requestBody":{"description":"The metric data source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDataSourcePost"}}},"required":true},"responses":{"200":{"description":"The newly created Metric Data Source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDataSource"}}}}}}}}}
```

## GET /metric-data-sources/{id}

> Get a specific Metric Data Source

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.5-r.3"},"tags":[{"name":"Metric Data Sources"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"MetricDataSource":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}},"MetricDataSourceType":{"type":"string","enum":["DATADOG","PROMETHEUS"]},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"MetricDataSourceMetadata":{"type":"object","oneOf":[{"$ref":"#/components/schemas/MParamsDatadog"},{"$ref":"#/components/schemas/MParamsPrometheus"}]},"MParamsDatadog":{"required":["apiKey","applicationKey","region"],"type":"object","properties":{"region":{"type":"string"},"apiKey":{"type":"string"},"applicationKey":{"type":"string"}}},"MParamsPrometheus":{"required":["authType","url"],"type":"object","properties":{"url":{"type":"string"},"authType":{"type":"string","enum":["NONE","BASIC","HEADER"]},"basicUser":{"type":"string","description":"Optional, required for 'BASIC'"},"basicPass":{"type":"string","description":"Optional, required for 'BASIC'"},"headerKey":{"type":"string","description":"Optional, required for 'HEADER'"},"headerValue":{"type":"string","description":"Optional, required for 'HEADER'"}}}}},"paths":{"/metric-data-sources/{id}":{"get":{"tags":["Metric Data Sources"],"summary":"Get a specific Metric Data Source","parameters":[{"name":"id","in":"path","description":"entity ID","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"The requested Metric Data Source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDataSource"}}}}}}}}}
```

## PUT /metric-data-sources/{id}

> Update the specific Metric Data Source

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.5-r.3"},"tags":[{"name":"Metric Data Sources"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}},"schemas":{"MetricDataSourcePost":{"required":["metadata","name","type"],"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}},"MetricDataSourceType":{"type":"string","enum":["DATADOG","PROMETHEUS"]},"TeamRel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"MetricDataSourceMetadata":{"type":"object","oneOf":[{"$ref":"#/components/schemas/MParamsDatadog"},{"$ref":"#/components/schemas/MParamsPrometheus"}]},"MParamsDatadog":{"required":["apiKey","applicationKey","region"],"type":"object","properties":{"region":{"type":"string"},"apiKey":{"type":"string"},"applicationKey":{"type":"string"}}},"MParamsPrometheus":{"required":["authType","url"],"type":"object","properties":{"url":{"type":"string"},"authType":{"type":"string","enum":["NONE","BASIC","HEADER"]},"basicUser":{"type":"string","description":"Optional, required for 'BASIC'"},"basicPass":{"type":"string","description":"Optional, required for 'BASIC'"},"headerKey":{"type":"string","description":"Optional, required for 'HEADER'"},"headerValue":{"type":"string","description":"Optional, required for 'HEADER'"}}},"MetricDataSource":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/MetricDataSourceType"},"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamRel"}},"metadata":{"$ref":"#/components/schemas/MetricDataSourceMetadata"}}}}},"paths":{"/metric-data-sources/{id}":{"put":{"tags":["Metric Data Sources"],"summary":"Update the specific Metric Data Source","parameters":[{"name":"id","in":"path","description":"entity ID","required":true,"schema":{"type":"number"}}],"requestBody":{"description":"The metric data source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDataSourcePost"}}},"required":true},"responses":{"200":{"description":"The updated Metric Data Source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDataSource"}}}}}}}}}
```

## DELETE /metric-data-sources/{id}

> Delete a specific Metric Data Source

```json
{"openapi":"3.0.1","info":{"title":"ilert REST API","version":"v2.2026.5-r.3"},"tags":[{"name":"Metric Data Sources"}],"servers":[{"url":"/api"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","description":"The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.","name":"Authorization","in":"header"}}},"paths":{"/metric-data-sources/{id}":{"delete":{"tags":["Metric Data Sources"],"summary":"Delete a specific Metric Data Source","parameters":[{"name":"id","in":"path","description":"entity ID","required":true,"schema":{"type":"number"}}],"responses":{"204":{"description":"Empty body delete response","content":{}}}}}}}
```


---

# 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.ilert.com/developer-docs/rest-api/api-reference/metric-data-sources.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.
