Generate the API using the es [REST api spec](https://github.com/elasticsearch/elasticsearch-rest-api-spec). to run, call `grunt`, or for just this task run `grunt generate:js_api`. To force a regen, delete the old `src/lib/api.js` file.