setting up validation of the REST API: index