It's a bad idea to query all metrics, as it will touch all timeseries and create a huge amount of work in I/O and memory usage. But you can, and on a small test system it will probably be OK: the query is
{__name__=~".+"}
On a production system: you always want to ensure you're not touching every timeseries. Normally you'd do that by giving the metric name:
process_virtual_memory_bytes
is the same as
{__name__="process_virtual_memory_bytes"}
If you have another way to narrow it down to just a subset of series it should be OK, e.g.