PostgreSQL API proxy calls

Hi community,

I am trying to do a proxy call over the API to my PSQL database.
Unfortunately, the API is getting a 502 Bad Gateway error.

What I have done:

  1. Get datasource id with this call:
    https://[grafana]:3000/api/datasources/
    In my case the datasource has the ID 2

  2. Do a proxy call:
    https://[grafana]:3000/api/datasources/proxy/2/query?query=SELECT%20*%20FROM%20msc_stats%20ORDER%20BY%20time%20DESC%20LIMIT%2010

The answer is a "502 Bad Gateway"

Also this call is getting the 502 error:
https://[grafana]:3000/api/datasources/proxy/2/*

  • [grafana] is replaced by the server FQDN

I have formatted the URL in different ways but the server answer is always the same.

Do somebody knows if PSQL support API proxy calls at all? What I am doing wrong?

Many thanks for any hints and compliments to this great product!

Best regards,
Luca

Did you ever solve this?

Unfortunately not. I searched for another solution.