On the REST API side, can we make it more REST-like? For example, instead of carrying an action parameter, we could embed that in the URL, e.g. /admin/zkconfig/config or /admin/zkconfig/file. Then the requests would look like:
1. POST a zipped file consisting of solr configuration files/folders
curl -X POST -H 'Content-Type: application/octet-stream' --data-binary @compressed.zip "http://localhost:8983/solr/admin/zkconfig/config?config.name=testconfig"
2. POST a single file into a configuration
curl -X POST -H 'Content-Type: text/plain' --data-binary @testfile.txt "http://localhost:8983/solr/admin/zkconfig/file/testconfig?filename=testfile.txt"
3. Link an existing configuration in zookeeper to an existing collection
curl -X PUT http://localhost:8983/solr/admin/zkconfig/link/testcollection/testconfig
Here we could have few variants, e.g. ending w/ /zkconfig/link and taking the collection and configuration name as parameters, or only one of them.
4. Delete a configuration from zookeeper
curl -X DELETE http://localhost:8983/solr/admin/zkconfig/config/testconfig
5. Delete a file/folder from a configuration in zookeeper
curl -X DELETE http://localhost:8983/solr/admin/zkconfig/file/testconfig?filename=lang/stopwords.txt
What I am after is for consistency between PUT/POST/GET/DELETE commands such that if you handle a file configuration, the request looks the same (or as much as possible) between the different commands, and we let REST determine the action we should carry. For instance, deleting a file or adding a file should take, IMO, the same parameters (and not 'path' when deleting and 'filename' when posting), and we let the PUT/POST/DELETE/GET determine what should we do with the request.
My 2 cents.