Prometheus · Arazzo Workflow

Prometheus Run a Large PromQL Expression via POST

Version 1.0.0

Evaluate an expression too long for a URL, first instant then across a range.

1 workflow 1 source API 1 provider
View Spec View on GitHub AlertingMetricsMonitoringObservabilityTime SeriesArazzoWorkflows

Provider

prometheus

Workflows

large-promql-query-post
Evaluate a long PromQL expression through the POST query endpoints.
Identical semantics to the GET query endpoints, with the expression carried in an application/x-www-form-urlencoded body instead of the query string.
2 steps inputs: end, query, start, step outputs: instantResult, rangeSeries
1
evaluateInstantViaPost
Evaluate the expression at a single point in time, sending it in the request body so no URL length limit applies.
2
evaluateRangeViaPost
Evaluate the same expression across the full time range, again through the request body, producing the matrix used for charting or export.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Prometheus Run a Large PromQL Expression via POST
  summary: Evaluate an expression too long for a URL, first instant then across a range.
  description: >-
    Long PromQL expressions — generated recording rules, wide label-matcher
    unions, or machine-composed queries — routinely exceed the URL length limits
    enforced by proxies and load balancers in front of Prometheus. Both query
    endpoints accept a form-encoded POST body for exactly this reason. The
    workflow validates the expression with an instant POST query and then
    evaluates it over a range with a range POST query. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: queryApi
  url: ../openapi/prometheus-query-api-openapi.yml
  type: openapi
workflows:
- workflowId: large-promql-query-post
  summary: Evaluate a long PromQL expression through the POST query endpoints.
  description: >-
    Identical semantics to the GET query endpoints, with the expression carried
    in an application/x-www-form-urlencoded body instead of the query string.
  inputs:
    type: object
    required:
    - query
    - start
    - end
    - step
    properties:
      query:
        type: string
        description: >-
          The PromQL expression to evaluate. Typically long enough that URL
          encoding it would breach a proxy's request-line limit.
      start:
        type: string
        description: Start of the range as a Unix timestamp or RFC3339 string.
      end:
        type: string
        description: End of the range as a Unix timestamp or RFC3339 string.
      step:
        type: string
        description: Resolution step width as a duration string (e.g. 1m).
  steps:
  - stepId: evaluateInstantViaPost
    description: >-
      Evaluate the expression at a single point in time, sending it in the
      request body so no URL length limit applies.
    operationId: queryInstantPost
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        query: $inputs.query
        time: $inputs.end
        timeout: 60s
    successCriteria:
    - condition: $statusCode == 200
    - condition: $response.body#/status == "success"
    outputs:
      resultType: $response.body#/data/resultType
      result: $response.body#/data/result
  - stepId: evaluateRangeViaPost
    description: >-
      Evaluate the same expression across the full time range, again through the
      request body, producing the matrix used for charting or export.
    operationId: queryRangePost
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        query: $inputs.query
        start: $inputs.start
        end: $inputs.end
        step: $inputs.step
        timeout: 120s
    successCriteria:
    - condition: $statusCode == 200
    - condition: $response.body#/status == "success"
    - condition: $response.body#/data/resultType == "matrix"
    outputs:
      resultType: $response.body#/data/resultType
      series: $response.body#/data/result
  outputs:
    instantResult: $steps.evaluateInstantViaPost.outputs.result
    rangeSeries: $steps.evaluateRangeViaPost.outputs.series

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/prometheus-large-promql-query-post-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.