Re: [druid-user] Druid Rest Api Call

Hi Pathik,

Its fairly straight forward,

curl -XGET ‘http://$ServerHost:$Port/$API_END_POINTS’ -u $userName:$password

Where $ServerHost= is the druid server host, $Port= server listening port , $userName= druid api user name (if you have enabled druid basic authentication)

For Example the Below API call is posted on the druid router service which is running on ly local host on port 8888 ( which is default port for router )

Regards,
Vaibhav

By default druid returns the API output as JSON objects, I am not sure if we can change it to CSV but you should be able to convert JSON output to CSV externally - like described here:
https://stackoverflow.com/questions/49854817/curl-output-to-csv-bash

For Example-

Regards,
Vaibhav