# Grafana API for external snapshot

**URL:** <https://community.grafana.com/t/grafana-api-for-external-snapshot/31806>\
**Category:** Grafana\
**Created:** [June 9, 2020, 5:33pm UTC](https://community.grafana.com/t/grafana-api-for-external-snapshot/31806 "2020-06-09T17:33:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grahappy](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@grahappy](https://community.grafana.com/u/grahappy)\
**Post date:** [June 9, 2020, 5:33pm UTC](https://community.grafana.com/t/grafana-api-for-external-snapshot/31806/1 "2020-06-09T17:33:35Z")

</div>

Hello,

I’m trying to automatically publish a snapshot from Grafana Server to Grafana Snapshot Server (local).

Publication with GUI works fine.  
Publication through API works for local Snapshot (snapshot on Grafana Server).

**Publication through API doesn’t work to generate Snapshot from Grafana Server to Grafana Snapshot Server.**

I call API with this commande line, on Grafana Server :  
`curl -k -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer MyApiKey" --data @body.json https://127.0.0.1/api/snapshots`

Format of my body.json :  
{  
“dashboard”: {  
##### My JSON Dashboard #####  
},  
“name”: “Dashboard Name”,  
“expires”: 3600,  
“external”:true,  
“key”:V1Gp8qBE3mccS4shZtOlynn6R9xe6sVW,  
“deleteKey”:YguVCes3QpyIBSld5FEmBdTlFse8lrW5  
}

Response from API :  
` {"deleteKey":"oAessUlIIZVsLz5j2byNAhmBgHwCl65o","deleteUrl":"https://myGrafanaCentralServer:443/api/snapshots-delete/oAessUlIIZVsLz5j2byNAhmBgHwCl65o","key":"pXILpIU5UDLfnI1lQ6xCvgapSlqhcH5h","url":"https://MyGrafanaSnapshotServer:443/dashboard/snapshot/pXILpIU5UDLfnI1lQ6xCvgapSlqhcH5h"}`

On my Grafana Snapshot Server, I’ve well my snapshot with generate link, all panels, but no data in panels (no graphs).  
I’ve not error log…

 ![2020-06-09_19-31-54](https://us1.discourse-cdn.com/grafana/original/2X/c/cb6a2f155d1f3adc51445b8a634d5642bd0b9e63.jpeg)

- KEY and DELETEKEY are required if **external** is `true`. But what does it correspond to ?  
Value that I put doesn’t seem to use in response.

- How to solve my problem ?

Greetings
