How to get all measurements in a bucket

Hi, I have a paid subscription and a bucket with infinite data retention.

From the Data Explorer. I can see all the measurements.

But when I tried to do it with code, such as the following query

query = ‘import “influxdata/influxdb/schema” \n schema.measurements(bucket: "’+BUCKET+‘")’

It only returns a few recent measurements. If I tried to add “start: -99d” into the query, it shows more. When I tried “start: -999d”, it just gave me a timeout error.

Is there a way to list all measurements? I know I can use start/stop to check every 100 days but I have no clue where to stop.

Also if there is way to list all measurements, is there a way to know what is the start/end time of a measurement?

You can use the SHOW TABLES SQL statement to list measurements. I don’t know if the UI limits the number of results. You might try a different client, such as GitHub - InfluxCommunity/influxdb3-python-cli: This repository extends the python client library with an interactive command line interface.

Also if there is way to list all measurements, is there a way to know what is the start/end time of a measurement?

I don’t know if this is possible with a single query. Because a measurement is equivalent to a table, you would need to define what you mean by “start/end time”–for example, you could retrieve the the list of measurements and then run something like the following query for each measurement:

SELECT
  selector_first(temp, time)['time'] AS first_time,
  selector_last(temp, time)['time'] AS last_time,
  room
FROM home
GROUP BY room

See more Aggregate query examples at https://docs.influxdata.com/influxdb/cloud-serverless/query-data/sql/aggregate-select/