# Promote file using Rest Api Always Promoting can only create physical datasets

**URL:** <https://community.dremio.com/t/promote-file-using-rest-api-always-promoting-can-only-create-physical-datasets/2786>\
**Category:** Uncategorized\
**Created:** [February 15, 2019, 11:53am UTC](https://community.dremio.com/t/promote-file-using-rest-api-always-promoting-can-only-create-physical-datasets/2786 "2019-02-15T11:53:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/vikash_singh/32/1069_2.png) [@Vikash\_Singh](https://community.dremio.com/u/Vikash_Singh)\
**Post date:** [February 15, 2019, 11:53am UTC](https://community.dremio.com/t/promote-file-using-rest-api-always-promoting-can-only-create-physical-datasets/2786/1 "2019-02-15T11:53:17Z")

</div>

I am using latest Dremo Version 3.1 ,I had used ADL as DataSource…I have upload .xlsx file to ADL,I want to create DataSet for this File using rest api,

I have used following Request:

URL: [https://localhost:9047/api/v3/catalog/dremio%3A%2FAzureDataLake%2FDremio\_Upload%2F"Test.xlsx"](https://localhost:9047/api/v3/catalog/dremio%3A%2FAzureDataLake%2FDremio_Upload%2F%22Test.xlsx%22)

Where dremio%3A%2FAzureDataLake%2FDremio\_Upload%2F%22Test.xlsx%22  
is Encoded URL for dremio:/AzureDataLake/Dremio\_Upload/"Test.xlsx\ which i get using api/v3/catalog/by-path

Header: Authorization \_dremiojdbnnk501se7qv4a5m29bdnk4k  
ContaintType: application/json

Method Post

Request Body

{  
“entityType”: “dataset”,  
“id”: “dremio:/AzureDataLake/Dremio\_Upload/“Test.xlsx””,  
“path”: [  
“AzureDataLake”,  
“Dremio\_Upload”,  
““Test.xlsx””  
],  
“format”: {  
“type”: “XLS”  
}  
}

But i am always getting

{  
“errorMessage”: “Something went wrong”,  
“moreInfo”: “Promoting can only create physical datasets.”  
}

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/2/2417b8e56ed6d5e8898a805716070541299cb509.png)

---

<div class="post-metadata">

**Author:** ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)\
**Post date:** [February 15, 2019, 4:37pm UTC](https://community.dremio.com/t/promote-file-using-rest-api-always-promoting-can-only-create-physical-datasets/2786/2 "2019-02-15T16:37:13Z")

</div>

Hi,

You need to provide a `type` as described in the [docs](http://docs.dremio.com/rest-api/catalog/dataset.html). So in this case you would want to add:

```auto
  "type": "PHYSICAL_DATASET"

```

to your JSON body. We are working on improving our docs and I’ll add this as another task.

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/vikash_singh/32/1069_2.png) [@Vikash\_Singh](https://community.dremio.com/u/Vikash_Singh)\
**Post date:** [February 27, 2019, 5:41am UTC](https://community.dremio.com/t/promote-file-using-rest-api-always-promoting-can-only-create-physical-datasets/2786/3 "2019-02-27T05:41:36Z")

</div>

Thanks yes, it works
