Validate HTTP API user input

For example, raft indices must be sane integers.
@jonboulle please do not... how about simply add a comment?