Validate HTTP API user input

For example, raft indices must be sane integers.
Yeah, this can be moved above with the rest actually