convert_prometheus

Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.

If the group already exists and was not imported from a Prometheus-compatible source initially, it will not be replaced and an error will be returned.

post/convert/prometheus/config/v1/rules/{NamespaceTitle}

Request

  • Base URL
    /api (relative, and the document’s source URL is not known)
  • URL
    /api/convert/prometheus/config/v1/rules/{NamespaceTitle}
  • Auth
    • HTTP basic
    • or API key in header Authorization

Path parameters

NamespaceTitlestring required

Headers

x-grafana-alerting-datasource-uidstring
x-grafana-alerting-recording-rules-pausedboolean
x-grafana-alerting-alert-rules-pausedboolean
x-grafana-alerting-target-datasource-uidstring
x-grafana-alerting-folder-uidstring
x-grafana-alerting-notification-settingsstring

Request body application/yaml

intervalinteger

A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.

labelsobject
limitinteger
namestring
query_offsetstring

Response

ConvertPrometheusResponse

errorstring
errorTypestring
statusstring

Changes

No recorded changes to this operation across all 1 revision of this API.