Dremio Rest Interface

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

Thanks in advance

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/

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.

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"}]}