Delete segments from druid data source

Hi -

I have a question regarding deleting some segments based on interval from my druid data source. I know one can disable the segments on co-ordinator console and then send a kill command to remove the segments from deep storage - but I need a way to disable the segments using curl command instead of manually disabling them from co-ordinator console.

Below is the command used but the co-ordinator console still shows the segments.

curl -X DELETE "http://localhost:8081/druid/coordinator/v1/datasources/{datasourceName>/intervals/2016-03-31T00:00:00.000Z/2016-03-31T04:00:00.000Z

Can someone please let me know what is wrong with this command?

Thanks

Hi,
This command is for killing datasource, but first you have to disable the datasource by using

curl -X DELETE "http://localhost:8081/druid/coordinator/v1/datasources/{datasourceName>

and then run the above query you have mentioned

Thanks.

But is there a way to disable only the intervals that I want to later remove? or the only way is to disable the entire datasource and delete the intervals.

How does one enable the datasource back after removing the intervals?