Add support for intridea/grape

batch_api currently does not play well with
grape APIs (intridea/grape) on various parameter passing issues.
This pull request helps to let them work together.