# Dremio Rest Interface

**URL:** <https://community.dremio.com/t/dremio-rest-interface/261>\
**Category:** Uncategorized\
**Created:** [September 8, 2017, 2:29pm UTC](https://community.dremio.com/t/dremio-rest-interface/261 "2017-09-08T14:29:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rinos](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rinos](https://community.dremio.com/u/rinos)\
**Post date:** [September 8, 2017, 2:29pm UTC](https://community.dremio.com/t/dremio-rest-interface/261/1 "2017-09-08T14:29:09Z")

</div>

I read on [https://docs.dremio.com/client-applications/](https://docs.dremio.com/client-applications/) that Dremio provides REST interfaces. I can’t find documentation. How can find it?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![kelly](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/kelly/32/11_2.png) [@kelly](https://community.dremio.com/u/kelly)\
**Post date:** [September 8, 2017, 2:46pm UTC](https://community.dremio.com/t/dremio-rest-interface/261/2 "2017-09-08T14:46:28Z")

</div>

Our REST interface is under development. We hope to make it available later this year.

Meanwhile there are many operations you can perform via SQL. More on that here: [https://docs.dremio.com/sql-reference/sql-commands/](https://docs.dremio.com/sql-reference/sql-commands/)

If there are specific things you’d like to see in our APIs WE would love to hear your thoughts and how you would use it.

---

<div class="post-metadata">

**Author:** ![cclairmont](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/cclairmont/32/4730_2.png) [@cclairmont](https://community.dremio.com/u/cclairmont)\
**Post date:** [September 15, 2017, 9:33am UTC](https://community.dremio.com/t/dremio-rest-interface/261/3 "2017-09-15T09:33:03Z")

</div>

Hi All,

@kelly  
I know you already explained that you work on the REST Interface. But I tried to reverse the API which is used for the UI.

My little experience:

First you connect and get a token that you put in the other requests

**LOGIN**

Request

* * *

`curl 'http://localhost:9047/apiv2/login' -H 'Origin: http://localhost:9047' -H 'Accept-Encoding: gzip, deflate, br' -H 'authorization: _dremionull' -H 'content-type: application/json' -H 'Accept: */*' -H 'Connection: keep-alive' --data-binary '{"userName":"<<user_login>>","password":<<user_password>>"}' --compressed`

Response

* * *

`{"token":"sipvsupc485fcohe26opt99au3","userName":" ***","firstName":"***","lastName":" ***","expires":1501763183689,"email":"*****","admin":true,"clusterId":"cb37a7d1-a677-4b4c-9e06-c05643fd1413","clusterCreatedAt":1500520810483,"showUserAndUserProperties":true,"version":"1.0.8-201707190805180330-27f36e1","permissions":{"canUploadProfiles":true,"canDownloadProfiles":true,"canEmailForSupport":true,"canChatForSupport":true},"userCreatedAt":1500522542435}`

For example we could list the sources. In the request we use ‘authorization:\_dremiosipvsupc485fcohe26opt99au3’ where the value is the concatenation of \_dremio + the tocken (here : “token”:“sipvsupc485fcohe26opt99au3”).

**SOURCES**

Request

* * *

`curl 'http://localhost:9047/apiv2/sources' -H 'Accept-Encoding: gzip, deflate, br' -H 'authorization:_dremiosipvsupc485fcohe26opt99au3' -H 'Accept: */*' -H 'Connection: keep-alive' --compressed`

Response

* * *

`{"sources":[{"@type":"source","config":{"hostname":" ******","port":"*****","username":" ****","authenticationType":"MASTER"},"type":"MYSQL","name":"DWH","ctime":1500521250286,"description":"DWH","id":"d2fd0ab5-6c95-4f8b-bfac-5f25ff095390","metadataPolicy":{"updateMode":"PREFETCH_QUERIED","namesRefreshMillis":1800000,"datasetDefinitionTTLMillis":1800000,"authTTLMillis":1800000},"numberOfDatasets":139,"state":{"status":"good","messages":[]},"version":0,"accelerationTTL":{"duration":1,"unit":"DAYS"},"fullPathList":["DWH"],"links":{"rename":"/source/DWH/rename","jobs":"/jobs?filters=%7B%22contains%22%3A%5B%22DWH%22%5D%2C%22qt%22%3A%5B%22UI%22%2C%22EXTERNAL%22%5D%7D","format":"/source/DWH/folder_format","self":"/source/DWH","file_preview":"/source/DWH/file_preview","file_format":"/source/DWH/file_format"},"resourcePath":"/source/DWH"}]}`
