Added proper REST API for P4P