Grafana Cloud Metrics Endpoint error for WordPress plugin


I’ve added a REST API plugin in WordPress that returns data in Prometheus format (wp_posts_total{status=“draft”} 0) at the link: /wp-json/metrics, without authentication. This works from the browser.

I’ve tried to connect using a Metric Endpoint from Grafana Cloud, but I have the error: The request to the provided endpoint did not return a valid response. Please ensure your URL is correctly setup to handle authentication credentials.

In section: Enter the URL to scrape, and the necessary Auth Credentials, I’ve added some mandatory random user/password and the link: /wp-json/metrics.

Could you please specify which is the reason of the error ?

Thank you,