Get JSON by URL like render image

Generate a graph from grafana using the render function

This allows me to generate charts using various scripts.
However, I would like to get this data in JSON

Is it possible to get charts from a URL using the API?

I would just like to change variables in the URL and get the JSON response

X = 11290
Y = 1800557,1800734,1800498,1800675

url: /api/dashboards/uid/e6b4cbea-26cc-4eb5-9d88-aa85d69f27f9?orgId=1&var-host=X&var-items=Y&from=now-30m&to=now

Thank you for all your help