Refactoring php rest api
Revert "Refactoring php rest api"

This reverts commit 395932df43953c0b734b5efeab57d65eceea21f8.
Reset rest