How to access Grafana hosted-Prometheus API directly?

I am trying to use hosted prometheus to fetch metrics using API directly.

I am receiving - 404 page not found

Following the official prometheus documentation - HTTP API | Prometheus

i am looking for the same

Hey @jamsheedbp and @kotharisaurabh11 the correct endpoint for you would be :

Its basically : your-hosted-metrics-url/api/v1/query

Note that you need to create API token and use basic auth to access the API for fetching metrics.

Please follow this doc for example : Analyze metrics usage with the Prometheus API | Grafana Cloud documentation