If you use a program like Fidler, you can open fidler, then go to the part in splunk web ui that has the "rebuild acceleration" link, start fidler's capture, click the link... stop the capture. Then read through the web requests in fidler to figure out how the webui does it.
Then mimic that behavior. Please mare dturnbull's response as the answer to your question, because it is, and if you find my reply about your rebuild issue acceptable, upvote my comment to spread the love. Cheers!
I assume it does 2 posts... one to disable the current acceleration, and then another to enable it again.
http://docs.splunk.com/Documentation/Splunk/6.0.5/RESTAPI/RESTknowledge#POST_datamodel.2Fmodel
... View more