Adding dashboard to same Org succeeds, adding it to another Org fails

Hi Folks,

  • What Grafana version and what operating system are you using?
    -Grafana v8.1.1 (90c87a52f7)

  • What are you trying to achieve?
    -Use API to add a dashboard to another Organisation

  • How are you trying to achieve it? What happened?

I managed to download the dashboard json with:
% curl -XGET http://admin:whatever@community.grafana.com/api/dashboards/uid/qiAZX2kGa>standard_dashboard_20210823.json

And I managed to make a change to a panel and after bumping up the version number, the UPDATE was successful to the same Org.
However, when I change Orgs and try again, then this:

<change Org context here> ; curl -X POST -H "Content-Type: application/json" -d @standard_dashboard_20210823.json http://admin:whatever@community.grafana.com/api/dashboards/db

{“message”:“Active organization changed”}
{“message”:“Dashboard not found”,“status”:“not-found”}

I tried with the API token added as described here:

No dice.
This behaviour is unchanged when the Org has this dashboard or when it does not have this dashboard.

  • What did you expect to happen?
    -Dashboard added with no error as it does when adding to the same Org from which the dashboard was downloaded :point_up:

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

Thanks guys for tips on how to pull out of this :pray:

Eric

[SOLVED] Dashboard id has to be null as advised here: Unable to create grafana dashboard through api but working through UI (import option) with same Json file - #4 by daniellee

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