check input json format, add response for indexalldocs and indexonedoc