# Specify data source when uploading dashboard using curl

**URL:** <https://community.grafana.com/t/specify-data-source-when-uploading-dashboard-using-curl/34370>\
**Category:** Grafana\
**Tags:** api\
**Created:** [July 29, 2020, 5:06pm UTC](https://community.grafana.com/t/specify-data-source-when-uploading-dashboard-using-curl/34370 "2020-07-29T17:06:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jklawlor](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jklawlor/32/12219_2.png) [@jklawlor](https://community.grafana.com/u/jklawlor)\
**Post date:** [July 29, 2020, 5:06pm UTC](https://community.grafana.com/t/specify-data-source-when-uploading-dashboard-using-curl/34370/1 "2020-07-29T17:06:17Z")

</div>

If I upload a dashboard to Grafana using the web gui, I get the following dialog:

 ![Screenshot_20200729_175910](https://us1.discourse-cdn.com/grafana/original/2X/9/9d25fe9ed33b4f746d7cd83d5829eda8eeed9807.png)

It asks to specify the Elastic data source, I select those and everything displays correctly.

If I upload the same dashboard via curl, I get errors in the dashboard as follows:

![Screenshot_20200729_175933](https://us1.discourse-cdn.com/grafana/original/2X/3/32046762ab1e1a3f95f0498cad3d8e7a4940c31c.png)

I think that’s because it wasn’t able to map the data sources in the file to the available data sources.

If I edit the graph, the data source it can’t map to is available in the drop down.

So, I can’t figure out why it can’t map the data sources. I am using Grafana 5.2

This is my curl command:

`curl -u admin:admin -X POST -H 'Content-Type: application/json' -d '@ilb-dashboard.json' http://localhost:30089/grafana/api/dashboards/db`
