Validate HTTP API user input

For example, raft indices must be sane integers.
Yes, this is why I had the wrapper the way it was before, but @bcwaldon didn't like that...