How to view HTTP API calls being made from the UI?

  • What Grafana version and what operating system are you using?
    7.5.10

  • What are you trying to achieve?
    I want to see the HTTP Dashboard API calls that are being made to the Grafana instance from the Grafana UI so that I can better understand how the API works. I want to automate the saving and restoring of dashboards using CICD pipelines. In other words, I’d like to see a log of all the API calls that are being sent to the Grafana instance so I can understand how the UI itself is getting things done. Hopefully this is a matter of modifying the log level?

The HTTP Dashboard API documentation seems very limited. For example I want to be able to retrieve a dashboard using the NAME of the dashboard, but it looks like the Dashboard API only allows you to specify the UIDs. Since the Grafana is using the HTTP API, I’d like to see how the UI is making these calls so I can do the same thing, but through my CICD process.

Being able to see these API calls and how the Grafana UI calls them will help me better understand the APIs in general because the docs don’t seem to provide very meaningful examples (at least, to me).

  • How are you trying to achieve it?
    Don’t know how yet.

  • What happened?
    N/A

  • What did you expect to happen?
    N/A

  • Can you copy/paste the configuration(s) that you are having problems with?
    N/A currently.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    N/A

  • Did you follow any online instructions? If so, what is the URL?
    Dashboard HTTP API | Grafana Labs

This happens to not really be a Grafana-specific question (or solution), but most browsers will have “developer tools” that allow you to see these calls.

For example in the Chrome developer tools (accessible via the “Edit” menu), you can go to the Network tab, and filter for XHR requests, which will be the API calls that you’re talking about here.

Thanks Svet, let me try that out.

This topic was automatically closed after 365 days. New replies are no longer allowed.