# Saving a snapshot on own local server via browser works, but fails via HTTP API

**URL:** <https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513>\
**Category:** Configuration\
**Created:** [May 17, 2018, 4:20pm UTC](https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513 "2018-05-17T16:20:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorrit](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jorrit](https://community.grafana.com/u/jorrit)\
**Post date:** [May 17, 2018, 4:20pm UTC](https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513/1 "2018-05-17T16:20:57Z")

</div>

Setup: GrafanaMain server in cloud and a GrafanaSnapshot server with reverse ngix.

1. Creating an external snapshot from GrafanaMain works almost perfect. Only flaw is that the snapshot does not show up under “dashboard/snapshots” overview.

2. Creating the same snapshot via the API with “external = false” works 100%

3. Creating the same snapshot via the API with external = True does give a (valid) response but clicking the link results in error. Altering the domain to Grafana main shows the snapshot, altering to the snapshot server in “Failed to get dashboard snapshot”.

The response:  
{  
“deleteKey”: “asdee”,  
“deleteUrl”: “[http://grafana.staged-by-discourse.com/api/snapshots-delete/asdee](http://grafana.staged-by-discourse.com/api/snapshots-delete/asdee)”,  
“key”: “ased”,  
“url”: “[http://grafana.staged-by-discourse.com/dashboard/snapshot/ased](http://grafana.staged-by-discourse.com/dashboard/snapshot/ased)”  
}

The JSON that works for situation 2 ends with:

“expires”: 3600  
}

and the json for situation 3 ends with:

“expires”: 3600,  
“name”: “een test api”,  
“external”: true,  
“key”: “ased”,  
“deleteKey”:“asdee”  
}

The rest is equal.

Anybody having a clue how I make this work?

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [June 4, 2018, 6:05pm UTC](https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513/2 "2018-06-04T18:05:09Z")

</div>

Please use search function. [Can't publish snapshots to a custom external server](https://community.grafana.com/t/cant-publish-snapshots-to-a-custom-external-server/5609)

---

<div class="post-metadata">

**Author:** ![jorrit](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jorrit](https://community.grafana.com/u/jorrit)\
**Post date:** [June 5, 2018, 5:09am UTC](https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513/3 "2018-06-05T05:09:54Z")

</div>

tnx for answering. Did use the search function and cors was not the problem. Creating the snapshot from the browser to the external server works fine. Making the same snapshot (with “[http://docs.grafana.org/http\_api/snapshot/](http://docs.grafana.org/http_api/snapshot/)”) the HTTP API is where it fails.

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [June 5, 2018, 7:49am UTC](https://community.grafana.com/t/saving-a-snapshot-on-own-local-server-via-browser-works-but-fails-via-http-api/7513/4 "2018-06-05T07:49:12Z")

</div>

Okay. What Grafana version are you using?
