Method: projects.location.prometheus.api.v1.query Stay organized with collections Save and categorize content based on your preferences.
Evaluate a PromQL query at a single point in time.
HTTP request
GET https://monitoring.googleapis.com/v1/{name}/location/{location}/prometheus/api/v1/query
Path parameters
| Parameters | |
|---|---|
name |
Required. The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/[PROJECT_ID_OR_NUMBER]. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. |
location |
Location of the resource information. Has to be "global" now. |
Query parameters
| Parameters | |
|---|---|
query |
A PromQL query string. Query language documentation:https://prometheus.io/docs/prometheus/latest/querying/basics/. |
time |
The single point in time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. |
timeout |
An upper bound timeout for the query. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating point seconds. This non-standard encoding must be used for compatibility with the open source API. Clients may still implement timeouts at the connection level while ignoring this field. |
Request body
The request body must be empty.
Response body
If successful, the response is a generic HTTP response whose format is defined by the method.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/monitoringhttps://www.googleapis.com/auth/monitoring.read
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-23 UTC.