AJAX POST request body

  • What Grafana version and what operating system are you using?
    Running in Docker:
    bash-5.0$ ./bin/grafana-server -v
    Version 7.5.7 (commit: 91de51771c, branch: HEAD)

  • What are you trying to achieve?
    Make a REST POST call out to my own (SpringBoot) API

  • How are you trying to achieve it?
    Using the AJAX panel plugin
    AJAX plugin for Grafana | Grafana Labs

Where body and headers are filled in.

  • What happened?
    It seems to be hitting the end-point but error occurs complaining about missing body.

  • What did you expect to happen?
    Get a response/POST successful

  • Can you copy/paste the configuration(s) that you are having problems with?
    See picture.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Response error in panel:

error: "Bad Request" message: "Required request body is missing: public org.springframework.

But nothing in grafana.log

  • Did you follow any online instructions? If so, what is the URL?
    There is very little relating to POST for AJAX panel with a JSON body.

Turns out POST not supported with body.

Seems the plugin is not being maintained, see reply from Grafana support.

Indeed, it looks like POST JSON data to backend is not currently supported. There seem to be two related issues here:

You’re welcome to share your thoughts there, it looks like this feature request has been added as a future enhancement but I am not sure when that work will be completed. In the meantime, you may need to forego using the AJAX Plugin.

1 Like

hi @egarcol,

I highly recommend you try out the JSON API plugin for Grafana | Grafana Labs by Marcus Olsson. It’s actively maintained and very good.

I’m using it to make POST requests with a body to an API service.

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