Query data
/query endpoint, or using SQL and InfluxQL via Flight+gRPC clients./queryQuery using the InfluxDB v1 HTTP API
Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.
Related guides
Parameters
Query parameters
u
stringp
stringdb
required
stringrp
stringq
required
string;).epoch
stringns
, u
, µ
, ms
, s
, m
, hHeader parameters
Zap-Trace-Span
stringAccept
stringapplication/json
, application/csv
, text/csv
, application/x-msgpackapplication/jsonAccept-Encoding
stringgzip
, identityidentityContent-Type
stringapplication/jsoncurl --request GET \
"https://us-east-1-1.aws.cloud2.influxdata.com/query?db=DB&q=Q" \
--header "Authorization: Bearer INFLUX_TOKEN"Responses
Query results.
If a DBRP doesn’t exist for the db=DATABASE_NAME and rp=RETENTION_POLICY_NAME combination in the query request, the response body contains an error message, for example "database not found:...".
results
object[]A resultset object that contains the statement_id and the series array.
Except for statement_id, all properties are optional and omitted if empty. If a property is not present, it is assumed to be null.
error
stringpartial
booleanseries
object[]An array of series objects–the results of the query. A series of rows shares the same group key returned from the execution of a statement.
If a property is not present, it is assumed to be null.
columns
string[]name
stringpartial
booleantags
objectnull.values
array[]statement_id
integerstatement_id is used to combine statement results.InfluxDB Cloud:
- returns this error if a read or write request exceeds your plan’s adjustable service quotas or if a delete request exceeds the maximum global limit
- returns
Retry-Afterheader that describes when to try the write again.
code
required
stringinternal error
, not implemented
, not found
, conflict
, invalid
, unprocessable entity
, empty value
, unavailable
, forbidden
, too many requests
, unauthorized
, method not allowed
, request too large
, unsupported media typeerr
stringmessage
stringop
stringWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB Cloud Serverless and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.