Adding query & state change PAP REST API's