add_action('rest_api_init', 'my_rest_validate_endpoint' );
function my_rest_validate_endpoint() {
// Declare our namespace
$namespace = 'myrest/v1';
// Register the route
// Example URL matching this route:
// http://yourdomain/wp-json/myrest/v1/guides/tag=europe/price=...