Prometheus API (0.2.2)

Download OpenAPI specification:Download

This project enhances the native Prometheus HTTP API by providing additional features and addressing its limitations. Running as a sidecar alongside the Prometheus server enables users to extend the capabilities of the API.

metrics

Metrics

Endpoint that serves Prometheus metrics.

Responses

Response samples

Content type
application/json
null

rules

Create Rule

Creates a new rule with a randomly generated filename

Request Body schema: application/json
file
string (File)
Default: ""
data
object (Data)
Default: {}

Responses

Request samples

Content type
application/json
Example

Creates Prometheus recording rule with the name ExampleRecordingRule

{
  • "data": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

Create Rule

Creates a new rule file with the provided filename

path Parameters
file
required
string (File)
query Parameters
recreate
string (Recreate)
Default: "false"
Request Body schema: application/json
file
string (File)
Default: ""
data
object (Data)
Default: {}

Responses

Request samples

Content type
application/json
Example

Creates Prometheus recording rule with the name ExampleRecordingRule

{
  • "data": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

Delete Rule

Deletes a rule that matches to the provided parameter

path Parameters
file
required
any (File)

Responses

Response samples

Content type
application/json
[
  • {
    }
]