openapi: 3.0.3
info:
  title: Prometheus API for SLO time series
  description:
    $ref: "./md-partials/prometheus-api-intro.mdx"
  version: 1.0.0

servers:
  - url: https://app.nobl9.com/api/prometheus/v1/api/v1
  - url: https://us1.nobl9.com/api/prometheus/v1/api/v1

tags:
  - name: SLO time series
    description: Query Nobl9 SLO time series and related metadata.

security:
  - basicAuth: []
  - bearerAuth: []

paths:
  /query:
    get:
      tags:
        - SLO time series
      summary: Execute an instant query
      description:
        $ref: "./md-partials/query-description.mdx"
      operationId: queryGet
      parameters:
        - name: query
          in: query
          required: true
          description: Prometheus expression query string
          schema:
            type: string
          example: reliability{project="default"}
        - name: time
          in: query
          required: false
          description: Evaluation timestamp (RFC3339 or Unix timestamp)
          schema:
            type: string
            format: date-time
          example: "2024-01-15T10:30:00Z"
        - name: timeout
          in: query
          required: false
          description: |
            Evaluation timeout duration. The default `0s` means no explicit timeout is sent and
            the server applies its own default.
          schema:
            type: string
            pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
            default: "0s"
          example: "30s"
        - name: lookback_delta
          in: query
          required: false
          description: |
            Maximum lookback for instant selectors (duration). Overrides the default per-series
            staleness detection: a larger value keeps sparse or slow series visible longer, while a
            smaller value enforces stricter freshness. When omitted, staleness is auto-detected per
            series.
          schema:
            type: string
            pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
          example: "10m"
      responses:
        "200":
          description: Successful query execution
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QueryResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "422":
          description: |
            Unprocessable entity — the backend could not execute the query. Try adjusting the
            query, time range, or step and retry. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

    post:
      tags:
        - SLO time series
      summary: Execute an instant query
      description:
        $ref: "./md-partials/query-description.mdx"
      operationId: queryPost
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: Prometheus expression query string
                  example: reliability{project="default"}
                time:
                  type: string
                  format: date-time
                  description: Evaluation timestamp (RFC3339 or Unix timestamp)
                  example: "2024-01-15T10:30:00Z"
                timeout:
                  type: string
                  pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
                  description: |
                    Evaluation timeout duration. The default `0s` means no explicit timeout is sent and
                    the server applies its own default.
                  default: "0s"
                  example: "30s"
                lookback_delta:
                  type: string
                  pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
                  description: |
                    Maximum lookback for instant selectors (duration). Overrides the default
                    per-series staleness detection. When omitted, staleness is auto-detected per
                    series.
                  example: "10m"
      responses:
        "200":
          description: Successful query execution
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QueryResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "422":
          description: |
            Unprocessable entity — the backend could not execute the query. Try adjusting the
            query, time range, or step and retry. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /query_range:
    get:
      tags:
        - SLO time series
      summary: Execute a range query
      description:
        $ref: "./md-partials/query-range-description.mdx"
      operationId: queryRangeGet
      parameters:
        - name: query
          in: query
          required: true
          description: Prometheus expression query string
          schema:
            type: string
          example: rate(reliability{project="default"}[5m])
        - name: start
          in: query
          required: true
          description: Start timestamp (RFC3339 or Unix timestamp)
          schema:
            type: string
            format: date-time
          example: "2024-01-15T10:00:00Z"
        - name: end
          in: query
          required: true
          description: End timestamp (RFC3339 or Unix timestamp)
          schema:
            type: string
            format: date-time
          example: "2024-01-15T11:00:00Z"
        - name: step
          in: query
          required: true
          description: Query resolution step width (duration format)
          schema:
            type: string
            pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
          example: "15s"
        - name: timeout
          in: query
          required: false
          description: |
            Evaluation timeout duration. The default `0s` means no explicit timeout is sent and
            the server applies its own default.
          schema:
            type: string
            pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
            default: "0s"
          example: "30s"
        - name: lookback_delta
          in: query
          required: false
          description: |
            Maximum lookback for instant selectors (duration). Overrides the default per-series
            staleness detection: a larger value keeps sparse or slow series visible longer, while a
            smaller value enforces stricter freshness. When omitted, staleness is auto-detected per
            series.
          schema:
            type: string
            pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
          example: "10m"
      responses:
        "200":
          description: Successful range query execution
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QueryResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "422":
          description: |
            Unprocessable entity — the backend could not execute the query. Try adjusting the
            query, time range, or step and retry. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

    post:
      tags:
        - SLO time series
      summary: Execute a range query
      description:
        $ref: "./md-partials/query-range-description.mdx"
      operationId: queryRangePost
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - query
                - start
                - end
                - step
              properties:
                query:
                  type: string
                  description: Prometheus expression query string
                  example: rate(reliability{project="default"}[5m])
                start:
                  type: string
                  format: date-time
                  description: Start timestamp (RFC3339 or Unix timestamp)
                  example: "2024-01-15T10:00:00Z"
                end:
                  type: string
                  format: date-time
                  description: End timestamp (RFC3339 or Unix timestamp)
                  example: "2024-01-15T11:00:00Z"
                step:
                  type: string
                  pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
                  description: Query resolution step width (duration format)
                  example: "15s"
                timeout:
                  type: string
                  pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
                  description: |
                    Evaluation timeout duration. The default `0s` means no explicit timeout is sent and
                    the server applies its own default.
                  default: "0s"
                  example: "30s"
                lookback_delta:
                  type: string
                  pattern: '^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$'
                  description: |
                    Maximum lookback for instant selectors (duration). Overrides the default
                    per-series staleness detection. When omitted, staleness is auto-detected per
                    series.
                  example: "10m"
      responses:
        "200":
          description: Successful range query execution
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/QueryResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "422":
          description: |
            Unprocessable entity — the backend could not execute the query. Try adjusting the
            query, time range, or step and retry. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /series:
    get:
      tags:
        - SLO time series
      summary: Find time series
      description:
        $ref: "./md-partials/series-description.mdx"
      operationId: seriesGet
      parameters:
        - name: match[]
          in: query
          required: true
          description: Series selector argument that selects the series to return (can be repeated)
          schema:
            type: array
            items:
              type: string
            minItems: 1
          style: form
          explode: true
          example: ['reliability{project="default"}', "budget"]
        - name: limit
          in: query
          required: false
          description: Maximum number of series to return (0 means no limit)
          schema:
            type: integer
            minimum: 0
            default: 0
          example: 1000
      responses:
        "200":
          description: Successful series retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SeriesResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

    post:
      tags:
        - SLO time series
      summary: Find time series
      description:
        $ref: "./md-partials/series-description.mdx"
      operationId: seriesPost
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - match[]
              properties:
                match[]:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: Series selector arguments that select the series to return (can be repeated)
                  example: ['reliability{project="default"}', "budget"]
                limit:
                  type: integer
                  minimum: 0
                  default: 0
                  description: Maximum number of series to return (0 means no limit)
                  example: 1000
      responses:
        "200":
          description: Successful series retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SeriesResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /labels:
    get:
      tags:
        - SLO time series
      summary: Get label names
      description:
        $ref: "./md-partials/labels-description.mdx"
      operationId: labelsGet
      parameters:
        - name: match[]
          in: query
          required: false
          description: Series selector to filter label names (can be repeated)
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          example: ['reliability{project="default"}', "budget"]
        - name: limit
          in: query
          required: false
          description: Maximum number of labels to return (0 means no limit)
          schema:
            type: integer
            minimum: 0
            default: 0
          example: 1000
      responses:
        "200":
          description: Successful label names retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LabelsResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

    post:
      tags:
        - SLO time series
      summary: Get label names
      description:
        $ref: "./md-partials/labels-description.mdx"
      operationId: labelsPost
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                match[]:
                  type: array
                  items:
                    type: string
                  description: Series selector to filter label names (can be repeated)
                  example: ['reliability{project="default"}', "budget"]
                limit:
                  type: integer
                  minimum: 0
                  default: 0
                  description: Maximum number of labels to return (0 means no limit)
                  example: 1000
      responses:
        "200":
          description: Successful label names retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LabelsResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /label/{label_name}/values:
    get:
      tags:
        - SLO time series
      summary: Get label values
      description: |
        Returns a list of label values for a specific label name.
        Can be filtered by series matchers.
      operationId: labelValuesGet
      parameters:
        - name: label_name
          in: path
          required: true
          description: Name of the label to get values for
          schema:
            type: string
          example: "project"
        - name: match[]
          in: query
          required: false
          description: Series selector to filter label values (can be repeated)
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          example: ['reliability{project="default"}', "budget"]
        - name: limit
          in: query
          required: false
          description: Maximum number of label values to return (0 means no limit)
          schema:
            type: integer
            minimum: 0
            default: 0
          example: 1000
      responses:
        "200":
          description: Successful label values retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LabelValuesResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /metadata:
    get:
      tags:
        - SLO time series
      summary: Get metric metadata
      description: |
        Returns metadata for Nobl9 public Prometheus API for SLO time series metrics.
        Metadata is generic per-metric information such as its type, help text, and unit, and does
        not depend on stored data. Pass the `metric` query parameter to return a single metric;
        omit it to return metadata for all public metrics.
      operationId: metadataGet
      parameters:
        - name: limit
          in: query
          required: false
          description: Maximum number of metrics to return (0 means no limit)
          schema:
            type: integer
            minimum: 0
            default: 0
          example: 100
        - name: limit_per_metric
          in: query
          required: false
          description: Maximum number of metadata entries per metric (0 means no limit)
          schema:
            type: integer
            minimum: 0
            default: 0
          example: 1
        - name: metric
          in: query
          required: false
          description: Metric name to retrieve metadata for
          schema:
            type: string
          example: "reliability"
      responses:
        "200":
          description: Successful metadata retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MetadataResponse"
        "400":
          description: |
            Bad request — invalid or unparseable parameters (for example, a malformed PromQL
            expression or timestamp), or a query that exceeds the query limits (too many series,
            time range too long, or too many result points). Returned as a Prometheus-style JSON
            error with `errorType: bad_data`.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

  /status/buildinfo:
    get:
      tags:
        - SLO time series
      summary: Get build information
      description: |
        Returns the subset of Prometheus build information fields supported by the Prometheus API.
      operationId: buildInfoGet
      responses:
        "200":
          description: Successful build information retrieval
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BuildInfoResponse"
        "401":
          description: |
            Unauthorized — missing or invalid authentication. Triggered when the Authorization
            header is absent or the access key (Client ID / Client Secret) is invalid. Returned as
            a plain-text body, for example `missing Authorization request header`.
          content:
            text/plain:
              schema:
                type: string
                example: "missing Authorization request header"
        "500":
          description: |
            Internal server error — an unexpected failure while resolving metrics or executing
            the query. Returned as a Prometheus-style JSON error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"

components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description:
        $ref: "./md-partials/basic-auth.mdx"
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description:
        $ref: "./md-partials/bearer-auth.mdx"

  schemas:
    QueryResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the query execution
          example: success
        data:
          type: object
          description: Query result data
          required:
            - resultType
          properties:
            resultType:
              type: string
              enum: [matrix, vector, scalar, string, <ValNone>]
              description: Type of the result
              example: vector
            result:
              oneOf:
                - $ref: "#/components/schemas/MatrixResult"
                - $ref: "#/components/schemas/VectorResult"
                - $ref: "#/components/schemas/ScalarResult"
                - $ref: "#/components/schemas/StringResult"
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    SeriesResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the operation
          example: success
        data:
          type: array
          description: Array of label sets representing time series
          items:
            type: object
            additionalProperties:
              type: string
            example:
              __name__: reliability
              project: default
              slo: my-slo
              objective: objective-1
              service: my-service
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    LabelsResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the operation
          example: success
        data:
          type: array
          description: Array of label names
          items:
            type: string
          example: ["__name__", "project", "slo", "objective", "service"]
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    LabelValuesResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the operation
          example: success
        data:
          type: array
          description: Array of label values
          items:
            type: string
          example: ["default", "payments", "checkout"]
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    MetadataResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the operation
          example: success
        data:
          type: object
          description: Map of metric names to their metadata
          additionalProperties:
            type: array
            items:
              $ref: "#/components/schemas/MetricMetadata"
          example:
            reliability:
              - type: gauge
                help: SLO objective reliability as a ratio from 0 to 1.
                unit: ""
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    BuildInfoResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum: [success, error]
          description: Status of the operation
          example: success
        data:
          $ref: "#/components/schemas/BuildInfoData"
        errorType:
          type: string
          description: Type of error (present only on error status)
        error:
          type: string
          description: Error message (present only on error status)
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    BuildInfoData:
      type: object
      properties:
        version:
          type: string
          description: Prometheus API version
          example: "1.0.0"
        revision:
          type: string
          description: Git revision used to build the Prometheus API
          example: "26d89b4b0776fe4cd5a3656dfa520f119a375273"
        branch:
          type: string
          description: Git branch used to build the Prometheus API
          example: "main"
        goVersion:
          type: string
          description: Go runtime version of the running Prometheus API binary
          example: "go1.25.8"

    MetricMetadata:
      type: object
      properties:
        type:
          type: string
          enum: [counter, gauge, histogram, summary, untyped]
          description: Metric type
          example: gauge
        help:
          type: string
          description: Help text describing the metric
          example: "SLO objective reliability as a ratio from 0 to 1."
        unit:
          type: string
          description: Unit of the metric
          example: ""

    ErrorResponse:
      type: object
      required:
        - status
        - errorType
        - error
      properties:
        status:
          type: string
          enum: [error]
          description: Status indicating an error occurred
          example: error
        errorType:
          type: string
          description: HTTP status code or error type identifier
          example: "400"
        error:
          type: string
          description: Detailed error message
          example: "query selects 3154 series, which exceeds the maximum of 1000; narrow the label filters to select fewer series"
        warnings:
          type: array
          items:
            type: string
          description: List of warnings
        infos:
          type: array
          items:
            type: string
          description: List of informational messages

    MatrixResult:
      type: array
      description: Range vector result (matrix)
      items:
        type: object
        required:
          - metric
          - values
        properties:
          metric:
            type: object
            additionalProperties:
              type: string
            description: Label set identifying the time series
            example:
              __name__: reliability
              project: default
              slo: my-slo
              objective: objective-1
              service: my-service
          values:
            type: array
            description: Array of [timestamp, value] pairs
            items:
              type: array
              minItems: 2
              maxItems: 2
              items:
                oneOf:
                  - type: number
                  - type: string
              example: [1609459200, "0.999"]

    VectorResult:
      type: array
      description: Instant vector result (vector)
      items:
        type: object
        required:
          - metric
          - value
        properties:
          metric:
            type: object
            additionalProperties:
              type: string
            description: Label set identifying the time series
            example:
              __name__: budget
              project: default
              slo: my-slo
              objective: objective-1
              service: my-service
          value:
            type: array
            description: Single [timestamp, value] pair
            minItems: 2
            maxItems: 2
            items:
              oneOf:
                - type: number
                - type: string
            example: [1609459200, "0.42"]

    ScalarResult:
      type: array
      description: Scalar result (single numeric value)
      minItems: 2
      maxItems: 2
      items:
        oneOf:
          - type: number
          - type: string
      example: [1609459200, "42.0"]

    StringResult:
      type: array
      description: String result
      minItems: 2
      maxItems: 2
      items:
        oneOf:
          - type: number
          - type: string
      example: [1609459200, "some string value"]
