Validate api commands and parameters.